Geocode tbl geocodes a whole data frame

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)
#> Writing tempfile to.../tmp/RtmptIjaaX/file16289d42598426.csv
#> If file is larger than 8 MB, it must be splitted #> Size is : 61 bytes
#> SuccessOKSuccess: (200) OK
#> # A tibble: 3 x 19 #> y z x latitude longitude result_label result_score result_type #> <chr> <dbl> <chr> <dbl> <dbl> <chr> <dbl> <chr> #> 1 75015 -1.40 39 q… 48.8 2.28 39 Quai And… 0.96 housenumber #> 2 75012 0.255 64 A… 48.8 2.38 64 Allée de… 0.96 housenumber #> 3 75007 -2.44 20 a… 48.9 2.31 20 Avenue d… 0.96 housenumber #> # … with 11 more variables: result_id <chr>, result_housenumber <chr>, #> # result_name <chr>, result_street <chr>, result_postcode <chr>, #> # result_city <chr>, result_context <chr>, result_citycode <chr>, #> # result_oldcitycode <chr>, result_oldcity <chr>, result_district <chr>
geocode_tbl(tbl = table_test, adresse = x, code_postal = y)
#> Writing tempfile to.../tmp/RtmptIjaaX/file16289d45c9948.csv
#> If file is larger than 8 MB, it must be splitted #> Size is : 81 bytes
#> SuccessOKSuccess: (200) OK
#> # A tibble: 3 x 19 #> z x y latitude longitude result_label result_score result_type #> <dbl> <chr> <chr> <dbl> <dbl> <chr> <dbl> <chr> #> 1 -1.40 39 q… 75015 48.8 2.28 39 Quai And… 0.96 housenumber #> 2 0.255 64 A… 75012 48.8 2.38 64 Allée de… 0.96 housenumber #> 3 -2.44 20 a… 75007 48.9 2.31 20 Avenue d… 0.96 housenumber #> # … with 11 more variables: result_id <chr>, result_housenumber <chr>, #> # result_name <chr>, result_street <chr>, result_postcode <chr>, #> # result_city <chr>, result_context <chr>, result_citycode <chr>, #> # result_oldcitycode <chr>, result_oldcity <chr>, result_district <chr>