-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.R
More file actions
40 lines (35 loc) · 1.46 KB
/
main.R
File metadata and controls
40 lines (35 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
###################################################
## Part 1, Addendum and Artisanal Annual Reports ##
## ##
## Author: SPC ##
## Year: 2026 ##
###################################################
# Step 1: Load libraries ####
rm(list = ls())
source("utils.R")
get_all_country_codes()
# Step 2: Define params ####
country_codes <- "TO"
r_year <- 2025
report_author <- "Jessica LS"
rewrite_files <- TRUE
reports_list <- c("part1") # options are: c("artisanal", "addendum", "part1")
aceman = FALSE
# Step 3: Read/download data ####
# Use the params above to download data from T2 and Ikasavea or read data if available in your computer
for (country_code in country_codes) {
process_country_data(country_code = country_code,
r_year = r_year,
rewrite_files = rewrite_files)
}
# Step 4: Generate reports ####
res <- build_reports(country_codes = country_codes,
max_year = r_year,
aceman = aceman,
author = report_author,
reports = reports_list,
sc_session = "21",
ccm_num = "22",
report_date = format(Sys.Date(), "%d %b %Y"),
location = "Nuku\\textquotesingle alofa, Tonga",
session_dates = "9--13 March 2025")