Format a df of addresses for upload

Share:

Description

Format a df of addresses for upload

Usage

1
df_to_string(addresses_df)

Arguments

addresses_df

A df with two columns, a unique id and address character strings to be geocoded. Only results with valid lat, lng are returned, so the unique id is used to match back to the data later on.

Value

a long string consisting of all of the addresses to be geocoded formatted for the POST request in geocodeHERE_batch_upload()

Examples

1
2
3
4
addresses <- chicago_landmarks[,"Address"]
addresses <- paste(addresses, "chicago IL")
addresses_df <- data.frame(id=1:length(addresses), addresses=addresses)
address_str <- df_to_string(addresses_df)