statistikZH / decarb_monitoring

Repository für den Bezug der Daten fürs Dekarbonisierungsmonitoring des Kantons Zürich
https://statistikzh.github.io/decarb_monitoring/
GNU General Public License v3.0
2 stars 0 forks source link

handle new website BFS #36

Closed philbosch closed 2 weeks ago

philbosch commented 2 weeks ago

Due to the new website of the BFS the assetnumber and end_year cannot be scraped anymore.

Proposed solution: use the dam-API of the BFS for px and every other format: https://dam-api.bfs.admin.ch/hub/swagger-ui/index.htm

Works for px and excel: curl -X 'GET' \ 'https://dam-api.bfs.admin.ch/hub/api/dam/assets?orderNr=px-x-1103020100_145' \ -H 'accept: application/json'

https://dam-api.bfs.admin.ch/hub/api/dam/assets?orderNr=px-x-1103020100_145

curl -X 'GET' \ 'https://dam-api.bfs.admin.ch/hub/api/dam/assets?orderNr=ind-d-21.02.30.1202.02.01' \ -H 'accept: application/json'

https://dam-api.bfs.admin.ch/hub/api/dam/assets?orderNr=ind-d-21.02.30.1202.02.01