| Type: | Package |
| Title: | Client for the 'BAN' API |
| Version: | 0.2.3 |
| Description: | A client for the 'Base Adresses Nationale' ('BAN') API, which allows to (batch) geocode and reverse-geocode French addresses. For more information about the 'BAN' and its API, please see https://adresse.data.gouv.fr/outils/api-doc/adresse. |
| License: | GPL-3 |
| LazyData: | TRUE |
| Depends: | R (≥ 2.10) |
| Imports: | dplyr (≥ 0.7.0), httr, readr, magrittr, tibble, purrr, rlang, utils, stringr, tidyr |
| Suggests: | testthat, knitr, rmarkdown |
| RoxygenNote: | 7.3.3 |
| Encoding: | UTF-8 |
| URL: | https://joelgombin.github.io/banR/, https://github.com/joelgombin/banR/ |
| BugReports: | https://github.com/joelgombin/banR/issues |
| VignetteBuilder: | knitr |
| NeedsCompilation: | no |
| Packaged: | 2025-11-18 18:19:00 UTC; joel |
| Author: | Joel Gombin [cre, aut], Paul-Antoine Chevalier [aut] |
| Maintainer: | Joel Gombin <joel.gombin@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2025-11-24 08:50:17 UTC |
Format object size
Description
This function is modified copy of the utils:::format.object_size function which is not exported. The main difference is that it returns values.
Usage
format_object_size(x, units = "b", standard = "auto", digits = 1L, ...)
Arguments
x |
a number |
units |
a unit |
standard |
a standard |
digits |
number of digits |
... |
anything else |
Geocode
Description
Geocode
Usage
geocode(query)
Arguments
query |
a string of the adress you want to geocode |
Value
a tibble
Examples
geocode(query = "39 quai André Citroën, Paris")
Geocode tbl
Description
Geocode tbl geocodes a whole data frame
Usage
geocode_tbl(tbl, adresse, code_insee = NULL, code_postal = NULL)
Arguments
tbl |
a data frame or tibble |
adresse |
adress column |
code_insee |
official citycode column |
code_postal |
official postcode column |
Value
an augmented data frame of class tbl with latitude, longitude, etc
Examples
table_test <- tibble::tibble(
x = c("39 quai Andre Citroen", "64 Allee de Bercy", "20 avenue de Segur"),
y = c("75015", "75012", "75007"),
z = rnorm(3)
)
geocode_tbl(tbl = table_test, adresse = x)
geocode_tbl(tbl = table_test, adresse = x, code_postal = y)
Get features
Description
Get features
Usage
get_features(x)
Arguments
x |
the content of a request |
Value
a tibble
Get geometry
Description
Get geometry
Usage
get_geometry(x)
Arguments
x |
a feature |
Value
a tibble
Addresses in the electoral register of Paris, 2012.
Description
This dataset includes addresses found in the Parisian electoral register in 2012.
Usage
paris2012
Format
a tbl_df with 72107 lines and 7 variables
- arrondissement
code of the arrondissement (district)
- bureau
code of the polling station, in the arrondissement
- numero
street number
- voie
type of street
- nom
name of the street
- nb
number of voters registered at this adress
- ID
polling station ID
Source
data have been collected by Baptiste Coulmont
Objects exported from other packages
Description
These objects are imported from other packages. Follow the links below to see their documentation.
Reverse geocode
Description
Reverse geocode
Usage
reverse_geocode(long, lat)
Arguments
long |
longitude |
lat |
latitude |
Value
a tibble
Examples
reverse_geocode(long = 2.37, lat = 48.357)
Reverse geocode tbl
Description
reverse geocode a data frame
Usage
reverse_geocode_tbl(tbl, longitude, latitude)
Arguments
tbl |
name of the tibble |
longitude |
name of the longitude column |
latitude |
name of the latitude column |
Value
an augmented tibble with addresses
Examples
table_reverse <- tibble::tibble(
x = c(2.279092, 2.375933,2.308332),
y = c(48.84683, 48.84255, 48.85032),
z = rnorm(3)
)
reverse_geocode_tbl(tbl = table_reverse, longitude = x, latitude = y)