-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,8 @@ if(F){ | |
api_keys_df <- read.csv("~/Dropbox/World Bank/Webscraping/Files for Server/api_keys.csv") | ||
|
||
google_key_df <- api_keys_df |> | ||
dplyr::filter(Service == "Google Directions API", | ||
Account == "[email protected]") | ||
dplyr::filter(Service == "Google Javascript API", | ||
Account == "[email protected]") | ||
google_key <- google_key_df$Key | ||
|
||
# Test ------------------------------------------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
|
||
### Packages | ||
library(dplyr) | ||
library(googleway) | ||
library(htmlwidgets) | ||
|
@@ -19,6 +20,27 @@ files <- file.path("~", "Documents", "Github", "googletraffic", "R") |> | |
pattern = "*.R") | ||
for(file_i in files) source(file_i) | ||
|
||
api_keys_df <- read.csv("~/Dropbox/World Bank/Webscraping/Files for Server/api_keys.csv") | ||
|
||
google_key_df <- api_keys_df |> | ||
dplyr::filter(Service == "Google Javascript API", | ||
Account == "[email protected]") | ||
google_key <- google_key_df$Key | ||
|
||
# Test ------------------------------------------------------------------------- | ||
gt_make_png(location = c(40.717437418183884, -73.99145764250052), | ||
height = 500, | ||
width = 500, | ||
zoom = 16, | ||
out_filename = paste0("~/Desktop/test123.png"), | ||
google_key = google_key) | ||
|
||
r <- gt_make_raster(location = c(40.717437418183884, -73.99145764250052), | ||
height = 500, | ||
width = 500, | ||
zoom = 16, | ||
google_key = google_key) | ||
|
||
nbo <- gadm(country = "KEN", level = 1, path = tempdir()) | ||
nbo <- nbo[nbo$NAME_1 == "Nairobi",] %>% st_as_sf() | ||
|
||
|