Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Tutuchan/vacancesscolr
Vacances scolaires en France pour R
https://github.com/Tutuchan/vacancesscolr
Last synced: 3 months ago
JSON representation
Vacances scolaires en France pour R
- Host: GitHub
- URL: https://github.com/Tutuchan/vacancesscolr
- Owner: Tutuchan
- License: other
- Created: 2018-10-03T15:15:23.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-27T10:37:49.000Z (almost 5 years ago)
- Last Synced: 2024-06-21T22:45:38.310Z (5 months ago)
- Language: R
- Homepage: https://tutuchan.github.io/vacancesscolr/
- Size: 55.7 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- frrrenchies - vacancesscolr - scolaires-par-zones/) dans R (:package: Packages :package:)
README
---
output:
github_document
---```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library(vacancesscolr)
```# vacancesscolr
[![Travis build status](https://travis-ci.org/Tutuchan/vacancesscolr.svg?branch=master)](https://travis-ci.org/Tutuchan/vacancesscolr)
The goal of `vacancesscolr` is to be able to quickly retrieve school holidays in France for the 2008-2018 period and bank holidays for any given year.
The data used in this package has been obtained from [Antoine Augusti's vacances-scolaires dataset](https://github.com/AntoineAugusti/vacances-scolaires), under the Etalab license (open license).
The functionalities are direct ports from his [vacances-scolaires-france](https://github.com/AntoineAugusti/vacances-scolaires-france) and [jours-feries-france](https://github.com/AntoineAugusti/jours-feries-france) Python packages, under MIT license.
## Installation
`vacancesscolr` lives only on Github for now. Please use `devtools` or `remotes` to install it.
``` r
devtools::install_github("tutuchan/vacancesscolr")
# OR
remotes::install_github("tutuchan/vacancesscolr")
```## Examples
### Holidays
Check if a date is a holiday:
```{r check}
is_holiday("2018-03-05")
is_holiday("2018-03-05", zone = "A")
is_holiday("2018-03-05", zone = "B")
```Retrieve all holidays for a year, optional zone and optional type of holiday:
```{r year}
get_holidays(2018, name = "Vacances d'hiver")
```You can use shortened names for the holidays names:
```{r names}
holidays_names_full()holidays_names_short()
```### Bank holidays
Get all bank holidays for a year:
```{r bank holidays}
get_bank_holidays(2018)
```Get a specific bank holiday:
```{r specific bank holiday}
bh_lundi_paques(2018)
```Get the names of bank holidays (some have multiple ways to call them):
```{r bank holidays names}
bank_holidays_names()bank_holidays_names_unique()
```Get a bank holiday knowing its name:
```{r bank holiday}
bank_holiday("1 mai")(2018)
```