Public holidays list for European countries from 2010-2020 using R ?

Hi R experts,

Currently, manually noting down the public holidays by googling year by year.
But can we somehow automate this ?
e.g.

France public holidays in 2010,2011,2012,-......2020
or
Italy

Crude way:

There are several suggestions for data sources for public holidays by country in this thread on the Open Data stack. I think you'd be much better off working with xml or JSON:

Here's an API where you can get holidays by year and country:
https://date.nager.at/Api
(e.g., France's public holidays in 2010)

3 Likes

Thanks for recommendation. Actually, I looked in API docs and also for an example. But there was no example with R starter code. I am actually new to web scrape. Do you have a starter code for this API.

Earlier, I had used Darksky API but that had much more than just a starter code.

See the jsonlite vignette "Fetching JSON data from REST APIs":
https://cran.r-project.org/web/packages/jsonlite/vignettes/json-apis.html

Thanks. This explained well.
jsonlite::fromJSON("https://date.nager.at/api/v2/publicholidays/2000/FR") :wink: is the way to extract :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.