rOpenGov / pxweb

R tools to access PX-WEB API
http://ropengov.github.io/pxweb
Other
69 stars 31 forks source link

Changes in API: Statistics Finland StatFin database and its interfaces #238

Closed pitkant closed 2 years ago

pitkant commented 2 years ago

Heads-up of an upcoming change:

"The links in Statistics Finland's StatFin database will be renewed on 5.4.2022. The change also affects the use of the interface.

Highlights:

More information: https://stat.fi/ajk/verkkosivu-uudistus/uudistuksen-vaikutukset-statfin-tietokantaan_en.html"

MansMeg commented 2 years ago

But will it affect the pxweb web API? It just looks like differences on the website? The pxweb web API has not changed according to my dialogue with the pxweb developers. I get:

 Error: 'https://statfin.stat.fi/PXWeb/pxweb/fi/StatFin/' is not a PXWEB API. See pxweb_api_catalogue() for available PXWEB APIs. 

The path to Statistics Finlands APi is (english version):

https://pxnet2.stat.fi/PXWeb/api/v1/en
MansMeg commented 2 years ago

I changed the API-adress to the new path. That apparently will change.

pitkant commented 2 years ago

Isn't that "is not a PXWEB API" message printed when the URL is not included in inst/extdata/api.json file? Therefore it would print the message for station.stat.fi since it is not included in the file. And yes, this change should affect API:

"The renewal influences the structure of the StatFin database, publishing of database tables and communicating about tables, browsing of tables and all links in the database. Changing of links has an effect especially on interface (API) use"

MansMeg commented 2 years ago

It actually checks if the parh is a pxweb api in general, by pinging the ?config . Hence it worked with the new api path even though it was not in the catalogue.

It seem to work with the new API (but is now much more cumbersome I think).

Yes. I changed the API path.