Repository navigation
feat: add importance column to conflated.parquet - #853
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Nw5ZNMD34EwRUnASRv4jy
This was referenced Oct 26, 2026
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.
Part of #713: every row of
conflated.parquetnow has animportancefrom 0.0 to 1.0, so downstream users can work through the file in priority order.How it's computed
src/pipeline/importance.rscombines three signals, each already in [0, 1]:brand:/operator:/network:wikidata, ATP tags first, else the matched OSM feature's (#848)MatchMask::importance()(#852)A row without a brand drops the brand term, and its weight drops out too, instead of being pushed down.
importanceis the score's mid-rank quantile among all rows, soimportance >= 0.9always selects the top tenth. The writer collects every score as rows go into the external sort, which has consumed them all before the first row comes back out.Brands without pageviews now count as no brand. On the Swiss run, Shell's 669 stations carry
brand:wikidata=Q110716465, an NSI brand item with no Wikipedia article, and so no pageviews. Under the old floor quantile they ranked below unbranded fuel stations, and they made up the whole bottom of the list.compute_qrank_quantilesnow leaves zero-pageview IDs out, both from the table and from the reference population.Other changes
conflatetakes the OSMViews raster,osmviews-ranksandqrank-quantiles, and includes them in its freshness check.qrank.csv.gzandosmviews.tiffas components: CC0, with SHA-256, purl, download URL and a link to each publisher's own BOM. Both are also independsOnand in the workflow inputs.serialNumbernow also hashes their SHA-256s, so a new QRank or OSMViews build gets a new serial number. The anchor timestamp still comes from ATP/OSM only, so file names don't change.docs/outputs/CONFLATED_PARQUET.md;docs/TECHNICAL_DESIGN.mddiagram and step list. The diagram now also shows thatconflatereads the nondescript phone/email sets, which feat(matchers): match by phone number and email address #850 started doing.Swiss run
21,808 rows. The top 20 are all pharmacies in central Zurich, Bern and Basel: the two Swiss chains have no pageviews, so their rows count as unbranded with an IMPORTANT category. Below them come McDonald's, Starbucks and Burger King downtown. The bottom is rural fuel stations and kiosks.
Average importance by kind (kinds with at least 40 rows):
conflatetook 3.2 s.OsmViews::ranktakes a mutex per lookup, so contention on a many-core planet run is worth watching inconflate.match's timing.Testing
score,Quantiles, and a list of "A should beat B" pairs: AED vs flower bed, hospital vs vending machine, AED on a quiet street vs bench on a busy one, among others.importanceis present, non-null and in [0, 1].cargo test,cargo clippy --all-targetsandcargo fmt --checkpass locally.Generated by Claude Code