← Back to Skills Marketplace
wu-uk

trend-analysis

by wu-uk · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ Security Clean
86
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install lake-warming-attribution-trend-analysis
Description
Detect long-term trends in time series data using parametric and non-parametric methods. Use when determining if a variable shows statistically significant i...
README (SKILL.md)

Trend Analysis Guide

Overview

Trend analysis determines whether a time series shows a statistically significant long-term increase or decrease. This guide covers both parametric (linear regression) and non-parametric (Sen's slope) methods.

Parametric Method: Linear Regression

Linear regression fits a straight line to the data and tests if the slope is significantly different from zero.

from scipy import stats

slope, intercept, r_value, p_value, std_err = stats.linregress(years, values)

print(f"Slope: {slope:.2f} units/year")
print(f"p-value: {p_value:.2f}")

Assumptions

  • Linear relationship between time and variable
  • Residuals are normally distributed
  • Homoscedasticity (constant variance)

Non-Parametric Method: Sen's Slope with Mann-Kendall Test

Sen's slope is robust to outliers and does not assume normality. Recommended for environmental data.

import pymannkendall as mk

result = mk.original_test(values)

print(result.slope)  # Sen's slope (rate of change per time unit)
print(result.p)      # p-value for significance
print(result.trend)  # 'increasing', 'decreasing', or 'no trend'

Comparison

Method Pros Cons
Linear Regression Easy to interpret, gives R² Sensitive to outliers
Sen's Slope Robust to outliers, no normality assumption Slightly less statistical power

Significance Levels

p-value Interpretation
p \x3C 0.01 Highly significant trend
p \x3C 0.05 Significant trend
p \x3C 0.10 Marginally significant
p >= 0.10 No significant trend

Example: Annual Precipitation Trend

import pandas as pd
import pymannkendall as mk

# Load annual precipitation data
df = pd.read_csv('precipitation.csv')
precip = df['Precipitation'].values

# Run Mann-Kendall test
result = mk.original_test(precip)
print(f"Sen's slope: {result.slope:.2f} mm/year")
print(f"p-value: {result.p:.2f}")
print(f"Trend: {result.trend}")

Common Issues

Issue Cause Solution
p-value = NaN Too few data points Need at least 8-10 years
Conflicting results Methods have different assumptions Trust Sen's slope for environmental data
Slope near zero but significant Large sample size Check practical significance

Best Practices

  • Use at least 10 data points for reliable results
  • Prefer Sen's slope for environmental time series
  • Report both slope magnitude and p-value
  • Round results to 2 decimal places
Usage Guidance
This appears to be a straightforward, coherent guide for statistical trend analysis. Before using: ensure your environment has Python and the required packages (scipy, pandas, pymannkendall) or install them from trusted sources; confirm your data files are the intended local CSVs (the examples read precipitation.csv); and remember the guidance about minimum sample size and method assumptions. There are no credential requests or network calls in the guide, so risk is low, but always be cautious when running code snippets from any third-party skill in production environments.
Capability Analysis
Type: OpenClaw Skill Name: lake-warming-attribution-trend-analysis Version: 0.1.0 The skill bundle provides legitimate documentation and code examples for statistical trend analysis using standard Python libraries such as SciPy and pymannkendall. The content in SKILL.md is purely educational and functional, focusing on linear regression and Mann-Kendall tests without any indicators of malicious intent, data exfiltration, or prompt injection.
Capability Assessment
Purpose & Capability
The name/description (trend analysis) matches the SKILL.md content (linear regression and Mann–Kendall/Sen's slope). The examples and methods shown are appropriate for environmental time-series trend detection.
Instruction Scope
Instructions are limited to reading local data (e.g., a CSV), running scipy/pandas/pymannkendall analyses, and printing results. There are no directives to read unrelated system files, access network endpoints, or exfiltrate data.
Install Mechanism
No install spec is provided (instruction-only). The guide references Python libraries (scipy, pandas, pymannkendall) but does not declare them; users will need these packages available in the execution environment.
Credentials
The skill requests no environment variables, credentials, or config paths — proportional to an offline analytical guide. The only implicit requirement is access to local data files to analyze.
Persistence & Privilege
always is false and there are no installation hooks or requests to modify agent/system configuration. The skill does not request persistent or elevated privileges.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lake-warming-attribution-trend-analysis
  3. After installation, invoke the skill by name or use /lake-warming-attribution-trend-analysis
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
Bulk publish from all-task-skills-dedup
Metadata
Slug lake-warming-attribution-trend-analysis
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is trend-analysis?

Detect long-term trends in time series data using parametric and non-parametric methods. Use when determining if a variable shows statistically significant i... It is an AI Agent Skill for Claude Code / OpenClaw, with 86 downloads so far.

How do I install trend-analysis?

Run "/install lake-warming-attribution-trend-analysis" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is trend-analysis free?

Yes, trend-analysis is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does trend-analysis support?

trend-analysis is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created trend-analysis?

It is built and maintained by wu-uk (@wu-uk); the current version is v0.1.0.

💬 Comments