Skip to content

Commit

Permalink
Changes to wd
Browse files Browse the repository at this point in the history
  • Loading branch information
dean-breed committed May 31, 2022
1 parent 30481d2 commit 63d875c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
install.packages('dotenv')
install.packages('httr')
install.packages('dplyr')
install.packages('rstudioapi')
- name: Run budget data script
run: |
source("iati_marker.R")
Expand Down
6 changes: 3 additions & 3 deletions iati_marker.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
list.of.packages <- c("data.table","dotenv", "httr", "dplyr")
list.of.packages <- c("data.table","dotenv", "httr", "dplyr","rstudioapi")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
lapply(list.of.packages, require, character.only=T)
rm(list.of.packages,new.packages)

setwd("C:/git/ukraine")
setwd(dirname(getActiveDocumentContext()$path))

# Note: You will need to create your own account at https://developer.iatistandard.org/ and create a .env file.

Expand Down Expand Up @@ -50,7 +50,7 @@ while(length(docs)==1000){
message(length(docs))
}

filename = paste0("budgets-",Sys.Date())
filename = paste0("budgets-",Sys.time())
saveRDS(results_list, file=paste0(filename,".RData"))

# We now have a dataset of iati-identifiers with their budget information for all budgets 2021 onwards.

0 comments on commit 63d875c

Please sign in to comment.