Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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)
```