Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

data-analysis-patterns

БесплатноБез исполняемых скриптовНе проверен

Best practices for data aggregation, recalculation, and category management in scientific analyses. Covers when to recalculate vs reuse aggregated data…

Delphine-Lот Delphine-L★ 23 звезды на GitHub

Об этом скилле

Data Analysis Patterns

Expert guidance for making critical decisions in data analysis workflows, particularly around aggregation, recalculation, and maintaining analytical integrity.

When to Use This Skill

  • Deciding whether to recalculate from raw data vs reuse aggregated data
  • Changing category definitions in existing analyses
  • Ensuring accuracy in publication-quality analyses
  • Handling conflated features that need separation
  • Optimizing analysis pipelines without sacrificing correctness
  • Merging multi-source datasets with composite keys
  • Handling DataFrame type conversion issues during enrichment

Core Patterns

1. Recalculating vs Reusing Aggregated Data

When you have pre-aggregated data but need different categories or groupings:

  • Recalculate from raw data when category definitions fundamentally change, previously conflated features need separation, aggregation criteria change, or publication accuracy is critical
  • Approximation may be acceptable for exploratory analysis, when categories align closely, or when raw data is unavailable
  • Rule: If you can't confidently map old to new without information loss, recalculate

For detailed patterns and code examples, see data-manipulation-recipes.md

2. Composite Keys for Multi-Source Data Merging

When merging datasets from multiple sources, a single identifier often isn't unique enough:

  • Create composite keys by concatenating multiple fields with a delimiter (| or ::)
  • Always verify uniqueness after creating the composite key
  • Handle duplicates explicitly before merging (latest date, then most complete record)
  • Remove composite key before final save (temporary working column)

For implementation details, see data-manipulation-recipes.md

3. Separating Conflated Features

When one metric combines multiple independent features, separate into independent analyses:

  • Identify which features are mixed in each category
  • Create separate category systems for each independent feature
  • Enables clear interpretation and future independent analysis

For examples, see data-manipulation-recipes.md

4. DataFrame Type Conversion During Enrichment

Type mismatches are common when enriching DataFrames from external sources:

  • Check target column dtype before assignment
  • Convert values to match target dtype (easier than converting whole column)
  • Use helper functions to encapsulate type checking logic
  • Handle NaN explicitly with pd.notna() checks

For the type-safe assignment pattern and examples, see data-manipulation-recipes.md

5. AWS Data Enrichment Patterns

When enriching tabular data from AWS S3 or external repositories:

  • Use multi-source path resolution (direct lookup + path inference)
  • Auto-detect most complete input file for idempotent re-runs
  • Add columns idempotently (check before adding)
  • Use TEST_MODE for initial validation before full enrichment

For implementation patterns, see enrichment-patterns.md

6. Critical Data Validation

Column names don't always match their content. Always verify against source code before using categorical columns:

  • Locate source script and verify assignment logic
  • Add assertions for biological plausibility
  • Test with known control samples
  • Document and fix any mismatches found

For the full verification workflow and prevention checklist, see validation-patterns.md

7. Data Provenance Verification

Derived columns may use inferior sources, causing silent data loss:

  • Compare derived column coverage against likely source columns
  • Cross-tabulate to verify mapping consistency
  • Prefer reclassifying from rich source columns over merging sparse external files

For diagnostic patterns, see validation-patterns.md

8. Organizing Analysis Text for Token Efficiency

Separate computation (notebooks) from interpretation (markdown files):

  • Create analysis_files/ directory with per-figure markdown files
  • Keep notebooks for code, analysis files for interpretation
  • Token reduction: 98% (1.1M tokens notebook vs 22K tokens analysis files)

For directory structure and writing guidelines, see analysis-organization.md

9. Multi-Factor Experimental Design Analysis

When experimental design has multiple factors:

  • Use three-category design to isolate individual factor effects
  • Compare pairs controlling for one factor at a time
  • Identify synergistic, dominant, or antagonistic interactions

For interpretation framework and examples, see analysis-interpretation.md

10. Interpreting Paradoxical Results

When one categ

Полный SKILL.md на GitHub

Установить data-analysis-patterns в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Grep
Glob
Bash

Вложенные файлы

analysis-interpretation.mdanalysis-organization.mdcompression-strategies.mddata-manipulation-recipes.mdenrichment-patterns.mdspecies-reconciliation.mdvalidation-patterns.md

FAQ

Что делает скилл data-analysis-patterns?

Best practices for data aggregation, recalculation, and category management in scientific analyses. Covers when to recalculate vs reuse aggregated data, handling category changes, and ensuring analytical accuracy.

Как установить скилл data-analysis-patterns?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл data-analysis-patterns запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить data-analysis-patterns с