Data analyst engine

From onfire7777/universal-ai-skills-library · View interactive version

Data analyst engine is an AI agent skill from the GitHub repository onfire7777/universal-ai-skills-library. Comprehensive data analysis expertise covering statistical analysis, data visualization, exploratory data analysis, hypothesis testing, machine learning, data cleaning, and data storytelling.

How to use this skill

Skill file

Data Analyst Engine

Purpose

Provide world-class data analysis capabilities — from raw data ingestion through cleaning, exploration, statistical analysis, visualization, and insight communication.

The Data Analysis Lifecycle

Phase 1: Data Understanding

  1. What is the data? Schema, types, dimensions, source, collection method
  2. What's the question? Define the specific analytical question
  3. What's the context? Business domain, stakeholders, decisions to be informed
  4. What are the constraints? Time, tools, data quality, privacy

Phase 2: Data Cleaning (80% of the work)

Systematic cleaning checklist:

Phase 3: Exploratory Data Analysis (EDA)

Univariate Analysis (one variable at a time):

Bivariate Analysis (two variables):

Multivariate Analysis:

Phase 4: Statistical Analysis

Descriptive Statistics:

| Measure | What It Tells You | When to Use |

|---------|-------------------|-------------|

| Mean | Central tendency | Symmetric distributions |

| Median | Central tendency | Skewed distributions |

| Mode | Most common value | Categorical data |

| Std Dev | Spread | Normal-ish distributions |

| IQR | Spread | Robust to outliers |

| Skewness | Asymmetry | Distribution shape |

| Kurtosis | Tail heaviness | Outlier tendency |

Hypothesis Testing Framework:

  1. State null hypothesis (H₀) and alternative (H₁)
  2. Choose significance level (α = 0.05 typically)
  3. Select appropriate test
  4. Calculate test statistic and p-value
  5. Decide: reject or fail to reject H₀
  6. Report effect size and confidence interval (not just p-value!)

Test Selection Guide:

| Question | Data Type | Test |

|----------|-----------|------|

| Compare 2 group means | Continuous, normal | Independent t-test |

| Compare 2 group means | Continuous, non-normal | Mann-Whitney U |

| Compare 3+ group means | Continuous, normal | One-way ANOVA |

| Compare 3+ group means | Continuous, non-normal | Kruskal-Wallis |

| Association between categories | Categorical | Chi-square |

| Relationship between 2 variables | Continuous | Pearson/Spearman correlation |

| Predict continuous outcome | Mixed | Linear regression |

| Predict binary outcome | Mixed | Logistic regression |

| Before/after comparison | Paired continuous | Paired t-test / Wilcoxon |

Phase 5: Data Visualization

Chart Selection Guide:

| Purpose | Chart Type | Tool |

|---------|-----------|------|

| Distribution | Histogram, KDE, box plot | matplotlib, seaborn |

| Comparison | Bar chart, grouped bar, dot plot | matplotlib, plotly |

| Relationship | Scatter plot, bubble chart | seaborn, plotly |

| Composition | Pie chart (sparingly!), stacked bar, treemap | plotly |

| Trend over time | Line chart, area chart | matplotlib, plotly |

| Correlation matrix | Heatmap | seaborn |

| Geographic | Choropleth, scatter map | plotly, folium |

| Part-to-whole | Waterfall, Sankey | plotly |

Visualization Best Practices:

Phase 6: Data Storytelling

The Insight Communication Framework:

  1. Context: Why does this analysis matter? What question are we answering?
  2. Key Finding: State the main insight in one sentence
  3. Evidence: Show the data that supports the finding (visualization + statistics)
  4. Implications: What does this mean for decisions?
  5. Recommendations: What action should be taken?
  6. Caveats: What are the limitations? What could be wrong?

Storytelling Anti-Patterns:

Python Data Analysis Toolkit

Core Libraries

import pandas as pd          # DataFrames and data manipulation
import numpy as np            # Numerical computing
import matplotlib.pyplot as plt  # Static visualizations
import seaborn as sns         # Statistical visualizations
import plotly.express as px   # Interactive visualizations
from scipy import stats       # Statistical tests
from sklearn import *         # Machine learning

Pandas Power Patterns

Performance Tips

Machine Learning Quick Reference

When to Use ML vs. Statistics

ML Workflow

  1. Define the problem (classification, regression, clustering, ranking)
  2. Prepare features (encoding, scaling, feature engineering)
  3. Split data (train/validation/test — typically 70/15/15)
  4. Train baseline model (simple model first)
  5. Evaluate (appropriate metrics for the problem type)
  6. Iterate (feature engineering, hyperparameter tuning, model selection)
  7. Validate on held-out test set (only once!)
  8. Deploy and monitor

Evaluation Metrics

| Problem Type | Metrics | When |

|-------------|---------|------|

| Classification | Accuracy, Precision, Recall, F1, AUC-ROC | Balanced classes |

| Classification (imbalanced) | Precision-Recall AUC, F1, Balanced Accuracy | Rare events |

| Regression | MAE, RMSE, R², MAPE | Continuous prediction |

| Clustering | Silhouette, Calinski-Harabasz, Domain evaluation | Unsupervised |

| Ranking | NDCG, MAP, MRR | Search/recommendation |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.