Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ramarty committed Sep 4, 2024
1 parent de5bd30 commit 0070d7b
Show file tree
Hide file tree
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
Expand Up @@ -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 -------------------------------------------------------------------------
Expand Down
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)
Expand All @@ -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()

Expand Down

0 comments on commit 0070d7b

Please sign in to comment.