-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
54 lines (41 loc) · 1.25 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# rods
<!-- badges: start -->
[![R-CMD-check](https://github.com/dreamRs/rods/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dreamRs/rods/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
Download datasets from [OpenDataSoft](https://www.opendatasoft.com/en/) platforms.
## Installation
You can install the development version of rods from [GitHub](https://github.com/dreamRs/rods) with:
```r
# install.packages("pak")
pak::pak("dreamRs/rods")
```
## Example
Download a dataset from [ODRé](https://odre.opendatasoft.com) :
```{r example}
library(rods)
# Donwload entire dataset
download_dataset(
server = "https://odre.opendatasoft.com",
dataset = "eco2mix-national-tr"
)
# Advanced request to select and filter data
download_dataset(
server = "https://odre.opendatasoft.com",
dataset = "eco2mix-national-tr",
select = "date_heure,consommation,taux_co2",
where = "minute(date_heure) = 0 and date_heure >= '2024-09-01' and date_heure < '2024-10-01'",
order_by = "date_heure"
)
```