domains / data / trend-analysis / trend-analysis
The two skills share the name but describe different procedures. The first is a business/Excel workflow that grades groups by performance, applies differentiated growth rates, computes forecast values, and renders a comparison bar chart. The second is a statistical time-series guide that tests for significant long-term trends using linear regression and Sen's slope/Mann-Kendall. Neither copy is a reproduction of the other, and crowning one would hide a real alternative method.
| Repository | Path |
|---|---|
| OpenSenseNova/SenseNova-Skills | skills/sn-da-excel-workflow/capability/excel-data-analysis/trend-analysis/SKILL.md |
| benchflow-ai/skillsbench | tasks/lake-warming-attribution/environment/skills/trend-analysis/SKILL.md |
| Role | Repository | Path |
|---|---|---|
| peer | OpenSenseNova/SenseNova-Skills | skills/sn-da-excel-workflow/capability/excel-data-analysis/trend-analysis/SKILL.md |
| peer | benchflow-ai/skillsbench | tasks/lake-warming-attribution/environment/skills/trend-analysis/SKILL.md |
--- name: trend-analysis description: Analyze trends either by forecasting differentiated growth from grouped performance data or by testing statistical significance in time series. --- # Trend Analysis Choose the workflow that matches the data shape. ## A. Grouped Performance Forecasting (Excel/CSV) Use when the data has a grouping column and a target numeric column, and the goal is to forecast next-period values by performance tier. 1. Load the data with pandas and configure a CJK-capable font for matplotlib (e.g., WenQuanYi Zen Hei, SimHei, DejaVu Sans). 2. Group by the grouping column, sum the target column, and sort descending. 3. Assign tiers: top 30% as high, bottom 30% as low, remainder as medium. 4. Apply a growth-rate map (e.g., high 10%, medium 8%, low 15%) and compute forecast = current * (1 + rate), rounded to two decimals. 5. Compute overall current total, forecast total, and overall growth rate; print a conclusion based on thresholds (>10% strong, >0% moderate, otherwise pressure). 6. Render a horizontal grouped bar chart comparing current and forecast values, annotate values and tier labels, and display the figure. ## B. Time-Series Statistical Trend Test Use when the data is a sequence of observations over time and the goal is to determine whether a long-term increase or decrease is statistically significant. 1. Load the time series (e.g., annual values). 2. Run a parametric test with scipy.stats.linregress to obtain slope, intercept, R², p-value, and standard error. 3. Run a non-parametric test with pymannkendall.original_test to obtain Sen's slope, p-value, and trend direction. 4. Interpret p-values: <0.01 highly significant, <0.05 significant, <0.10 marginal, >=0.10 no significant trend. 5. Prefer Sen's slope for environmental or outlier-prone data; report both slope magnitude and p-value rounded to two decimals. 6. Ensure at least 8-10 data points; if p-value is NaN, collect more data. ## Conflicts - OpenSenseNova/SenseNova-Skills uses performance-tier forecasting with a growth_rate_map and matplotlib visualization; benchflow-ai/skillsbench uses statistical significance testing with scipy and pymannkendall and does not forecast or visualize with bar charts. Do not mix the two procedures in a single run without first clarifying which objective applies.