Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
ramarty committed Sep 4, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent de5bd30 commit 0070d7b
Showing 2 changed files with 24 additions and 2 deletions.
4 changes: 2 additions & 2 deletions make_readme_figures/testing.R
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 -------------------------------------------------------------------------
22 changes: 22 additions & 0 deletions make_readme_figures/testing_from_source.R
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()

0 comments on commit 0070d7b

Please sign in to comment.