data-raw/countryCentroids.R

################################################################################
##
library(devtools)
library(ggmap)
library(gadmr)

##
options(stringsAsFactors = FALSE)

################################################################################
##
register_google(key = "AIzaSyCa7K4CUhyOLBJUrLZPm4qEwv5yyP9zMKQ")

countryCentroid <- data.frame("country" = list_countries$country, geocode(list_countries$country))

write.csv(countryCentroid, "data-raw/countryCentroid.csv", row.names = FALSE)

usethis::use_data(countryCentroid, overwrite = TRUE)
validmeasures/spatialsampler documentation built on Oct. 16, 2021, 3:15 a.m.