Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 1.52 KB

DataFeeds.md

File metadata and controls

12 lines (11 loc) · 1.52 KB

Data Feeds

KLASS

Data is imported as JSON , se api-guide.html. For municipal facts we use KLASS as a source for counties and municipalities. The output for counties is typed up in counties.ts and municipalities.ts

TBML

Data is imported from the tbprocessor service as xml, then sendt through XmlParser.
The output is typed up in xmlParser.ts as the TbmlData interface

It's a fairly simple datastructure, just be aware of how the XmlParser works. If there is multiple nodes with the same name it'll become and array of objects/values, or if its just a single one, it'll become just the object/value. See the defaultTbmlFormat function for an example on how to work with this.

JSONStat

Data is imported from http://data.ssb.no/api/v0/ and is using the JSON-stat format (documented here: https://json-stat.org/). And we're using JSON-stat Javascript Toolkit to work and manipulate the data returned (API Reference). For now, this is only used on the kommunefakta page, see the defaultFormat function for an example on how to work with this.