Skip to content

Update Norway counties to match GeoIP subdivision codes#570

Open
jsanz wants to merge 4 commits intofeature-layersfrom
data/norway-review
Open

Update Norway counties to match GeoIP subdivision codes#570
jsanz wants to merge 4 commits intofeature-layersfrom
data/norway-review

Conversation

@jsanz
Copy link
Copy Markdown
Contributor

@jsanz jsanz commented Feb 19, 2026

Summary

  • Add norway_counties_v2.geo.json with 23 features: all 20 original pre-2020 counties plus 3 merged 2020 counties (NO-34 Innlandet, NO-42 Agder, NO-46 Vestland)
  • Overlapping geometries are intentional so any GeoIP database version (pre-2020 or post-March 2024) produces matching results
  • v2 is served as default for Kibana/Elasticsearch 8+; v1 remains the default for 7.x

Changes

File Description
sources/no/counties.hjson Narrowed version range from >=1 to 1 - 7
sources/no/counties_v2.hjson New manifest for >=8 pointing to v2
sources/no/Makefile Builds v2 from v1 using mapshaper dissolve + combine
data/norway_counties_v2.geo.json Generated v2 dataset (23 features)
sources/no/README.md Documents the v1/v2 situation and build workflow
sources/no/GEOIP_INVESTIGATION.md GeoIP subdivision code analysis with reproduction steps

Background

MaxMind updated their GeoLite2-City database in March 2024 to reflect Norway's county splits. They use a hybrid of pre-2020 codes (for split-back counties) and 2020 codes (for still-merged counties). The current EMS v1 data was missing 3 codes that GeoIP now returns (NO-34, NO-42, NO-46). Full investigation details in sources/no/GEOIP_INVESTIGATION.md.

Verification

  • yarn test: 722 tests, 717 pass, 5 skip, 0 failures
  • yarn build: v7.16 manifest references v1 (20 features), v8.0+ manifests reference v2 (23 features)
  • yarn lint: clean

Closes #565

Co-authored-by: Cursor <cursoragent@cursor.com>
@prodsecmachine
Copy link
Copy Markdown

prodsecmachine commented Feb 19, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

jsanz and others added 3 commits February 19, 2026 19:45
Adds 3 merged features (NO-34 Innlandet, NO-42 Agder, NO-46 Vestland)
alongside all original pre-2020 features so that any GeoIP database
version produces matching geometries. Served as default for Kibana 8+,
while 7.x continues to use v1.

Co-authored-by: Cursor <cursoragent@cursor.com>
Set FID in the dissolve calc expression so mapshaper
preserves the GeoJSON feature id for the 3 merged counties.

Co-authored-by: Cursor <cursoragent@cursor.com>
@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

@jsanz jsanz added discuss data Data related issues and requests labels Mar 12, 2026
@jsanz jsanz marked this pull request as ready for review March 12, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Data related issues and requests discuss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants