Closed daranzolin closed 6 days ago
mapboxapi doesn't support tidyeval, so you'll need to quote your column names:
library(tibble)
library(mapboxapi)
#> Usage of the Mapbox APIs is governed by the Mapbox Terms of Service.
#> Please visit https://www.mapbox.com/legal/tos/ for more information.
df <- tibble(
address = "34 alta st",
city = "San Francisco",
)
mb_batch_geocode(
df,
address_line1 = "address",
place = "city",
access_token = Sys.getenv("MAPBOX_PUBLIC_TOKEN")
)
#> Simple feature collection with 1 feature and 5 fields
#> Geometry type: POINT
#> Dimension: XY
#> Bounding box: xmin: -122.4037 ymin: 37.80174 xmax: -122.4037 ymax: 37.80174
#> Geodetic CRS: WGS 84
#> # A tibble: 1 × 6
#> address city matched_address accuracy confidence geometry
#> * <chr> <chr> <chr> <chr> <chr> <POINT [°]>
#> 1 34 alta st San … 34 Alta Street… rooftop medium (-122.4037 37.80174)
Created on 2024-09-11 with reprex v2.1.0
Reprex:
Created on 2024-09-11 with reprex v2.0.2