Bevetés utáni jelentés · 03
Best Location: every Hungarian settlement, ranked from public data
A single-page map that ranks the whole country, Budapest by district, against your own weighting of schools, commute, prices, soil and air. Built only from public datasets, each one checked at its source before it went in.
Ez a jelentés egyelőre csak angolul olvasható.
- Szerep
- Sole engineer — data pipeline, commute model, scoring, app
- Időszak
- 2026. augusztus – napjainkig
- Állapot
- Átadva · Nyílt forráskód
- Technológiák
- Python · JavaScript · MapLibre GL · NumPy · Shapely · GTFS · Docker
- Forrás
- Galicz555/bestLocation
Situation
Choosing where to live in Hungary means comparing places on facts held by a dozen public bodies: school results at the Education Office, prices and the census at the statistics office (KSH), soil maps at a research institute, timetables at the railways. Each site answers one question about one place. None of them answers “which places fit me” for the whole country.
Mission
One map that ranks every settlement against the user’s own weighting, built from public data only. Every number has to trace back to its source, and every gap has to show as a gap.
Execution
- One join key. Every dataset joins on the KSH settlement code. A Wikidata crosswalk links all 3,178 codes, Budapest and each of its districts included, to OpenStreetMap boundaries without a single gap.
- Sources checked at the source. Four parallel research passes proposed the data sources. No endpoint went into the pipeline before it had been fetched and checked directly.
- A commute model, not a straight line. For each place, the best of three: driving, driving to a station and taking the train, or scheduled public transport (national rail plus Budapest’s metro, trams, buses and suburban trains, at most one transfer). The model has no bridges, so it refuses a drive to the station across the Danube, and the docs name that as its limit.
- Prices that admit their sample size. House and flat prices are sales-weighted over the latest three years. A price built on fewer than ten sales is marked, and one filter hides them all.
- Budapest by district. The capital ranks as its 23 districts, with schools joined to them by postcode, because “Budapest” as one row answers nothing.
- Compare, don’t scroll. Up to five places side by side in a native dialog. With two commuters, a place’s commute is the worse of the two.
- No build step. The app is plain JavaScript and MapLibre over a static JSON dataset. A Python standard-library server adds the one dynamic part: commute times to a workplace the user picks.
- A public repository that respects the licences. Some sources are non-commercial or may not be redistributed. An export script builds the public repository from an allowlist, removes what must stay private before the first public commit, and ships a generated sample dataset instead of the full one.
What broke
- Missing data that looked like data. Without terrain data, a settlement’s relief came out as “flat” instead of unknown. Failed calls to the climate, solar and air-quality APIs were cached like answers and never retried. School fields from an earlier build survived a rebuild, and one build step ran before the boundaries it depends on existed.
- A five-sale year set the price. A settlement’s house price came from its latest year alone, so five sales could decide it.
- Central Budapest was a kilometre off. The default workplace sat at Clark Ádám tér instead of Deák tér, so every default commute was measured to the wrong point.
- The soil service fails its own TLS check. The national soil-map service answers with an expired certificate, and one of its layers disagrees with its own raw data. The soil fetcher skips certificate checks for that one host only, and the pipeline computes soil texture from the sand, silt and clay fractions instead of trusting the published class.
Lessons
- Missing must look missing. A default in place of an unknown is a wrong answer that passes every check. Keep it empty, and show it as empty.
- Carry the sample size with the number. A price from five sales is a rumour, and the user deserves to know which prices are rumours.
- Licences are architecture. What may be redistributed decided what the public repository can hold, so the export is a script that runs the same way every time, not a manual clean-up.
- A proposed source is a lead until it has been fetched. Research, by an agent or a person, names endpoints. Only a request shows whether they answer, and with what.