Skip to content

v0.4.0

Choose a tag to compare

@iamkm1 iamkm1 released this 23 Jul 00:01

Minor Changes

  • New profiles.municipality() composition answers one municipality from SSB, FHI, Brønnøysundregistrene and NVE in a single call.

    const kommune = await norway.profiles.municipality("Haugesund"); // or the code "1106"
    kommune.data.population;      // SDK-aggregated residents for the two newest years
    kommune.data.lifeExpectancy;  // FHI value, or years: null with a suppression flag
    kommune.data.companies;       // Brønnøysundregistrene organization count
    kommune.data.hazards;         // Exact NVE warning matches for the municipality

    It resolves a four-digit municipality code or an exact municipality name against SSB's region register — counties and the whole-country region never resolve, and duplicated names such as Herøy require SSB's county-qualified label, so a profile never silently resolves to the wrong kommune. Population totals are summed by the SDK from SSB's per-sex, per-age rows (an SDK aggregation, not an SSB-published figure). Life expectancy preserves FHI's suppression flag with years: null for small municipalities. Every optional section degrades to a provider-error component instead of failing the call; caller cancellation still rejects.

The hosted API reference is now published at https://iamkm1.github.io/Norway-Open-Data/.


Full changelog: v0.3.0...v0.4.0

npm: norway-open-data-sdk@0.4.0