rOpenGov / pxweb

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

API VGR updated the url? #270

Closed Brid10 closed 5 months ago

Brid10 commented 5 months ago

Hi, The API for Västra Götalandsregionen is not working. I get this error: Error: This is not a PXWEB API: http://pxwebb2017.vgregion.se/pxweb/api/v1/sv

Looks like the url been updated: https://pxweb2022.vgregion.se/Pxwebb/pxweb/sv/

Could this be the problem?

MansMeg commented 5 months ago

It might be. Have you trided to just through that URL in the pxweb_interactive function? It checks if that URL is a valid pxweb url.

Brid10 commented 5 months ago

I did, but gets this error

pxweb_interactive("https://pxweb2022.vgregion.se/") Error: 'https://pxweb2022.vgregion.se/' is not a PXWEB API. See pxweb_api_catalogue() for available PXWEB APIs.

MansMeg commented 5 months ago

Ok. Then that adress is not valid. It might be that they have a new version of pxweb that I dont know of. Ask them for a back-conpatible solution.

Brid10 commented 5 months ago

I talk to them and they have updated to pxweb 2021 v1 from pxweb 2017 v3.3. They change the url to https://pxweb2022.vgregion.se/Pxwebb/pxweb/sv/. Is that sufficient information or do i need to ask for something else?

I'm sorry I cant be more of help, but has to say this package is so useful!

MansMeg commented 5 months ago

So you need the url to the PXWEB API. When I followed you link it goes to the pxweb user interface. That is not the pxweb API URL. It might be that they have turned it off. I would ask them if they have an URL to the web API.

I.e. it looks like the problem is on their end.

Brid10 commented 5 months ago

They contacted me again and it looks like they had forgotten to turn on the API function on the new version.

This should be the url för the web API? https://pxweb2022.vgregion.se/Pxwebb/api/v1/sv

MansMeg commented 5 months ago

Looks right to me. Have you tried it with pxweb interactive?

Brid10 commented 5 months ago

Yes, it works and I can navigate with the console to get the tabells I'm looking for.

pxweb_interactive("https://pxweb2022.vgregion.se/Pxwebb/api/v1/sv/Demografi")

MansMeg commented 5 months ago

Great!

Brid10 commented 5 months ago

I still get the error if I navigate with the pxweb_interactiv(), But I suppose that's because the API catalog isn't updated yet?

Error: This is not a PXWEB API: http://pxwebb2017.vgregion.se/pxweb/api/v1/sv

MansMeg commented 5 months ago

Yes. This seem to be a problem on their end.