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
sophialecuona committed Aug 16, 2024
2 parents f3c268a + a1c3220 commit d60ddde
Show file tree
Hide file tree
Showing 26 changed files with 284,046 additions and 861,252 deletions.
3 changes: 2 additions & 1 deletion globalprep/le/v2024/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,11 @@ Initially, there are three scripts, each with different starting units of value,
- \*\*Citation for paper\*\*  

- Melnychuk, M. C., Clavelle, T., Owashi, B., and Strauss, K. 2016. Reconstruction of global ex-vessel prices of fished species. - ICES Journal of Marine Science. <doi:10.1093/icesjms/fsw169>.

- `eco_tour_prep.Rmd`
- Tourism Revenue in USD per Country per Year (2008 - 2019)

- Tourism direct GDP as a proportion of total GDP (indicator 8.9.1): **UNWTO Dept. of Statistics (UN Tourism)**
- **Tourism direct GDP as a proportion of total GDP (indicator 8.9.1):** **UNWTO Dept. of Statistics (UN Tourism)**

- <https://www.unwto.org/tourism-statistics/economic-contribution-SDG>

Expand Down
15 changes: 11 additions & 4 deletions globalprep/le/v2024/eco/eco_tour_prep.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ editor_options:

### Tourism direct GDP as a proportion of total GDP

Tourism direct GDP as a proportion of total GDP (indicator 8.9.1): UNWTO Dept. of Statistics (UN Tourism)
**Tourism direct GDP as a proportion of total GDP (indicator 8.9.1): UNWTO Dept. of Statistics (UN Tourism)**

- <https://www.unwto.org/tourism-statistics/economic-contribution-SDG>
- A big issue with this data set is that it does not have data for
mainland China. Thus, I was instructed to gapfill using another
data source. I found tourism revenue data on the website for the
National Bureau of Statistics for China

- China Gapfilling -- °ºNational Data: National Bureau of Statistics of China (NBS) <https://data.stats.gov.cn/english/easyquery.htm?cn=C01>
- **China Gapfilling -- National Data: National Bureau of Statistics of China (NBS)** <https://data.stats.gov.cn/english/easyquery.htm?cn=C01>

- Made an account to download data:
- Email:
Expand All @@ -48,8 +48,8 @@ National Bureau of Statistics for China
- Security Question: who has influenced you the most?
- Answer: Melanie Frazier

- Returned to home page, clicked “Annual”, clicked “Tourism” from options on the left, clicked “Year” dropdown menu and selected “LATEST20”, then clicked the download button and selected “csv”. File appeared as “Annual.csv”, which I then renamed to `eco_tour_china_all_metrics_2004-2023.csv`
- Added to new file in `_raw_data` on Mazu → NBS_China
- Return to home page, click “Annual”, click “Tourism” from options on the left, click “Year” dropdown menu and selected “LATEST20”, then clicked the download button and select “.csv”. File appears as “Annual.csv” -- rename this to `eco_tour_china_all_metrics_[start-year]-[end-year].csv`, e.g., `eco_tour_china_all_metrics_2004-2023.csv`
- Add new file to `_raw_data/NBS_China` folder on Mazu

- For this tourism revenue data used for China, I wanted to discern whether or not these numbers included Macao and Hong Kong, as that can sometimes be the case (and would significantly impact my data processing methods). Thankfully, the website where I downloaded the data had information on this:

Expand Down Expand Up @@ -93,6 +93,13 @@ Has sector-level data:

- Downloaded from NOAA Office for Coastal Management; Digital Coast website: <https://coast.noaa.gov/digitalcoast/data/>.



### Coastal population proportion




### Setup

```{r}
Expand Down
344 changes: 182 additions & 162 deletions globalprep/np/v2024/STEP1a_np_ornamentals_prep.Rmd

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions globalprep/np/v2024/STEP1b_np_seaweeds_prep.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ This analysis converts FAO mariculture data into one of the data layers used to

- Updating script throughout to use tidyverse style, reproducible file paths, updated read and write functions

- Added more comments/documentation to explain certain steps

------------------------------------------------------------------------

# Data Source
Expand Down Expand Up @@ -635,11 +637,11 @@ np_new <- readr::read_csv(here(current_np_dir, "output", "np_seaweed_harvest_ton
# Compare yield data for Saint Lucia
np_old_sl <- np_old %>%
dplyr::filter(rgn_id == 122, year == 2021) %>%
dplyr::filter(rgn_id == 122, year == (as.integer(data_years[2]) - 1)) %>%
dplyr::select(rgn_id, taxa_code, tonnes)
np_new_sl <- np_new %>%
filter(rgn_id == 122, year == 2022) %>%
filter(rgn_id == 122, year == as.integer(data_years[2])) %>%
select(rgn_id, taxa_code, tonnes)
yield_sl <- np_old_sl %>%
Expand All @@ -660,17 +662,17 @@ yield_sl <- np_old_sl %>%
# Compare yield data for Vietnam - Vietnam score decreased
np_old_vietnam <- np_old %>%
filter(rgn_id == 206, year == 2020) %>%
filter(rgn_id == 206, year == (as.integer(data_years[2]) - 1)) %>%
select(rgn_id, taxa_code, year, tonnes)
np_new_vietnam <- np_new %>%
filter(rgn_id == 206, year == 2021) %>%
filter(rgn_id == 206, year == as.integer(data_years[2])) %>%
select(rgn_id, taxa_code, year, tonnes)
yield_vietnam <- np_old_vietnam %>%
full_join(np_new_vietnam, by = c("rgn_id","taxa_code")); View(yield_vietnam)
# v2024: huge increase in Elkhorn seamoss: +129091.7 from 2021 to 2022
# ================= v2022 and v2023 code: =====================================
Expand Down
Loading

0 comments on commit d60ddde

Please sign in to comment.