dst-data

Fetch Danmarks Statistik API data into a local DuckDB table named dst_<table_id>.

2|1|Updated Oct 30, 2025
One-click install
npx skills add https://github.com/mikkelkrogsholm/dst-skills --skill dst-data
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dst-data
Source: https://github.com/mikkelkrogsholm/dst-skills/tree/main/.claude/skills/dst-data
Command: npx skills add https://github.com/mikkelkrogsholm/dst-skills --skill dst-data

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill fetches data from the Danmarks Statistik API and stores it in DuckDB, enabling you to build an offline, reproducible data store for analysis.

Core Features & Use Cases

  • Data acquisition: Download DST table data via the API and persist it as a local DuckDB table named dst_<TABLE_ID>.
  • Offline analysis: Build a local data repository to run SQL queries and analyses without repeated API calls.
  • Metadata tracking: Maintain a dst_metadata record to track updates and provenance.

Quick Start

Run: python scripts/fetch_and_store.py --table-id <TABLE_ID> to download and store a DST table locally.

Frequently Asked Questions about dst-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch data from the Danmarks Statistik API and store it locally?

Fetch DST data into DuckDB by running `python scripts/fetch_and_store.py --table-id <TABLE_ID>`. This downloads the specified table from the Danmarks Statistik API and persists it as a queryable DuckDB table named `dst_<TABLE_ID>` with metadata tracking for offline analysis.

Can I analyze DST data without making repeated API calls?

Yes. Build a local DuckDB repository by fetching DST tables once, then run SQL queries directly against the stored tables. This eliminates repeated API calls while maintaining a reproducible, versioned data store with metadata records tracking updates.

What happens to suppressed values when fetching DST data into DuckDB?

Suppressed values marked as '..' are handled safely during numeric casting and stored in the DuckDB table. The fetch process uses BULK format with all variables specified in filters to ensure data integrity and proper type conversion.

Do I need any dependencies installed to fetch DST data?

No external dependencies are required. The Skill operates with DuckDB as the local storage layer and connects to the Danmarks Statistik API directly, making it lightweight and self-contained for offline data storage.

How do I track which DST tables I've downloaded and when they were updated?

A `dst_metadata` record is automatically maintained alongside each fetched table, tracking update timestamps and provenance. This metadata enables reproducible analysis and helps you manage data freshness across your local DST repository.