Description Usage Arguments Details Value Examples
View source: R/analysis_functions.R
Use Google Maps API to produce longitude and latitude data
1 | geocode_st(df, api_key)
|
df |
A data frame containing columns with the address (either "Address" or "address") and date (either "Date" or "date") of the cases. |
api_key |
A string. A valid Google Developers Geocode API key. |
A wrapper to functions from package googleway
that checks for errors and
fetches longitude and latitude coordinates using the Google Maps API. Dates are converted
to integer values with t=1 being the earliest date provided.
A data frame with the columns for longitude, latitude, and time.
1 2 3 4 5 6 7 | ## Not run:
#requires working API to run
tmp <- data.frame(address=c("Buckingham palace","Big ben, Westminster","Marble arch, London"),
date = c("01/01/2020","02/01/2020","03/01/2020"))
geocode_st(tmp, api_key = "ENTER_KEY")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.