Skip to content

Commit

Permalink
Merge branch 'gh-pages' of https://github.com/OHI-Science/ohiprep_v2024
Browse files Browse the repository at this point in the history
… into gh-pages
  • Loading branch information
annaramji committed Jul 2, 2024
2 parents 54a7f8c + b1bf8f3 commit bad9fa4
Show file tree
Hide file tree
Showing 2 changed files with 1,295 additions and 8 deletions.
26 changes: 18 additions & 8 deletions globalprep/le/v2024/economies_dataprep.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,16 @@ current_year <- 2024 # Update this!!
version_year <- paste0("v",current_year)
data_dir_version_year <- paste0("d", current_year)
data_path <- paste0("globalprep/le/", version_year)
data_path <- here("globalprep", "le", version_year)
# Raw data directory (on Mazu)
raw_data_dir <- here::here(dir_M, "git-annex", "globalprep", "_raw_data")
# UNWTO raw data directory
unwto_dir <- here(raw_data_dir, "UNWTO", data_dir_version_year)
# Output data directory -- for intermediate data products
int_dir <- here(data_path, "int")
```


Expand Down Expand Up @@ -269,21 +272,28 @@ region_names <- region_names_raw %>% select(-Notes)
# join regions & tourism GDP prop ----
gdp_regions_join <- left_join(region_names, gdp_filled, by = c("eez_iso3" = "iso3")) %>%
gdp_regions_join <- left_join(region_names, gdp_filled, by = c("eez_iso3" = "iso3"))
head(gdp_regions_join)
str(gdp_regions_join)
```


Note: remember to add
mutate(sector = "tour", data_source = "UNWTO Dept. of Statistics")

```
at the end

# Saving intermediate data

Note: remember to add
```{r}
#--------Prepping data for int saving -------
tour_revenue_int <- gdp_filled %>%
mutate(sector = "tour", data_source = "UNWTO Dept. of Statistics")

at the end
write_csv(tour_revenue_int, here(int_dir, "tour_revenue.csv"))
```

Loading

0 comments on commit bad9fa4

Please sign in to comment.