-
Notifications
You must be signed in to change notification settings - Fork 10
/
README.Rmd
60 lines (43 loc) · 2.02 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
54
55
56
57
58
59
60
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# An R client for the BAN API
<!-- badges: start -->
[![R build status](https://github.com/joelgombin/banR/workflows/R-CMD-check/badge.svg)](https://github.com/joelgombin/banR/actions)
<!-- badges: end -->
The `banR` package is a light R client for the [BAN API](https://geo.api.gouv.fr/adresse). The [Base Adresse Nationale (BAN)](https://adresse.data.gouv.fr/) is an open database of French adresses, produced by OpenStreetMap, La Poste, the IGN and Etalab.
`banR` can be installed from Github (current version):
```{r eval=FALSE}
# install.packages("devtools")
devtools::install_github("joelgombin/banR", build_vignettes = TRUE)
```
The CRAN version is out of date :
```{r eval=FALSE}
install.packages("banR")
```
`banR` allows to geocode lots of adresses in batch (the only hard limit is that, at the moment, the API only allows CSV files up to 50 MB). Please be gentle with the server though!
`banR` is designed to be used in a data exploration workflow, with a syntax 'à la [`tidyverse`](http://tidyverse.org)':
```{r}
library(dplyr)
library(banR)
data("paris2012")
paris2012 %>%
slice(1:100) %>%
mutate(adresse = paste(numero, voie, nom),
code_insee = paste0("751", arrondissement)) %>%
geocode_tbl(adresse = adresse, code_insee = code_insee) %>%
glimpse()
```
To know more about this package, please read the [vignette](http://joelgombin.github.io/banR/articles/geocode.html) (`vignette("geocode")`)
Please report issues and suggestions to the [issues tracker](https://github.com/joelgombin/banR/issues).
## See also
* [BAN-geocoder](https://github.com/atao/BAN-Geocoder), python wrapper for adresse.data.gouv.fr
* [tidygeocoder](https://github.com/jessecambon/tidygeocoder), r package similar to banR using other geocoding services such as US Census geocoder, Nominatim (OSM), Geocodio, and Location IQ.