knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
The banR
package is a light R client for the BAN API. The Base Adresse Nationale (BAN) is an open database of French adresses, produced by OpenStreetMap, La Poste, the IGN and Etalab.
banR
can be installed from Github (current version):
# install.packages("devtools") devtools::install_github("joelgombin/banR", build_vignettes = TRUE)
The CRAN version is out of date :
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
':
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 (vignette("geocode")
)
Please report issues and suggestions to the issues tracker.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.