openstreetmap-statistics AGENTS.md

Instructions for creating statistics from OpenStreetMap data, which is open geographic map data edited by a community. They describe the available datasets, their file locations, and how related records such as changesets, notes, and comments connect.

In plain words
What is it for?
Use them to add statistics, query changesets or map notes, analyze comments, and join the project's Parquet datasets by their identifier columns.
Why use it?
They explain the data layout so new analyses use the correct files and joins. This avoids treating separate datasets as if they contained the same records.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/piebro/openstreetmap-statistics/agents-md
Clone the repo
git clone --depth 1 https://github.com/piebro/openstreetmap-statistics

Made for: Codex, OpenCode.

Per session 5,736 This file is loaded in full into every session.
When invoked 5,736 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.05736 $0.05736
Opus 5 $0.02868 $0.02868
Sonnet 5 $0.01147 $0.01147
Haiku 4.5 $0.00574 $0.00574

Measured 3d ago against content hash 586cb85c0d74, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openstreetmap-statistics AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 788 lines

How it starts

The opening of the file, as written. The whole thing — 788 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Creating New Statistics

The project analyzes OpenStreetMap data through preprocessed parquet files that provide detailed information about changesets, their comments, notes, and note comments.

Available Datasets

The project includes 4 different datasets:

  1. changeset_data - Main dataset containing all changesets with enriched metadata

    • Location: ../changeset_data/year=*/month=*/*.parquet
    • Partitioned by year and month
    • Contains enriched columns like created_by, device_type, imagery_used, etc.
  2. changeset_comments_data - Comments on changesets (changeset discussions)

    • Location: ../changeset_comments_data/*.parquet
    • Not partitioned, stored as flat parquet files
    • Join with changeset_data using changeset_id
  3. notes_data - Notes on the map

    • Location: ../notes_data/*.parquet
    • Not partitioned, stored as flat parquet files
    • Contains information about map notes including their location and status
  4. notes_comments_data - Comments on notes

    • Location: ../notes_comments_data/*.parquet
    • Not partitioned, stored as flat parquet files
    • Join with notes_data using note_id

Dataset Structure

Changeset Data

The changeset dataset is located at ../changeset_data/year=*/month=*/*.parquet and contains the following key columns:

Base Columns

  • changeset_id - ID of the changeset
  • edit_count - Number of edits in the changeset
  • user_name - OSM contributor username
  • year - Year of the changeset
  • month - Month of the changeset

Enriched Columns (added by scripts/changeset_raw_data_to_data.py)

  • created_by - Normalized editing software name
  • device_type - Classification: desktop_editor, mobile_editor, tool, other
  • bot - Boolean indicating if the changeset was made by a bot
  • mid_pos_x, mid_pos_y - Discretized coordinates (0-360, 0-180)
  • imagery_used - Array of imagery sources used
  • hashtags - Array of hashtags from the changeset
  • source - Array of data sources used
  • mobile_os - Mobile OS detection (Android, iOS, or NULL)
  • streetcomplete_quest - Normalized StreetComplete quest type
  • all_tags - Array of all tag prefixes used
  • organised_team - Organised team/corporation affiliation if applicable
  • for_profit - Boolean indicating if the changeset was made by a for-profit organisation

Read the full file on GitHub · 788 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 788 lines · 5,736 tokens per session scan A 586cb85c0d74

Subscribe to this mod's changes

openstreetmap-statistics AGENTS.md is an instructions file published in the GitHub repository piebro/openstreetmap-statistics (40 stars, last pushed 16d ago), licensed MIT. It adds 5,736 tokens to every session, about $0.0287 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.