OSMLatvija / Osmalyzer

Parsing OSM data in Latvia against various data sources
https://osmlatvija.github.io/Osmalyzer/
GNU General Public License v3.0
2 stars 1 forks source link

Educational institution locations #15

Open HellMapGoesCoding opened 7 months ago

HellMapGoesCoding commented 7 months ago

There is a list at Valsts izglītības informācijas sistēma (VIIS) https://www.viis.gov.lv/registri/iestades

Searching without criteria brings up the full list, paged.

They provide a CSV export, but it doesn't have coordinates/location or IDs.

I can get the "searched" list as JSON from https://www.viis.gov.lv/registri/iestades?search=true&json=true, which gives me nearest page links (basically for UI), which then provide something like https://www.viis.gov.lv/registri/iestades?search=true&json=true&page=3 that I can keep iterating with full data on each page in chunks of 20, which means 110 pages at this time.

I can also get an individual record JSON from an ID at https://www.viis.gov.lv/registri/iestades/25. This is what the website loads when clicking an entry.

Some details: data._rows has actual "full" data data._rows.total for count data._rows.hits are the "search" results data._rows.hits[0]._source is then the data of each record notable immediate fields are Name and InstitutionTypeName each also has data._rows.hits[0]._source.locations notably these have LAddressType and LStreet and some others but no actual street number, like it will have "LĒDURGAS IELA" and "JŪRMALA" but no number. I have to get the individual record, which then has data.pamatdati.papildinfo_telpas[0].AddressFullText with usable address. But this means I have to get each record for all 2182 records as of now... which is not feasible.