lgnbhl / BFS

🇨🇭Search and Download Data from the Swiss Federal Statistical Office
https://lgnbhl.github.io/BFS
GNU General Public License v3.0
18 stars 5 forks source link

BFS::bfs_get_catalog_tables() is not working #19

Closed jmbeoh closed 2 days ago

jmbeoh commented 2 days ago

Dear Felix

I suppose the update of the BFS webpage has raised an issue with the RSS feed. When I try to get catalog table data, I get always empty tibbles back: BFS::bfs_get_catalog_tables(order_nr="su-b-15.03.03.01.01") BFS::bfs_get_catalog_tables(title="Diplomstatistik")

Also, when I click on the link to the RSS feed provided in the help file of the bfs_get_catalog_tables() funktion (https://www.bfs.admin.ch/bfs/en/home/statistiken/kataloge-datenbanken/daten/_jcr_content/par/ws_catalog.rss.xml), I receive a 404 URL error.

Maybe there is a quick solution to this issue, I'm not sure how much the BFS webpage update has actually changed...

All the best Johannes

lgnbhl commented 2 days ago

Dear Johannes,

Thanks for the question. This issue has been fixed in the lastest version of the BFS package (currently v.0.5.10). My guess is you are using an older version of the BFS package. This fix has been discussed in issue #18.

Please note also that now the catalogs are based on the BFS DAM API, which provides more parameters (and will hopefully will be more stable than the RSS feed). In the current development version of the BFS package on GitHub (v.0.5.11), I have added an return_raw parameter which returns a raw/non-cleaned tibble of the catalog metadata which provides a lot of additional metadata. You can install it with:

remotes::install_github("lgnbhl/BFS")

If updating the BFS package fixes your issue, feel free to close it :).

Best, Félix

jmbeoh commented 2 days ago

Dear Felix,

indeed, sorry I should have updated the package first and thanks for the additional information.

All the best, Johannes

lgnbhl commented 2 days ago

No worries at all! Good it was an easy fix :).

Best, Félix