Description Usage Arguments Author(s) References Examples
Reverse geocode latitude and longitude columns in a dataset with administrative layers determined by GADM layers
1 |
dataset |
(character), the name of the data frame containing a column of place names. e.g. |
latcol |
(character), the name of the column in the data frame containing LATITUDES |
loncol |
(character), the name of the column in the data frame containing LONGITUDES |
googleapikey |
(character), a valid Google Maps API key. See https://developers.google.com/maps/documentation/javascript/get-api-key to attain one. |
oride |
(logical), if you already have the specified shapefile downloads from GADM for each country in your data frame, you may override the GADM downloads included in a-heat using oride=TRUE. ONLY do this if you are sure you have the GADM shapefiles for every country in your set already in your R working directory. Default is oride=FALSE |
deleteGADM |
(logical), if after geocoding you would like to keep the GADM shapefiles downloaded in your working directory you may use deleteGADM=FALSE. The files can be large, especially if you have many countries in your dataset. Use carefully, could cause many large GADM shapefiles saved to your working directory. The default is deleteGADM=TRUE. |
Neal Thomas Barsch
GADM DATA are attained through the GADM project website. Commercial use of this function is not allowed without prior permission from GADM.org. http://gadm.org/.
1 2 3 4 5 6 7 | spheatGPS("myDataframe", "myLatColumnName","myLonColumnName", "mygoogleapikey")
#Keeping all GADM shapefiles
spheatGPS("myDataframe", "myLatColumnName","myLonColumnName", "mygoogleapikey", deleteGADM=FALSE)
#You already have the GADM shapefiles and don't want to redownload or delete them
spheatGPS("myDataframe", "myLatColumnName","myLonColumnName", "mygoogleapikey", oride=TRUE, deleteGADM=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.