@agent-autopunk-media-skills:data-journalism-investigator-agentfrom autopunk-media-skills
Takes a dataset and research question and produces a complete data journalism package — story angles, data collection plan, cleaning instructions, statistical analysis, reader-friendly explanations, chart descriptions, and methodology statement — ready for editor review.
Ships in autopunk-media-skills. Installing the plugin adds it to Claude Code.
Takes a dataset or data source and a research question and produces a complete data journalism package — story angles, data collection plan, cleaning instructions, statistical analysis, reader-friendly explanations, chart descriptions, and a published methodology statement — ready for an editor to review.
Required:
Optional:
| Step | Skill | What it produces | Condition |
|---|---|---|---|
| 1 | data-story-finder | 3-6 ranked story angles with data support, confidence ratings, and reporting questions | Always |
| 2 | scraper-brief | Technical brief for collecting data from a web source — fields, schema, scope, legal notes | Skipped if the data is already in hand |
| 3 | data-cleaning-brief | Step-by-step cleaning checklist with editorial sign-off decisions flagged | Skipped if the data is already clean |
| 4 | basic-statistics-calculator | Calculations with full working shown — percentages, rates, changes, ratios — plus plain-English interpretations | Always |
| 5 | statistics-explainer | Plain-language rewrites of the statistical findings for a general audience | Always |
| 6 | chart-description-writer | Captions and alt-text for each chart the story requires | Always |
| 7 | methodology-explainer | Published methodology statement covering data sources, analysis steps, findings, and caveats | Always |
When the agent receives the brief, it:
The plan output looks like this:
INVESTIGATION PLAN for [research question or topic]
Dataset: [name or description of dataset/source]
Status: [in hand / needs collection] · [clean / needs cleaning / unknown]
Research question: [the question or hypothesis]
Publication: [type and audience, if specified]
Step 1: data-story-finder — Identify 3-6 story angles from the dataset
[INCLUDED]
Step 2: scraper-brief — Technical brief for data collection
[INCLUDED / SKIPPED: data already in hand]
Step 3: data-cleaning-brief — Cleaning checklist and editorial sign-off items
[INCLUDED / SKIPPED: data confirmed clean]
Step 4: basic-statistics-calculator — Key calculations with full working
[INCLUDED]
Step 5: statistics-explainer — Plain-language rewrites for publication
[INCLUDED]
Step 6: chart-description-writer — Captions and alt-text for visualizations
[INCLUDED]
Step 7: methodology-explainer — Published methodology statement
[INCLUDED]
Gaps that may affect output quality:
- [any missing inputs flagged here]
Estimated output: A complete data journalism package containing
[list of deliverables]. Steps build sequentially — the story angles
inform the calculations, the calculations feed the explainers, and
all feed the methodology statement.
Approve this plan? (yes / adjust / skip steps)
After the user approves the plan, the agent:
Runs data-story-finder using the dataset description, sample rows, and research question. Presents 3-6 ranked story angles with the data points that support each one, confidence ratings, and reporting questions to pursue. The user picks the angle to investigate (or provides their own) before the agent continues. The chosen angle shapes every subsequent step.
If included, runs scraper-brief to produce a technical handoff document for collecting the data. Covers: fields to collect with example values, output schema with column names and data types, scope and update frequency, technical considerations (pagination, rate limiting, JS rendering), and legal/ethical notes (robots.txt, terms of service). The user can adjust scope or fields before proceeding.
If included, runs data-cleaning-brief using the dataset description and any known problems. Produces a numbered cleaning checklist in recommended sequence — structural changes first (deduplication, column splitting), then value standardisation (date formats, currency normalization, name matching). Separately lists decisions that require editorial sign-off, such as how to handle blank values or ambiguous entity names. The user reviews and confirms the editorial decisions before analysis begins.
Runs basic-statistics-calculator on the key data points identified in step 1. For each calculation: restates the inputs, shows the formula and full working, states the result, provides a plain-English sentence usable in the story, and flags any caveats (small sample sizes, base-rate effects, denominator changes). If the initial calculation tells an incomplete story, suggests a second calculation and explains why. The user can request additional calculations before proceeding.
Runs statistics-explainer to rewrite the statistical findings from step 4 for a general audience. Produces two to three rewrite options per finding — each factually equivalent to the original but using plain numbers and concrete comparisons instead of jargon. Flags the key misinterpretation risk for each statistic and suggests accuracy caveats where oversimplification is a genuine danger. The user picks the version that fits their publication's register.
Runs chart-description-writer for each visualization the story requires. For each chart: writes a headline-first caption (60-120 words) that leads with the finding, not with "this chart shows"; and if requested, writes a separate alt-text description (60-100 words) meeting accessibility standards. The user specifies chart types or the agent recommends them based on the data (line charts for trends, bar charts for comparisons, scatter plots for correlations).
Runs methodology-explainer using all prior steps as input. Produces a methodology statement (300-500 words) structured under four headings: Data Sources, How We Analysed It, What We Found, and Caveats and Limitations. Written for two audiences simultaneously — the general reader who wants confidence the journalism is solid, and the specialist reader who needs enough detail to reproduce or challenge the work.
The agent assembles all outputs into a single investigation package. The user can interrupt between any two steps to adjust direction, change the story angle, or skip a remaining step.
A single assembled document titled DATA INVESTIGATION: [Research Question or Topic], containing:
Total length: 2,500-6,000 words depending on how many steps were included and how many calculations were performed. Tone is precise and editorial — written for a journalist building a publishable story, not for a general reader.
I have a dataset of all building permits issued by a metropolitan planning authority over the past five years (2020-2025). The data was obtained through a freedom of information request and is already in my possession as a CSV file.
Dataset: 34,000 rows. Columns: permit_id, application_date, decision_date, applicant_name, project_type (residential, commercial, industrial, mixed-use), suburb, estimated_cost, decision (approved, rejected, withdrawn), processing_days, council_district.
Known data problems: The applicant_name field has inconsistent capitalisation and abbreviations ("WESTMARK DEVELOPMENTS", "Westmark Developments Pty Ltd", "Westmark Dev"). The estimated_cost field mixes formats ("$2,400,000", "2400000", "$2.4M"). About 600 rows have blank processing_days values.
Research question: Are building permits being processed equally across council districts, or are some districts experiencing significantly longer delays?
Publication: Metropolitan daily newspaper, general news section. Charts planned: Bar chart comparing median processing days by district; line chart showing processing times over the five-year period.
INVESTIGATION PLAN for "Are building permits processed equally across districts?"
Dataset: Metropolitan planning authority building permits, 34,000 rows, 2020-2025
Status: In hand · Needs cleaning (name standardisation, cost formats, blank fields)
Research question: Are processing times equal across council districts, or are
some districts experiencing significantly longer delays?
Publication: Metropolitan daily newspaper, general news section
Step 1: data-story-finder — Identify 3-6 story angles from the permits data
[INCLUDED]
Step 2: scraper-brief — SKIPPED: data already in hand (CSV from FOI request)
Step 3: data-cleaning-brief — Cleaning checklist for name, cost, and blank-field issues
[INCLUDED]
Step 4: basic-statistics-calculator — District comparison calculations with full working
[INCLUDED]
Step 5: statistics-explainer — Plain-language rewrites for general news readers
[INCLUDED]
Step 6: chart-description-writer — Captions and alt-text for two charts
(bar chart: district comparison; line chart: five-year trend)
[INCLUDED]
Step 7: methodology-explainer — Published methodology statement
[INCLUDED]
Gaps that may affect output quality:
- No sample rows provided — story angle identification and cleaning
instructions will rely on column descriptions. Provide 5-10 rows
if available to improve precision.
Estimated output: A six-section investigation package (story angles,
cleaning brief, statistical analysis, reader explanations, chart
descriptions, methodology statement). Scraper brief skipped.
Approve this plan? (yes / adjust / skip steps)
DATA INVESTIGATION: ARE BUILDING PERMITS PROCESSED EQUALLY ACROSS COUNCIL DISTRICTS?
Investigation Summary
This package covers an analysis of 34,000 building permits issued by the metropolitan planning authority from 2020 to 2025. Six of seven steps were run — the scraper brief was skipped because the data was already obtained via FOI. The package includes: story angles, a data cleaning brief, statistical analysis of processing times by district, plain-language explanations, chart descriptions for two visualizations, and a methodology statement. One flag: 600 rows with blank processing times (1.8% of the dataset) need an editorial decision before analysis — the cleaning brief covers this.
1. Story Angles
Dataset Overview
This dataset covers five years of building permit decisions across the full metropolitan area, broken down by project type, suburb, and council district. It is strong enough to support geographic disparity stories, trend stories, and applicant concentration analyses. Key limitation: the data records processing duration and outcomes but not the reason for delays — it cannot distinguish between administrative backlogs and genuinely complex applications without additional reporting.
Angle 1: The district disparity in processing times (STRONG) [CHOSEN] If processing times vary significantly between council districts for the same types of projects, there is a service inequality story with direct impact on residents and developers. The research question maps directly to this angle.
Angle 2: The five-year trend — are permits getting slower? (STRONG) If processing times have increased across the board since 2020, this is a systemic performance story. If the increase is concentrated in specific years (e.g. post-pandemic), it is a recovery story.
Angle 3: Approval rate disparities by district (TENTATIVE) If some districts reject a significantly higher proportion of applications than others, this raises questions about consistency in planning decisions. However, rejection rates alone do not prove unfairness — some districts may receive more non-compliant applications.
Angle 4: Who is building? Applicant concentration (TENTATIVE — requires clean names) If a small number of developers account for a disproportionate share of permits by value, this is a market concentration story. But this angle depends heavily on clean applicant names — the current data has significant deduplication issues.
Angle 5: The withdrawn applications story (TENTATIVE — needs context) Withdrawn applications are often overlooked. If withdrawal rates are high in certain districts or for certain project types, this may indicate regulatory friction that discourages applicants before a decision is reached.
2. Data Cleaning Brief
Cleaning Checklist
Complete steps in this order. Do not change column names unless specified.
Remove duplicate rows (permit_id column)
Problem: Check for duplicate permit_id values. If any exist, they are likely import errors.
Action: Deduplicate keeping one row per unique permit_id. If a permit_id appears more than once with different values in other columns, flag for manual review.
Standardise estimated_cost to numeric (estimated_cost column)
Problem: Three formats in use: "$2,400,000", "2400000", "$2.4M".
Action: Strip dollar signs and commas. Convert "M" suffix notation to full number ($2.4M becomes 2400000). Store as integer. Do not add decimal places.
Standardise applicant_name for grouping (applicant_name column)
Problem: Same company appears in multiple forms — "WESTMARK DEVELOPMENTS", "Westmark Developments Pty Ltd", "Westmark Dev".
Action: Convert all values to title case as a first pass. Then run a near-match check (Levenshtein distance of 2 or fewer) and produce a review list of probable duplicates for manual confirmation. Do not automatically merge names — present the list for journalist sign-off.
Handle blank processing_days rows
Problem: 600 rows (1.8%) have no value for processing_days.
Action: Do not impute or estimate. Leave as null. Exclude these rows from any calculations involving processing time. Document the count and percentage in the methodology note. Retain the rows in the dataset — they remain valid for non-time analyses (e.g. approval rates, applicant concentration).
Verify decision_date minus application_date equals processing_days
Problem: Spot-check whether processing_days is calculated correctly from the two date fields.
Action: Compute the difference between decision_date and application_date for a sample of 100 rows and compare to the stated processing_days. If discrepancies exceed 5%, recalculate processing_days from the date fields for the full dataset and use the recalculated values.
Do not change the following columns: permit_id, application_date, decision_date, project_type, suburb, decision, council_district. These appear to be structured fields with consistent values. Verify by checking unique value counts before analysis.
Decisions Requiring Editorial Sign-Off
3. Statistical Analysis
Calculation 1: Median Processing Days by Council District
Inputs
council_districtCalculation Sort processing_days values within each district. Find the middle value (median). For the purpose of this example, the agent works with the summary statistics the journalist extracts from the cleaned data. Illustrative results based on the dataset structure:
| District | Median processing days | Total permits |
|---|---|---|
| Northgate | 62 | 3,200 |
| Riverside | 58 | 4,100 |
| Harborview | 44 | 2,800 |
| Eastfield | 41 | 2,600 |
| Southbank | 39 | 3,400 |
| Westpark | 38 | 2,900 |
| Central | 36 | 3,100 |
| Hillcrest | 35 | 2,700 |
| Lakeside | 34 | 2,500 |
| Greendale | 33 | 2,300 |
| Oldtown | 31 | 1,900 |
| Bayside | 28 | 1,900 |
Result: Median processing days range from 28 (Bayside) to 62 (Northgate) — a ratio of 2.2 to 1.
In Plain English: A building permit in Northgate takes twice as long to process as one in Bayside — 62 days versus 28. The four slowest districts all sit above 40 days; the eight remaining districts cluster between 28 and 38.
Caveats
Calculation 2: Percentage Difference Between Slowest and Fastest Districts
Inputs
Calculation Formula: ((Higher Value - Lower Value) / Lower Value) x 100 ((62 - 28) / 28) x 100 = (34 / 28) x 100 = 121.4%
Result: Northgate's median processing time is 121% longer than Bayside's.
In Plain English: Permits in Northgate take more than twice as long as those in Bayside — a gap of 34 days on median.
Caveats
Calculation 3: Year-on-Year Change in Median Processing Days (All Districts Combined)
Inputs
Calculation Formula: ((New - Old) / Old) x 100 2020 to 2024 (full years): ((44 - 32) / 32) x 100 = 37.5%
Result: Median processing times across all districts increased 37.5% over four years, from 32 days in 2020 to 44 days in 2024.
In Plain English: Building permits now take more than a third longer to process than they did in 2020 — a rise from 32 days to 44 days at the median, with no sign of the trend reversing.
Caveats
4. Reader-Ready Explanations
Finding 1: The district gap
Option A: "A building permit in the city's slowest district takes more than twice as long to process as one in the fastest — 62 days versus 28. That is the difference between a two-month wait and a four-week turnaround for the same type of application."
Option B: "Depending on which district you build in, you could wait 28 days for a permit or 62. The gap has widened over five years, and the four slowest districts now all exceed 40 days."
Option C (most conservative): "Median permit processing times range from 28 days in Bayside to 62 days in Northgate. The disparity raises questions about whether planning resources are distributed evenly across the metropolitan area."
Key misinterpretation risk: Readers may assume a 62-day median means "everyone waits 62 days." It means half wait longer, half wait less. The worst cases in Northgate are likely well over 100 days. If the story quotes the median, include a line explaining what a median is.
Finding 2: The five-year trend
Option A: "Building permits now take more than a third longer to process than they did in 2020. The median wait has climbed from 32 days to 44 — an increase of roughly three working days every year, with no sign of reversal."
Option B: "Five years ago, a typical building permit took about a month. Now it takes six weeks. The increase has been steady and affects every district in the metropolitan area."
Key misinterpretation risk: "A third longer" sounds moderate. In absolute terms, 12 extra days is meaningful for anyone holding a construction loan. Consider including the dollar cost of delay if the data supports it.
5. Chart Descriptions
Chart 1: Bar chart — Median processing days by council district
Caption: Northgate and Riverside stand out as the two slowest districts for building permit processing, with median wait times of 62 and 58 days. Bayside is the fastest at 28 days — less than half the time. The remaining ten districts fall between 31 and 44 days. Source: Metropolitan Planning Authority permit data, 2020-2025, obtained via FOI.
Alt-text: Horizontal bar chart showing median building permit processing days for 12 council districts. Bars are ordered from longest to shortest. Northgate leads at 62 days, followed by Riverside at 58. Harborview and Eastfield are in the 40s. The remaining eight districts range from 28 to 39 days. Bayside has the shortest median at 28 days. Source: Metropolitan Planning Authority, 2020-2025.
Chart 2: Line chart — Median processing days over five years (all districts combined)
Caption: Permit processing times have climbed every year since 2020, rising from a median of 32 days to 44 days in 2024 — a 37.5% increase. The trend is steady rather than sudden, adding roughly three days to the median each year. Partial 2025 data (through June) shows no reversal. Source: Metropolitan Planning Authority permit data, obtained via FOI.
Alt-text: Line chart showing the overall median building permit processing time from 2020 to 2024, with a partial 2025 data point. The line starts at 32 days in 2020 and rises steadily to 44 days in 2024. The 2025 partial-year figure is 46 days. The trend is a consistent upward slope with no year-on-year decline. Source: Metropolitan Planning Authority, 2020-2025.
6. Methodology Statement
Data Sources
This analysis is based on building permit records obtained via a freedom of information request to the metropolitan planning authority. The dataset contains 34,000 permits covering the period January 2020 to June 2025 across all 12 council districts. Each record includes the application date, decision date, processing duration, project type, estimated cost, applicant name, suburb, and outcome (approved, rejected, or withdrawn). The data was received in July 2025.
How We Analysed It
For each council district, we calculated the median processing time — the middle value when all permits are ranked from fastest to slowest. We used the median rather than the average because a small number of permits with extreme processing times (200+ days) would distort the average upward. We compared district medians for the full five-year period and tracked annual medians to identify trends.
Before analysis, we cleaned the data: removed duplicate records, standardised date and cost formats, and excluded 600 rows (1.8%) with blank processing time values. Applicant names were standardised to title case and near-match duplicates were reviewed manually to avoid miscounting.
What We Found
Permit processing times vary by a factor of more than two between the fastest and slowest council districts. Northgate has a median processing time of 62 days; Bayside has 28 days. Across all districts, median processing times have increased 37.5% since 2020 — from 32 days to 44 days — with no year showing a decline.
Caveats and Limitations
Processing time measures the gap between application and decision. It does not measure why a permit was slow — delays could stem from administrative backlogs, incomplete applications, or the genuine complexity of the proposed project. This analysis cannot distinguish between those causes without additional reporting.
Approximately 1.8% of records had blank processing time values and were excluded from time-based calculations. These rows were not concentrated in any single district.
The analysis does not control for project type. If some districts handle a higher proportion of complex commercial applications, part of the processing time difference may be explained by project mix rather than administrative performance. A project-type-controlled comparison is recommended as a follow-up.
Editor's Checklist
What the agent file sets; muted values are Claude Code's defaults
25data-journalism, investigation, statistics, visualization, methodology, agent
7-day visitors to each agent page
npx claudepluginhub ur-grue/autopunk-media-skills --plugin autopunk-media-skills10 agents in this plugin
AGENT_TEMPLATEAgent TemplateUse this file as the starting point for every new agent. Copy it, rename the file to match the `name` field in the frontmatter, and fill in every section.documentary-development-agentTakes a one-line documentary idea and produces a complete development package — logline, pitch treatment, broadcaster pitch, and festival synopses — ready to send to commissioners, funders, or festival programmers.investigative-reporter-agentTakes a story spark and produces a fully-scoped investigation package — editorial angle, source map, records requests, document analysis, verification checklist, libel-risk flags, and a draft lede — ready for an editor's desk.Other plugins' agents for the same job