Skip to content

Commit

Permalink
update data
Browse files Browse the repository at this point in the history
  • Loading branch information
ramarty committed May 25, 2024
1 parent c86874b commit 51c595a
Show file tree
Hide file tree
Showing 11 changed files with 2,814 additions and 18 deletions.
4 changes: 2 additions & 2 deletions notebooks/nighttime-lights/02_extract_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for(unit in c("adm0", "adm1", "adm2", "adm3", "city")){
if(unit == "city") unit_sf <- city_buff_sf

#### Loop through time period
for(time_period in c("annually", "monthly", "daily")){
for(time_period in c("annually", "monthly")){ # "daily"

dir.create(file.path(ntl_dir, "aggregated_individual", unit, time_period))

Expand Down Expand Up @@ -92,7 +92,7 @@ for(unit in c("adm0", "adm1", "adm2", "adm3", "city")){

# Append files -----------------------------------------------------------------
for(unit in c("adm0", "adm1", "adm2", "adm3", "city")){
for(time_period in c("annually", "monthly", "daily")){
for(time_period in c("annually", "monthly", "daily")){ # "daily"

ntl_df <- file.path(ntl_dir, "aggregated_individual", unit, time_period) %>%
list.files(full.names = T) %>%
Expand Down
2 changes: 2 additions & 0 deletions notebooks/nighttime-lights/_main.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ library(purrr)
library(stringr)
library(exactextractr)
library(blackmarbler)
library(sparkline)
library(sparklyr)
17 changes: 8 additions & 9 deletions notebooks/nighttime-lights/ntl_analysis.html

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions notebooks/nighttime-lights/ntl_analysis.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ library(sparkline)
library(htmltools)
library(htmlwidgets)
data_dir <- file.path("/Users",
"rmarty",
"Library",
"CloudStorage",
"OneDrive-SharedLibraries-WBG",
"Development Data Partnership - Niger Economic Monitor",
"Data")
# data_dir <- file.path("/Users",
# "rmarty",
# "Library",
# "CloudStorage",
# "OneDrive-SharedLibraries-WBG",
# "Development Data Partnership - Niger Economic Monitor",
# "Data")
data_dir <- file.path("~/Dropbox/World Bank/Side Work/",
"Development Data Partnership - Niger Economic Monitor", "Data")
boundaries_dir <- file.path(data_dir, "Boundaries")
ntl_dir <- file.path(data_dir, "Nighttime Lights")
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 51c595a

Please sign in to comment.