geocode_batches: Geocode in batches

View source: R/geocode_batches.R

geocode_batchesR Documentation

Geocode in batches

Description

Geocode in batches

Usage

geocode_batches(
  .,
  batch_size = 990,
  wait_time = 4800,
  n_results = 1,
  unwrap = FALSE,
  geonames_username
)

Arguments

.

data frame

batch_size

size of each batch to geocode

wait_time

in seconds between batches Note: default batch_size and wait_time were set to accomplish the geocoding task optimally within the constraints of geonames free access

n_results

same as geocode

unwrap

as in geocode

geonames_username

as in geocode

Value

df geocoded

Examples

df <- tibble::tribble(
   ~value,  ~location_word,                    ~Country,
   "mumbai region, district of seattle, sichuan province",  "mumbai","India",
   "mumbai region, district of seattle, sichuan province",  "seattle", "USA",
   "mumbai region, district of seattle, sichuan province", "sichuan",  "China, People's Republic"
   )

geocode_batches(df, batch_size = 2, wait_time = 0.4, geonames_username = "rammkripa")


weed documentation built on Oct. 17, 2023, 1:06 a.m.