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 9, 2024
2 parents 2d7acd4 + 8e693df commit 546428d
Show file tree
Hide file tree
Showing 5 changed files with 6,215 additions and 23 deletions.
16 changes: 12 additions & 4 deletions globalprep/le/v2024/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,20 @@ <h2>Aquarium Fishing</h2>
all available years, ornamental freshwater fish were excluded. The
global commodities database is a component of the Global Aquatic Trade
Statistic Collection published by FAO.</li>
<li>v2024: downloaded using on July 3rd, 2024:</li>
<li>v2024: downloaded using on July 3rd, 2024 using the FAO status query
interface (like a data download portal, seems to be relatively
new):</li>
<li><a href="https://www.fao.org/fishery/statistics-query/en/trade_partners/trade_partners_value">Global
aquatic trade - By partner country Value (2019 - 2021)</a></li>
<li>click “download full dataset” (all years – 2019, 2020, and 2021 are
selected by default, no countries or commodities etc. are selected for
any filtering)</li>
<li>under “Trade Flow” in the Dimensions filtering section, select
“Exports”</li>
<li>scroll to the bottom of the page, click the “download” button/icon,
then select “csv”, “Flag enabled” (we clean this later), then “Yes” for
“Include null values”
<ul>
<li>(all years – 2019, 2020, and 2021 are selected by default, no
countries or commodities etc. are selected for any filtering)</li>
</ul></li>
<li><a href="https://www.fao.org/fishery/en/collection/global_commodity_prod">Metadata</a></li>
</ul>
</div>
Expand Down
37 changes: 35 additions & 2 deletions globalprep/le/v2024/cf_dataprep_sl.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ labor_force <- read_csv(here(data_path, "int", "labor_force.csv"))
############################################
#---------- cf OECD data---------------------------
oecd_cf_job_raw <- read_csv(here(oecd_dir, "OECD.TAD.ARP,DSD_FISH_EMP@DF_FISH_EMPL,1.0+.A...._T._T.csv"))
oecd_cf_job_raw <- read_csv(here(oecd_dir, "OECD_2009-2021_employment_fish_aqua_processing_raw.csv"))
#------cf FAO Yearbook Number of Fishers-------
# turn the number of fishers table from the FAO yearbook into a data frame and clean.
Expand Down Expand Up @@ -284,7 +284,7 @@ cf_job_iso %>%
cf_job_iso_agg <- cf_job_iso %>%
group_by(eez_iso3, year) %>%
summarize(value = sum(value))
summarize(value = sum(value, na.rm = TRUE))
length(unique(cf_job_iso_agg$eez_iso3)) # 44
Expand Down Expand Up @@ -325,6 +325,39 @@ plotly::plot_ly(cf_job_prop_lim, x = ~year, y = ~cf_prop_percent, color = ~admin
```


Gapfilling using FAO Yearbook
```{r}
## make sure every place has a region id, cut it out if it doesnt
fao_fisher_jobs_iso <- fao_fisher_jobs %>%
mutate(iso3c = country_regex_to_iso3c(country))
unique(fao_fisher_jobs_iso$country) # 50 is alarming
unique(fao_fisher_jobs_iso$iso3c)
# years are weird: has 2010, then jumps to 2015 and increases sequentially to 2020 from there.
unique(fao_fisher_jobs_iso$year)
# "2010" "2015" "2016" "2017" "2018" "2019" "2020" "2021"
fao_unique <- unique(fao_fisher_jobs_iso$iso3c)
cf_unique <- unique(cf_job_prop_agg$eez_iso3)
in_fao_not_cf <- fao_unique[!fao_unique %in% cf_unique]
in_cf_not_fao <- cf_unique[!cf_unique %in% fao_unique]
in_both <- fao_unique[fao_unique %in% cf_unique]
print("In fao_fisher_jobs_iso but not in cf_job_prop_agg:")
print(in_fao_not_cf)
print("In cf_job_prop_agg but not in fao_fisher_jobs_iso:")
print(in_cf_not_fao)
print("In both:")
print(in_both)
length(fao_unique)
length(cf_unique)
```


# Livelihood: Quality of Jobs -- cf

- note: this data came from many sources and was compiled by ILO. PPP GDP adjustments come from OECD
Expand Down
Loading

0 comments on commit 546428d

Please sign in to comment.