Skip to content

Conversation

@JanMarvin
Copy link

@JanMarvin JanMarvin commented Jul 2, 2025

Apologies for the slightly rough initial submission—it was a bit late yesterday evening when I opened the PR.

I briefly explored the package and managed to get the pdfetch_ONS() example working.

This implementation uses the Search API to retrieve the URI, which can then be used to fetch either the data or the CSV. I opted not to use the CSV directly, as it includes a header format that I didn't want to investigate further. Additionally, the API provides useful metadata such as update status, which might be helpful.

Just to clarify: I’m not a user of this package and don’t work with ONS data, so I don’t have a specific use case for this functionality. I've cleaned up the PR a bit, but I won’t be making further contributions in this area.

pdfetch::pdfetch_ONS(c("LF24","LF2G"), "lms")
#>            LF24  LF2G
#> 1971-02-28 72.2 24219
#> 1971-03-31 72.1 24187
#> 1971-04-30 72.0 24171
#> 1971-05-31 72.0 24168
#> 1971-06-30 71.9 24153
#> 1971-07-31 71.8 24125
#> 1971-08-31 71.7 24085
#> 1971-09-30 71.6 24046
#> 1971-10-31 71.5 24015
#> 1971-11-30 71.5 24017
#>        ...           
#> 2024-06-30 74.7 32088
#> 2024-07-31 75.0 32223
#> 2024-08-31 74.9 32224
#> 2024-09-30 74.9 32231
#> 2024-10-31 74.9 32231
#> 2024-11-30 75.0 32298
#> 2024-12-31 75.0 32342
#> 2025-01-31 75.1 32390
#> 2025-02-28 75.0 32383
#> 2025-03-31 75.1 32430

Closes #20 and #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pdfetch_ONS fails

1 participant