← スキル一覧に戻る

data-analysis
by IHKREDDY
Agent Skills for GitHub Copilot - TypeScript/Node.js implementation
⭐ 0🍴 0📅 2025年12月25日
SKILL.md
name: data-analysis description: Data analysis workflows and patterns for exploring, transforming, and visualizing data. Use when working with data, creating reports, or when users mention "data analysis", "analyze data", "data exploration", or "reporting". license: MIT metadata: author: IHKREDDY version: "1.0" category: data compatibility: Works with any programming language or framework
Data Analysis Skill
When to Use This Skill
Use this skill when:
- Exploring and analyzing datasets
- Creating data reports
- Transforming or cleaning data
- Building visualizations
- Users mention "data analysis", "analyze data", or "reporting"
Data Analysis Process
1. Data Understanding
Before analysis, understand your data:
- What is the source?
- What does each field represent?
- What is the data quality?
- What are the business questions to answer?
2. Data Loading
C# / .NET
// Using CsvHelper
using var reader = new StreamReader("data.csv");
using var csv = new CsvReader(reader, CultureInfo.InvariantCulture);
var records = csv.GetRecords<DataRecord>().ToList();
TypeScript
import { parse } from 'csv-parse/sync';
import { readFileSync } from 'fs';
const data = parse(readFileSync('data.csv'), {
columns: true,
skip_empty_lines: true
});
3. Data Exploration
Key questions to answer:
- How many records?
- What are the column types?
- Are there missing values?
- What are the value distributions?
- Are there outliers?
// C# - Basic exploration
Console.WriteLine($"Total records: {data.Count}");
Console.WriteLine($"Columns: {string.Join(", ", data.First().GetType().GetProperties().Select(p => p.Name))}");
Console.WriteLine($"Missing values: {data.Count(r => r.SomeField == null)}");
4. Data Cleaning
Common cleaning tasks:
- Handle missing values
- Remove duplicates
- Fix data types
- Standardize formats
- Handle outliers
// C# - Cleaning examples
var cleaned = data
.Where(r => r.Date != null) // Remove nulls
.DistinctBy(r => r.Id) // Remove duplicates
.Select(r => new {
r.Id,
Date = DateTime.Parse(r.DateString),
Amount = decimal.Parse(r.AmountString)
})
.ToList();
5. Data Transformation
Aggregation
// C# - Group and aggregate
var summary = data
.GroupBy(r => r.Category)
.Select(g => new {
Category = g.Key,
Count = g.Count(),
TotalAmount = g.Sum(r => r.Amount),
AvgAmount = g.Average(r => r.Amount)
})
.OrderByDescending(x => x.TotalAmount);
Pivoting
// C# - Pivot data
var pivot = data
.GroupBy(r => new { r.Year, r.Month })
.ToDictionary(
g => $"{g.Key.Year}-{g.Key.Month:D2}",
g => g.Sum(r => r.Amount)
);
6. Statistical Analysis
Common metrics:
- Mean: Average value
- Median: Middle value
- Mode: Most frequent value
- Std Dev: Spread of values
- Percentiles: Distribution points
// C# - Basic statistics
var values = data.Select(r => r.Amount).OrderBy(x => x).ToList();
var mean = values.Average();
var median = values[values.Count / 2];
var stdDev = Math.Sqrt(values.Average(x => Math.Pow(x - mean, 2)));
7. Reporting
Console Output
Console.WriteLine("=== Sales Report ===");
Console.WriteLine($"Total Sales: {total:C}");
Console.WriteLine($"Average Order: {average:C}");
Console.WriteLine("\nTop Categories:");
foreach (var cat in topCategories.Take(5))
{
Console.WriteLine($" {cat.Name}: {cat.Amount:C}");
}
Export to CSV
using var writer = new StreamWriter("report.csv");
using var csv = new CsvWriter(writer, CultureInfo.InvariantCulture);
csv.WriteRecords(reportData);
Best Practices
- Document assumptions about the data
- Validate data quality before analysis
- Use appropriate data types for accuracy
- Handle edge cases (nulls, zeros, negative values)
- Version control analysis scripts
- Create reproducible workflows
- Visualize distributions to understand data
- Test calculations with known values
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です