stats-nz
Query official Stats NZ data: CPI, GDP, population estimates/projections, migration, place-summary travel to work, and CSV catalogue. No API key or browser…
by thecolab-ai★ 41 GitHub stars
Install stats-nz in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Stats NZ
Goal
Query official New Zealand statistics through a small deterministic CLI with human-readable and JSON output, without browser automation, login, API keys, or local cache state.
This skill ships support for:
- Consumers price index quarterly index numbers
- National estimated population and national population projections
- Regional council estimated resident population from Stats NZ place summaries
- Main means of travel to work from one Stats NZ place summary
- International long-term migrant arrivals, departures, and net migration
- Quarterly GDP production and expenditure headline series
- Exact series lookup for the wired CPI and GDP CSV releases
- Search over the Stats NZ large-datasets CSV catalogue
Use this when
- A user asks for official New Zealand CPI, GDP, population, migration, or place-summary travel-to-work figures
- A user needs recent Stats NZ release values in a repeatable command-line workflow
- A user wants a Stats NZ CSV dataset URL or to search the public CSV catalogue
- A workflow needs public, no-login, machine-readable Stats NZ data
- Another tool or agent needs JSON output from official New Zealand statistics
Do not use this for
- Private, unpublished, embargoed, or authenticated Stats NZ data
- Administrative Data Explorer or OData API calls that require subscription keys
- Geospatial boundaries, maps, or GIS workflows from datafinder.stats.govt.nz
- Census microdata, confidentialised unit records, or custom table-builder extraction
- Figure.NZ or any other republished table. Travel to work is read only from the official Stats NZ place summary
- Travel to education, origin-destination matrices, or a crawl of every geography
- Redistributing public-data extracts as a standalone dataset
Preferred workflow
- Run
scripts/cli.pywith the narrowest subcommand that answers the task - Use
cpifor the headline quarterly all-groups CPI index 2a. Usefpifor the headline monthly all-groups Food Price Index - Use
populationfor national estimates,population --projection YEARfor national projections, orpopulation --region REGIONfor regional council population 3a. Useplace-travel CLASS/slugfor main means of travel to work at one place.populationremains the estimated-resident-population command - Use
migrationfor latest long-term migrant arrivals, departures, and net migration - Use
gdpfor quarterly headline GDP production and expenditure series - Use
series <id>when the user gives a Stats NZSeries_reference - Use
search <query>before adding a new Stats NZ CSV-backed command - Use
--jsonwhen another tool or agent needs machine-readable output - Mention Stats NZ as the upstream source and include the release URL when reporting figures
CLI
Run with:
python3 skills/stats-nz/scripts/cli.py <command> [flags]
Commands
cpi [--from DATE] [--to DATE] [--json]- Consumers price index quarterly all-groups index for New Zealandfpi [--from DATE] [--to DATE] [--json]- Food price index monthly all-groups index for New Zealandpopulation [--region REGION] [--projection YEAR] [--scenario SCENARIO] [--json]- national population, regional council population, or national projectionplace-travel PLACE [--address usual|workplace] [--json]- main means of travel to work for one place summarymigration [--json]- latest estimated long-term migrant arrivals, departures, and net migrationgdp [--from DATE] [--to DATE] [--json]- quarterly headline GDP production and expenditure measuresseries ID [--from DATE] [--to DATE] [--limit N] [--json]- observations for a wired Stats NZSeries_referencesearch QUERY [--limit N] [--json]- search the Stats NZ large-datasets CSV catalogue
Examples:
python3 skills/stats-nz/scripts/cli.py cpi
python3 skills/stats-nz/scripts/cli.py cpi --from 2025-03 --json
python3 skills/stats-nz/scripts/cli.py fpi --json
python3 skills/stats-nz/scripts/cli.py population --json
python3 skills/stats-nz/scripts/cli.py population --region auckland --json
python3 skills/stats-nz/scripts/cli.py place-travel UR/auckland --json
python3 skills/stats-nz/scripts/cli.py population --projection 2050 --json
python3 skills/stats-nz/scripts/cli.py migration --json
python3 skills/stats-nz/scripts/cli.py gdp --json
python3 skills/stats-nz/scripts/cli.py series CPIQ.SE9A --limit 4 --json
python3 skills/stats-nz/scripts/cli.py search "gross domestic product" --limit 5 --json
Resources
- CLI entrypoint:
scripts/cli.py - API and dataset notes:
references/api-notes.md
Notes
- Stats NZ is the upstream source for all implemented commands
- No API key, username, password, cookie, or browser session is required for implemented commands
cpi,fpi,gdp,migration,series, andsearchuse the public Stats NZ large-datasets CSV catalogue athttps://www.stats.govt.nz/large-datasets/csv-files-for-download/fpiresolves the latest Food Price I
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- references/api-notes.md
- references/source-notes.md
- scripts/cli.py
- scripts/provenance.py
- scripts/smoke_test.py
- scripts/test_contract.py
FAQ
What does the stats-nz skill do?
Query official Stats NZ data: CPI, GDP, population estimates/projections, migration, place-summary travel to work, and CSV catalogue. No API key or browser session required.
How do I install the stats-nz skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the stats-nz skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…