Repository navigation
feat(pipeline): write and publish spider-stats.parquet - #936
Merged
Merged
Conversation
A new step, compute_spider_stats, scans conflated.parquet once and writes one row per AllThePlaces spider: what became of its features, how they matched (by relation, rule and a distance histogram), how far their tags agree with OpenStreetMap, and per country and Wikidata ID, how its brands compare with OpenStreetMap's totals and deletion candidates. It adds the side files of import_atp and collect_wikidata_ids and AllThePlaces' own run statistics. The file is uploaded and listed in datapackage.json as a debugging aid, and documented in docs/outputs/SPIDER_STATS.md. Part of #924. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ttfb2LhDRExioXkdHbxLno
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Sascha · project thread
Part 5 of #924: the file the dashboard reads.
A new step,
compute_spider_stats, runs afterconflate, scansconflated.parquetonce, and writesspider-stats.parquet: one row per spider, 64 spiders per row group, so a web page can fetch one spider with range requests. All numbers are counts, so they can be summed across spiders, countries or brands before dividing.Per spider:
not_for_osm,invalid,no_matcher, and the China datum.dump_features = not_for_osm + invalid + no_matcher + rows.same/located_in/missing_in_osm, rows per rule, and a histogram of match distances (bins at 1, 10, 25, 50, 100, 250 and 1000 m, also in the key-value metadata).shared_osm_features(one OSM feature matched by several features of the spider) andopening_hours_top_share(the same hours everywhere).match.evidence.agreeingcompares, how many matched features have it, and whether OSM agrees, differs or lacks it.The file is uploaded as
spider-statsand listed indatapackage.jsonas a debugging aid. The schema is indocs/outputs/SPIDER_STATS.md.Testing
spider-stats.parquetagainst the fixture, and the manifest's fifth resource. Ran it locally with tippecanoe.cargo fmt,cargo clippy --all-targets -D warnings,cargo test.Not in this PR
Generated by Claude Code