diff --git a/globalprep/tr/v2024/R/process_UNWTO_arrivals.R b/globalprep/tr/v2024/R/process_UNWTO_arrivals.R new file mode 100644 index 00000000..ccc5b479 --- /dev/null +++ b/globalprep/tr/v2024/R/process_UNWTO_arrivals.R @@ -0,0 +1,288 @@ +library(ohicore) +library(tidyverse) +library(stringr) +library(WDI) +library(here) +library(janitor) +library(plotly) +library(readxl) +library(naniar) +library(countrycode) + +# ---- sources! ---- +source(here("workflow", "R", "common.R")) # file creates objects to process data + +region_data() # for rgns_all and rgns_eez + +regions_shape() # returns spatial shape object named 'regions' which includes land, eez, highseas, and antarctica regions + +# ---- set year and file path info ---- +current_year <- 2024 # Update this in the future!! +version_year <- paste0("v",current_year) +data_dir_version_year <- paste0("d", current_year) +prev_ver_yr <- paste0("d", (current_year - 1)) + +# ---- data directories ---- + +# Raw data directory (on Mazu) +raw_data_dir <- here::here(dir_M, "git-annex", "globalprep", "_raw_data") + +# UNWTO (UN World Tourism) raw data directory +unwto_dir <- here(raw_data_dir, "UNWTO", data_dir_version_year) + +# final output dir +output_dir <- here("globalprep","tr", version_year, "output") + +# process UNWTO arrivals in tourism data +file_path_unwto <- here::here(unwto_dir, "unwto-inbound-arrivals-data.xlsx") +unwto_arrivals <- readxl::read_xlsx(file_path_unwto, skip = 2) # read in the raw data + +unwto_clean <- unwto_arrivals %>% + select(country = `Basic data and indicators`, total = `...6`, subdivision_1 = `...7`, subdivision_2 = `...8`, `1995`:`2021`) %>% # select relevant columns + fill(country, .direction = "down") %>% # add country name to all data associated with that country + pivot_longer(cols = c("total", "subdivision_1", "subdivision_2"), + values_to = "metric", + values_drop_na = TRUE) %>% # make the metrics into one column + select(-name) %>% # get rid of the name column since it's just the titles of the metrics which are already there + select(country, metric, everything()) %>% # reorder things + replace_with_na_all(condition = ~.x == "..") %>% # swap .. with NAs + pivot_longer(cols = 3:ncol(.), names_to = "year", + values_to = "tourism_arrivals_ct") %>% # make the years not columns anymore + pivot_wider(names_from = metric, values_from = tourism_arrivals_ct) %>% + mutate(overnights = as.numeric(`Overnights visitors (tourists)`), + same_day = as.numeric(`Same-day visitors (excursionists)`), + total = as.numeric(`Total arrivals`), + tourism_arrivals_ct = as.numeric(NA)) %>% # rename metrics so easier to work with, make numeric, and add a new column to fill with the new calculated values later + select(country, year, overnights, same_day, total, tourism_arrivals_ct) %>% # select columns needed for analysis (cruise passengers seem to be included in same-day) + group_by(country, year) %>% # group by county and year + mutate( + tourism_arrivals_ct = case_when( + !is.na(overnights) ~ overnights, + is.na(overnights) & !is.na(same_day) & !is.na(total) ~ total - same_day, + TRUE ~ tourism_arrivals_ct + ), + total = case_when( + !is.na(total) ~ total, + is.na(total) & !is.na(same_day) & !is.na(overnights) ~ overnights + same_day, + TRUE ~ total + ) + ) %>% # v2023: NAs are 601 out of 6021 + mutate(arrivals_method = ifelse(is.na(overnights) & !is.na(same_day) & !is.na(total), "UNWTO - subtraction", NA)) %>% + mutate(arrivals_gapfilled = ifelse(arrivals_method == "UNWTO - subtraction", "gapfilled", NA)) %>% # prepare a "gapfilled" column to indicate "gapfilled" or NA + ungroup() %>% # ungroup since not needed anymore + select(country, year, tourism_arrivals_ct, total, arrivals_method, arrivals_gapfilled) %>% # select only needed columns + mutate(country = str_to_title(country), # make countries look nice + tourism_arrivals_ct = round(as.numeric(tourism_arrivals_ct) * 1000), + total = round(as.numeric(total)*1000)) # since the units were in thousands + +# Macquerie, Andaman and Nicobar, Azores, Madeira, Prince Edwards Islands, Oecussi Ambeno, Canary Islands all duplicated with their governing regions. Aside from the uninhabited ones, I think it actually makes sense to give them the same score as their vassal states, given that places like Azores and Canary Islands probably make up a decent chunk of Portugal and Spain tourism... +# get UNWTO data to have OHI region names +unwto_match_iso3c <- unwto_clean %>% + mutate(iso3c = countrycode::countrycode(sourcevar = country, origin = "country.name", destination = "iso3c")) %>% + left_join(rgns_eez, by = c("iso3c" = "eez_iso3")) %>% + dplyr::select(rgn_id, year, arrivals_method, arrivals_gapfilled, tourism_arrivals_ct, total) %>% + filter(!is.na(rgn_id)) + +unwto_clean_names_bonaire <- name_2_rgn(df_in = unwto_clean %>% filter(country == "Bonaire"), # do this just for Bonaire since it is the only region not matching above + fld_name = 'country', + # flds_unique = c('year'), + keep_fld_name = TRUE) %>% + dplyr::select(rgn_id, year, arrivals_method, arrivals_gapfilled, tourism_arrivals_ct, total)#### losing lots of regions here for some reason... most concerndely USA + + +unwto_clean_names <- rbind(unwto_clean_names_bonaire, unwto_match_iso3c) %>% # rbind back together. I would've used the name_2_rgns fxn for everything, but it was excluding a lot of regiosn for some reason... + left_join(rgns_eez) %>% + dplyr::select(rgn_id, rgn_name, year, arrivals_method, arrivals_gapfilled, tourism_arrivals_ct, total) + +# fix duplicates if there are any +unwto_dupe_fix <- unwto_clean_names %>% + group_by(rgn_id, year, arrivals_method, arrivals_gapfilled) %>% + summarize(sum_fix = ifelse(all(is.na(tourism_arrivals_ct)), NA, sum(tourism_arrivals_ct, na.rm = TRUE)), + sum_fix_2 = ifelse(all(is.na(total)), NA, sum(total, na.rm = TRUE))) %>% + mutate(arrivals_method = ifelse(is.na(arrivals_method) & !is.na(sum_fix), "UNWTO", arrivals_method)) %>% + rename(tourism_arrivals_ct = sum_fix, + total = sum_fix_2) + +# check out things so far +summary(unwto_dupe_fix) # v2023: 828 NAs in arrivals (before filtering the years down and gapfilling), 1708 in `total` + +# gapfill arrivals +# downfill then upfill missing values using a linear model of the average increase per years across all years of data for 1995-2019 +# for 2020 and 2021, use the global average proportion increase or decrease and add to the previous years value + +test <- unwto_dupe_fix %>% + filter(year %in% c(2020, 2021)) %>% + filter(!is.na(tourism_arrivals_ct) & !is.na(total)) %>% + pivot_wider(names_from = year, values_from = c(tourism_arrivals_ct, total)) %>% + mutate(tourism_ct_diff = (tourism_arrivals_ct_2021 - tourism_arrivals_ct_2020)/tourism_arrivals_ct_2020) %>% + mutate(total_diff = (total_2021 - total_2020)/total_2020) + +gf_2021_tourism <- mean(test$tourism_ct_diff, na.rm = TRUE) # global average increase for 2021 tourist + +gf_2021_total <- mean(test$total_diff, na.rm = TRUE) # global average increase for 2021 total + +# +# plot(test$total_diff, test$tourism_ct_diff) # looks pretty linear, so thats good, we can use the same method of gapfilling +# mean(test$total_diff, na.rm = TRUE) # 0.08301438 average increase +# mean(test$tourism_ct_diff, na.rm = TRUE) # 0.2832816 average increase +# ## ok, lets use these values to gapfill 2021 if it is NA and 2020 exists. So increase by X proportion (0.08 or 0.28) + +test <- unwto_dupe_fix %>% + filter(year %in% c(2019, 2020)) %>% + filter(!is.na(tourism_arrivals_ct) & !is.na(total)) %>% + pivot_wider(names_from = year, values_from = c(tourism_arrivals_ct, total)) %>% + mutate(tourism_ct_diff = (tourism_arrivals_ct_2020 - tourism_arrivals_ct_2019)/tourism_arrivals_ct_2019) %>% + mutate(total_diff = (total_2020 - total_2019)/total_2019) + +gf_2020_tourism <- mean(test$tourism_ct_diff, na.rm = TRUE) # global average decerease for 2020 tourst +gf_2020_total <- mean(test$total_diff, na.rm = TRUE) # global average decrease for 2020 total + +# +# plot(test$total_diff, test$tourism_ct_diff) # looks pretty linear, so thats good, we can use the same method of gapfilling +# mean(test$total_diff, na.rm = TRUE) # -0.7015468 average decrease +# mean(test$tourism_ct_diff, na.rm = TRUE) # -0.7030777 average decrease +# ## ok, lets use these values to gapfill 2020 if it is NA and 2019 exists. So decrease by X proportion ~70% + + +unwto_upfill <- unwto_dupe_fix %>% + filter(year < 2020) %>% + group_by(rgn_id) %>% + arrange(rgn_id, year) %>% + tidyr::fill(tourism_arrivals_ct, .direction = "up") %>% + tidyr::fill(total, .direction = "up") %>% # fill in any values that are empty from early years with values from the nearest year. Doing this because doesn't make sense to add earlier years based on a trend + mutate(arrivals_method = ifelse(is.na(arrivals_method) & !is.na(tourism_arrivals_ct), "nearby year", arrivals_method)) %>% + mutate(arrivals_gapfilled = ifelse(arrivals_method == "nearby year", "gapfilled", arrivals_gapfilled)) + +## calculate regional average increase or decrease in number of total arrivals +lm_coef_data_total <- unwto_dupe_fix %>% + filter(!(year %in% c(2020, 2021))) %>% + group_by(rgn_id) %>% + filter(!is.na(total)) %>% + summarize(lm_coef_total = if (n() > 1) lm(total ~ year)$coefficients[2] else 0, .groups = 'drop') # give it an addition of 0 if it is stagnant + +## calculate regional average increase or decrease in number of tourism arrivals +lm_coef_data_tourism <- unwto_dupe_fix %>% + filter(!(year %in% c(2020, 2021))) %>% + group_by(rgn_id) %>% + filter(!is.na(tourism_arrivals_ct)) %>% + summarize(lm_coef_tourism = lm(tourism_arrivals_ct ~ year)$coefficients[2]) + + +# Initialize a flag to check if there are still NAs +na_flag <- TRUE + +# filter out any regions with all nas for each year, as these can't be gapfilled +all_nas_tourism <- unwto_upfill %>% + group_by(rgn_id) %>% + filter(all(is.na(tourism_arrivals_ct))) %>% + dplyr::select(rgn_id, year, tourism_arrivals_ct, arrivals_method, arrivals_gapfilled) + +unwto_gapfill_lm_2019_tourism <- unwto_upfill %>% + left_join(lm_coef_data_tourism) %>% + ungroup() %>% + filter(!(rgn_id %in% c(all_nas_tourism$rgn_id))) %>% + dplyr::select(rgn_id, year, tourism_arrivals_ct, arrivals_method, arrivals_gapfilled, lm_coef_tourism) + + +## now lets fill in any values down with the linear model average increase per year for tourists +while(na_flag) { + + unwto_gapfill_lm_2019_tourism <- unwto_gapfill_lm_2019_tourism %>% + group_by(rgn_id) %>% + arrange(year) %>% + mutate( + tourism_arrivals_ct = case_when( + is.na(tourism_arrivals_ct) & !is.na(lag(tourism_arrivals_ct)) ~ lag(tourism_arrivals_ct) + lm_coef_tourism, + TRUE ~ tourism_arrivals_ct + ) + ) %>% + mutate(arrivals_method = ifelse(is.na(arrivals_method) & !is.na(tourism_arrivals_ct), "linear model", arrivals_method)) %>% + mutate(arrivals_gapfilled = ifelse(arrivals_method == "linear model", "gapfilled", arrivals_gapfilled)) %>% + ungroup() + + # Check if there are still NAs left in either column + na_flag <- any(is.na(unwto_gapfill_lm_2019_tourism$tourism_arrivals_ct)) +} + +unwto_gapfill_lm_2019_tourism_all <- unwto_gapfill_lm_2019_tourism %>% + dplyr::select(-lm_coef_tourism) %>% + rbind(all_nas_tourism) + +### Now do the same thing for total column +# Initialize a flag to check if there are still NAs +na_flag <- TRUE + +all_nas_total <- unwto_upfill %>% + group_by(rgn_id) %>% + filter(all(is.na(total))) %>% + dplyr::select(rgn_id, year, total) + +unwto_gapfill_lm_2019_total <- unwto_upfill %>% + filter(year < 2020) %>% + group_by(rgn_id) %>% + arrange(rgn_id, year) %>% + tidyr::fill(total, .direction = "up") %>% # fill in any values that are empty from early years with values from the nearest year + left_join(lm_coef_data_total) %>% + ungroup() %>% + filter(!(rgn_id %in% c(all_nas_total$rgn_id))) %>% + dplyr::select(rgn_id, year, total, lm_coef_total) + + +## now lets fill in any values down with the linear model average increase per year for tourists +while(na_flag) { + + unwto_gapfill_lm_2019_total <- unwto_gapfill_lm_2019_total %>% + group_by(rgn_id) %>% + arrange(year) %>% + mutate( + total = case_when( + is.na(total) & !is.na(lag(total)) ~ lag(total) + lm_coef_total, + TRUE ~ total + ) + ) %>% + ungroup() + + # Check if there are still NAs left in either column + na_flag <- any(is.na(unwto_gapfill_lm_2019_total$total)) +} + +unwto_gapfill_lm_2019_total_all <- unwto_gapfill_lm_2019_total %>% + dplyr::select(-lm_coef_total) %>% + mutate(total = ifelse(rgn_id == 67 & total < 0, unwto_gapfill_lm_2019_total %>% + filter(rgn_id == 67, year == 2009 ) %>% pull(total) , total)) %>% # fix libya, as it was being given negative values with the gapfill. Just give it its latest year (downfill) + rbind(all_nas_total) + + +unwto_2020_2021 <- unwto_dupe_fix %>% + filter(year > 2019) # lets fix 2020 and 2021 now + +unwto_all_gf <- unwto_gapfill_lm_2019_tourism_all %>% + left_join(unwto_gapfill_lm_2019_total_all) %>% + rbind(unwto_2020_2021) %>% + group_by(rgn_id) %>% + arrange(rgn_id, year) %>% + # apply global average proportional increase or decrease for 2020 and 2021, because of covid pandemic messing up trends... + mutate(tourism_arrivals_ct = ifelse(year == 2020 & is.na(tourism_arrivals_ct), lag(tourism_arrivals_ct, n = 1) + lag(tourism_arrivals_ct, n = 1)*gf_2020_tourism, tourism_arrivals_ct), + total = ifelse(year == 2020 & is.na(total), lag(total, n = 1) + lag(total, n = 1)*gf_2020_total, total)) %>% + + mutate(tourism_arrivals_ct = ifelse(year == 2021 & is.na(tourism_arrivals_ct), lag(tourism_arrivals_ct, n = 1) + lag(tourism_arrivals_ct, n = 1)*gf_2021_tourism, tourism_arrivals_ct), + total = ifelse(year == 2021 & is.na(total), lag(total, n = 1) + lag(total, n = 1)*gf_2021_total, total)) %>% + mutate(arrivals_method = ifelse(is.na(arrivals_method) & !is.na(tourism_arrivals_ct), "2020 and 2021 gapfill method", arrivals_method)) %>% + mutate(arrivals_gapfilled = ifelse(arrivals_method == "2020 and 2021 gapfill method", "gapfilled", arrivals_gapfilled)) %>% + filter(year >= 2008) %>% # get only the year we need and beyond + drop_na(tourism_arrivals_ct) # remove any remaining NAs (any remaining have all NAs for that region) + # drop_na(total) # keep these NAs, we will just give these regions a perfect score... + + + +## old way +# unwto_dupe_fix_downup_gf <- unwto_dupe_fix %>% +# fill(tourism_arrivals_ct, .direction = "downup") %>% +# fill(total, .direction = "downup") %>% +# mutate(arrivals_method = ifelse(is.na(arrivals_method) & !is.na(tourism_arrivals_ct), "nearby year", arrivals_method)) %>% +# mutate(arrivals_gapfilled = ifelse(arrivals_method == "nearby year", "gapfilled", arrivals_gapfilled)) %>% +# filter(year >= 2008) %>% # get only the year we need and beyond +# drop_na(tourism_arrivals_ct) # remove any remaining NAs (any remaining have all NAs for that region) +# +# # check out things so far +# summary(unwto_dupe_fix_downup_gf) # NAs should be 0 now diff --git a/globalprep/tr/v2024/R/process_WB_generalized_fxn.R b/globalprep/tr/v2024/R/process_WB_generalized_fxn.R new file mode 100644 index 00000000..282d1242 --- /dev/null +++ b/globalprep/tr/v2024/R/process_WB_generalized_fxn.R @@ -0,0 +1,30 @@ +# v2023: THIS ENDED UP NOT BEING USED OTHER THAN IN EXPLORATION, BUT WAS LEFT HERE IN CASE CODE BECOMES RELEVANT IN THE FUTURE +# the WDI function that we use functions similarly to this + +process_wb_data <- function(file_path, value_name, df_name) { + # read in the csv needing processing + df <- read_csv(file_path, skip = 4) + + # select needed columns + df_clean <- df %>% + select(country = `Country Name`, `1960`:`2022`) + + # get in long format + df_clean_long <- df_clean %>% + pivot_longer(cols = -country, + names_to = "year", + values_to = "values") %>% + mutate(country = str_to_title(country)) + + # run name_2_rgn to get correct names + df_clean_names <- name_2_rgn(df_in = df_clean_long, + fld_name = "country", + flds_unique = "year") + + # fix any duplicates + df_dupe_fix <- df_clean_names %>% + group_by(rgn_id, year) %>% + summarize({{ value_name }} := ifelse(all(is.na(values)), NA, sum(values, na.rm = TRUE))) + + assign(df_name, df_dupe_fix, envir = .GlobalEnv) # add to environment +} \ No newline at end of file diff --git a/globalprep/tr/v2024/R/process_area_of_coastline.R b/globalprep/tr/v2024/R/process_area_of_coastline.R new file mode 100644 index 00000000..e799ff35 --- /dev/null +++ b/globalprep/tr/v2024/R/process_area_of_coastline.R @@ -0,0 +1,14 @@ +# read in area of coastline data +inland_filepath <- file.path("globalprep", "lsp", paste0("v", version_year), "int", "area_protected_1km.csv") +inland_data <- read_csv(inland_filepath) +offshore_filepath <- file.path("globalprep", "lsp", paste0("v", version_year), "int", "area_protected_3nm.csv") +offshore_data <- read_csv(offshore_filepath) + +# get combined value of inland and offshore for each ohi region +inland_offshore <- inland_data %>% + left_join(offshore_data, by = join_by(rgn_id, year, rgn_name)) %>% + select(rgn_id, year, a_tot_km2.x, a_tot_km2.y) %>% + group_by(rgn_id, year) %>% + mutate(total_inland_offshore_area = a_tot_km2.x + a_tot_km2.y, + year = as.character(year)) %>% + select(rgn_id, year, total_inland_offshore_area) diff --git a/globalprep/tr/v2024/R/unwto_arrivals_gapfill_model_testing.R b/globalprep/tr/v2024/R/unwto_arrivals_gapfill_model_testing.R new file mode 100644 index 00000000..f30c0a57 --- /dev/null +++ b/globalprep/tr/v2024/R/unwto_arrivals_gapfill_model_testing.R @@ -0,0 +1,78 @@ +# note: file paths are not filled into this since code/data was not ultimately used other than in exploration for v2023 +library(tidyverse) +library(ohicore) + +# exploring if UNWTO guests/overnights data or WB arrivals data can gapfill UNWTO arrivals + +# start with UNWTO guests/overnights +file_path_guests_overnights <- "put file path to the data here" # this file was "unwto-inbound-accommodation-data.xlsx" in v2023 +guests_overnights <- readxl::read_xlsx(file_path_guests_overnights, skip = 2) + +unwto_guests_overnights_clean <- guests_overnights %>% + select(country = `Basic data and indicators`, total_type = `...6`, person_type = `...7`, `1995`:`2021`) %>% # select relevant columns + fill(country, .direction = "down") %>% # add country name to all data associated with that country + fill(total_type, .direction = "down") %>% # add total vs. hotels to all data associated with each + pivot_longer(cols = "total_type", + values_to = "metric", + values_drop_na = TRUE) %>% # make the metrics into one column + filter(!is.na(person_type)) %>% + select(-name) %>% # get rid of the name column since it's just the titles of the metrics which are already there + select(country, metric, person_type, everything()) %>% # reorder things + replace_with_na_all(condition = ~.x == "..") %>% # swap .. with NAs + pivot_longer(cols = 4:ncol(.), names_to = "year", + values_to = "tourism_guests_ct") %>% # make the years not columns anymore + group_by(country, metric, year) %>% + summarize(tourism_guests_ct = sum(as.numeric(tourism_guests_ct))) %>% # get totals by country/metric/year + group_by(country, year) %>% # group by county and year + mutate( + tourism_guests_ct = ifelse( + metric == "Total" & is.na(tourism_guests_ct), + tourism_guests_ct[metric == "Hotels and similar establishments"], + tourism_guests_ct # fill total with values from hotels if NA because it is not autofilled + ) + ) %>% + ungroup() %>% # ungroup since not needed anymore + filter(metric == "Total") %>% # get metric needed + select(-metric) %>% # don't need metric since we are down to one + mutate(country = str_to_title(country), # make countries look nice + tourism_guests_ct = round(as.numeric(tourism_guests_ct) * 1000)) # since the units were in thousands + +unwto_guests_overnights_clean_names <- name_2_rgn(df_in = unwto_guests_overnights_clean, + fld_name = 'country', + flds_unique = c('year')) # clean to ohi names + +unwto_guests_overnights_dupe_fix <- unwto_guests_overnights_clean_names %>% + group_by(rgn_id, year) %>% + summarize(sum_fix = ifelse(all(is.na(tourism_guests_ct)), NA, sum(tourism_guests_ct, na.rm = TRUE))) %>% + mutate(method = ifelse(!is.na(sum_fix), "UNWTO", NA)) %>% + rename(tourism_guests_ct = sum_fix) + +file_path_arrivals <- "path to arrivals data used in the tourism goal (after gapfilling previous/next year)" +arrivals_data <- read_csv(file_path_arrivals) + +joined_data_guests_overnights <- arrivals_data %>% # combine with equivalent arrivals data + mutate(year = as.character(year)) %>% + left_join(unwto_guests_overnights_dupe_fix) + +model_guests_overnights <- lm(tourism_arrivals_ct ~ tourism_guests_ct, data = joined_data) +summary(model_guests_overnights) # check out the r-squared + +test_fill_guests_overnights <- joined_data_guests_overnights %>% + filter(is.na(tourism_arrivals_ct)) # check out if there are guests/overnights data points for places where arrivals are missing. v2023: there are no data points for where arrivals are missing + + +# try using World Bank arrivals data instead +file_path_wb_arrivals <- "file path to WB arrivals data" # file was named "API_ST.INT.ARVL_DS2_en_csv_v2_5728898.csv" in v2023 + +source(here(paste0("globalprep/tr/v", version_year, "/R/process_WB_generalized_fxn.R"))) +process_wb_data(file_path_wb_arrivals, "arrivals", "final_wb_arrivals_df") + +joined_data_wb_arrivals <- arrivals_data %>% + mutate(year = as.character(year)) %>% + left_join(final_wb_arrivals_df) + +model_wb_arrivals <- lm(tourism_arrivals_ct ~ arrivals, data = joined_data_wb_arrivals) +summary(model_wb_arrivals) + +test_fill_wb_arrivals <- joined_data_wb_arrivals %>% + filter(is.na(tourism_arrivals_ct)) # check out if there are WB arrivals data points for places where arrivals are missing. v2023: there are no data points for where arrivals are missing \ No newline at end of file diff --git a/globalprep/tr/v2024/README.md b/globalprep/tr/v2024/README.md new file mode 100644 index 00000000..ee871c0f --- /dev/null +++ b/globalprep/tr/v2024/README.md @@ -0,0 +1,16 @@ +## Ocean Health Index: Tourism and Recreation + + +Model details on dataprep [here](http://ohi-science.github.io/ohiprep_v2023/globalprep/tr/v2023/tr_data_prep.html). + +More information about the Tourism and Recreation Goal [here](http://ohi-science.org/goals/#tourism-and-recreation) + +## Layers created +* tr_arrivals_props_tourism +* tr_sustainability + +Our [data managment SOP](https://rawgit.com/OHI-Science/ohiprep/master/src/dataOrganization_SOP.html) describes how we manage OHI global data, including a description of the file structure. + +Please see our [citation policy](https://oceanhealthindex.org/global-scores/data-download/) if you use OHI data or methods. + +Thank you! \ No newline at end of file diff --git a/globalprep/tr/v2024/output/tr_arrivals_props_tourism.csv b/globalprep/tr/v2024/output/tr_arrivals_props_tourism.csv new file mode 100644 index 00000000..f9a307d0 --- /dev/null +++ b/globalprep/tr/v2024/output/tr_arrivals_props_tourism.csv @@ -0,0 +1,2283 @@ +rgn_id,year,Ap +5,2008,0.40625 +5,2009,0.43043478260869567 +5,2010,0.35106382978723405 +5,2011,0.3218390804597701 +5,2012,0.28717948717948716 +5,2013,0.21862348178137653 +5,2014,0.20226843100189035 +5,2015,0.20430107526881722 +5,2016,0.1856 +5,2017,0.19329073482428116 +5,2018,0.20833333333333334 +5,2019,0.27637130801687765 +5,2020,0.2080536912751678 +5,2021,0.07684244806902404 +6,2008,0.46032553407934895 +6,2009,0.4465631929046563 +6,2010,0.40891880521665963 +6,2011,0.37766171153073524 +6,2012,0.3370716510903427 +6,2013,0.3081232492997199 +6,2014,0.331306990881459 +6,2015,0.313588850174216 +6,2016,0.27047781569965873 +6,2017,0.32822362488728585 +6,2018,0.3300970873786408 +6,2019,0.47109375 +6,2020,0.2669902912621359 +6,2021,0.3163611990153897 +7,2008,0.9476744186046515 +7,2009,0.94818652849741 +7,2010,0.9579439252336458 +7,2011,0.9744680851063842 +7,2012,0.9335937500000013 +7,2013,0.8808664259927812 +7,2014,0.6744966442953032 +7,2015,0.6771159874608162 +7,2016,0.6823529411764719 +7,2017,0.7119113573407216 +7,2018,0.7303664921465984 +7,2019,0.7171215880893316 +7,2020,0.36582328402106734 +7,2021,0.053738121779941965 +8,2008,1 +8,2009,1 +8,2010,1 +8,2011,1 +8,2012,1 +8,2013,1 +8,2014,1 +8,2015,1 +8,2016,1 +8,2017,1 +8,2018,1 +8,2019,1 +8,2020,1 +8,2021,1 +9,2008,1 +9,2009,1 +9,2010,1 +9,2011,1 +9,2012,1 +9,2013,1 +9,2014,1 +9,2015,1 +9,2016,1 +9,2017,1 +9,2018,1 +9,2019,1 +9,2020,1 +9,2021,1 +11,2008,0.9230769230769231 +11,2009,0.8307692307692308 +11,2010,0.7076923076923077 +11,2011,0.7076923076923077 +11,2012,0.7076923076923077 +11,2013,0.7538461538461538 +11,2014,0.7538461538461538 +11,2015,0.9692307692307692 +11,2016,0.8307692307692308 +11,2017,0.759493670886076 +11,2018,0.7311827956989247 +11,2019,0.5700934579439252 +11,2020,0.6 +11,2021,0.7109498945145848 +13,2008,0.9773299748110831 +13,2009,0.9745762711864406 +13,2010,0.9894459102902374 +13,2011,0.9853372434017595 +13,2012,0.9950124688279302 +13,2013,0.9931662870159453 +13,2014,0.9891304347826086 +13,2015,0.991858037578288 +13,2016,0.9905838041431262 +13,2017,0.9939393939393939 +13,2018,0.9980694980694981 +13,2019,0.9938398357289527 +13,2020,0.9775280898876404 +13,2021,1 +15,2008,0.9933544303797468 +15,2009,0.9930875576036866 +15,2010,0.9929478138222849 +15,2011,0.9979617834394905 +15,2012,0.9974323062558357 +15,2013,0.9965935703640622 +15,2014,0.987737584304108 +15,2015,0.9871110292763764 +15,2016,0.9880774962742176 +15,2017,0.9830734966592427 +15,2018,0.9691725256895619 +15,2019,0.9807669476433575 +15,2020,0.98342175066313 +15,2021,0.1004172403640087 +16,2008,1 +16,2009,1 +16,2010,1 +16,2011,1 +16,2012,1 +16,2013,1 +16,2014,1 +16,2015,1 +16,2016,0.9558592332809265 +16,2017,0.9288712422007918 +16,2018,0.9162881245944168 +16,2019,0.9249947179378804 +16,2020,1 +16,2021,1 +17,2008,0.95 +17,2009,0.9603174603174603 +17,2010,0.958904109589041 +17,2011,0.9575757575757575 +17,2012,0.96 +17,2013,0.9560439560439561 +17,2014,0.9528795811518325 +17,2015,0.9195979899497487 +17,2016,0.9040404040404041 +17,2017,0.7637362637362637 +17,2018,0.717948717948718 +17,2019,0.7582938388625592 +17,2020,1 +17,2021,1 +18,2008,0.9330143540669856 +18,2009,0.8958677685950414 +18,2010,0.9132947976878613 +18,2011,0.9196185286103542 +18,2012,0.8920377867746289 +18,2013,0.8569570871261378 +18,2014,0.8873239436619719 +18,2015,0.8688147295742232 +18,2016,0.822429906542056 +18,2017,0.8208373904576436 +18,2018,0.8223062381852552 +18,2019,0.9226006191950464 +18,2020,0.8744047619047619 +18,2021,0.17587595640990142 +19,2008,1 +19,2009,1 +19,2010,1 +19,2011,1 +19,2012,1 +19,2013,1 +19,2014,1 +19,2015,1 +19,2016,1 +19,2017,1 +19,2018,1 +19,2019,1 +19,2020,1 +19,2021,1 +20,2008,1 +20,2009,1 +20,2010,1 +20,2011,1 +20,2012,1 +20,2013,0.9425919842312747 +20,2014,0.932755949866216 +20,2015,0.9209492140266021 +20,2016,0.8690407145342768 +20,2017,0.9621325734853029 +20,2018,0.9857952694337656 +20,2019,0.9840598754499229 +20,2020,0.9988090512107979 +20,2021,1 +24,2008,1 +24,2009,1 +24,2010,1 +24,2011,1 +24,2012,1 +24,2013,1 +24,2014,1 +24,2015,1 +24,2016,1 +24,2017,1 +24,2018,1 +24,2019,1 +24,2020,1 +24,2021,1 +25,2008,1 +25,2009,1 +25,2010,1 +25,2011,1 +25,2012,1 +25,2013,1 +25,2014,1 +25,2015,1 +25,2016,1 +25,2017,1 +25,2018,1 +25,2019,1 +25,2020,1 +25,2021,0.10610930588636357 +26,2008,0.983249581239531 +26,2009,0.9760151085930123 +26,2010,0.9821458935555177 +26,2011,1 +26,2012,1 +26,2013,1 +26,2014,1 +26,2015,1 +26,2016,1 +26,2017,1 +26,2018,1 +26,2019,1 +26,2020,1 +26,2021,1 +28,2008,1 +28,2009,1 +28,2010,1 +28,2011,1 +28,2012,1 +28,2013,1 +28,2014,1 +28,2015,1 +28,2016,1 +28,2017,1 +28,2018,1 +28,2019,1 +28,2020,1 +28,2021,1 +31,2008,0.9190751445086706 +31,2009,0.8876404494382022 +31,2010,0.9162303664921466 +31,2011,0.9238095238095239 +31,2012,0.9629629629629629 +31,2013,0.9704641350210971 +31,2014,0.9748953974895398 +31,2015,0.9324324324324325 +31,2016,0.9099099099099099 +31,2017,0.9162303664921466 +31,2018,0.8938271604938272 +31,2019,0.897196261682243 +31,2020,0.9228915662650602 +31,2021,1 +32,2008,0.7186932849364791 +32,2009,0.7658802177858439 +32,2010,0.7622504537205081 +32,2011,0.8548094373865699 +32,2012,0.8112522686025408 +32,2013,0.7549909255898367 +32,2014,0.7368421052631579 +32,2015,0.7731397459165155 +32,2016,0.8312159709618875 +32,2017,0.9219600725952813 +32,2018,0.9320557491289199 +32,2019,0.8878535773710483 +32,2020,0.8494707957663661 +32,2021,0.9085085909805865 +37,2008,0.9587628865979382 +37,2009,0.9786516853932584 +37,2010,0.9780334728033473 +37,2011,0.9816887080366226 +37,2012,0.9806910569105691 +37,2013,0.9783251231527094 +37,2014,0.9746478873239437 +37,2015,0.9804088586030665 +37,2016,0.9755164498852333 +37,2017,0.9788475565280816 +37,2018,0.9776380153738644 +37,2019,0.9753173483779972 +37,2020,0.9790874524714829 +37,2021,0.9972268441486412 +39,2008,0.997080291970803 +39,2009,0.9954476479514416 +39,2010,0.9993690851735015 +39,2011,0.9997852233676976 +39,2012,0.9906928645294726 +39,2013,0.9982253771073647 +39,2014,1 +39,2015,1 +39,2016,1 +39,2017,1 +39,2018,1 +39,2019,1 +39,2020,1 +39,2021,1 +40,2008,0.8326996197718631 +40,2009,0.8327137546468402 +40,2010,0.8537859007832899 +40,2011,0.8770491803278688 +40,2012,0.8879082082965578 +40,2013,0.901060070671378 +40,2014,0.9171171171171171 +40,2015,0.902157551430005 +40,2016,0.9460332103321033 +40,2017,0.9414590747330961 +40,2018,0.9258230860769536 +40,2019,0.9442525900345338 +40,2020,0.9407407407407408 +40,2021,0.3317215955620085 +41,2008,0.8290479499652537 +41,2009,0.8538866160140269 +41,2010,0.9357298474945533 +41,2011,0.9448584202682563 +41,2012,0.9578422484134179 +41,2013,0.9573604060913705 +41,2014,0.9486007995431183 +41,2015,0.9498164014687882 +41,2016,0.9556851311953353 +41,2017,0.9557463672391017 +41,2018,0.9557491289198606 +41,2019,0.99311362518445645 +41,2020,0.9927007299270073 +41,2021,0.8961748633879781 +42,2008,1 +42,2009,0.5780141843971631 +42,2010,0.6950354609929078 +42,2011,0.7978723404255319 +42,2012,0.9078014184397163 +42,2013,0.6950354609929078 +42,2014,0.7872340425531915 +42,2015,0.8652482269503546 +42,2016,0.8798798798798799 +42,2017,0.8947368421052632 +42,2018,0.8083333333333333 +42,2019,0.7901234567901234 +42,2020,0.7841561423650976 +42,2021,0.9291595444957166 +43,2008,0.9484621778886118 +43,2009,0.934228187919463 +43,2010,0.9136109384711001 +43,2011,0.9599561162918266 +43,2012,0.9462302746931619 +43,2013,0.9434210526315789 +43,2014,0.9340740740740741 +43,2015,0.9432684165961049 +43,2016,0.9462686567164179 +43,2017,0.9413388543823327 +43,2018,0.6879012345679011 +43,2019,0.6939970717423131 +43,2020,0.7433513446487974 +43,2021,0.622795093773819 +46,2008,1 +46,2009,1 +46,2010,1 +46,2011,1 +46,2012,1 +46,2013,1 +46,2014,1 +46,2015,1 +46,2016,1 +46,2017,1 +46,2018,1 +46,2019,1 +46,2020,1 +46,2021,1 +47,2008,0.9884057971014493 +47,2009,0.9932367149758454 +47,2010,0.9903381642512077 +47,2011,0.705531914893617 +47,2012,0.6817472698907956 +47,2013,0.7482993197278912 +47,2014,0.8353858784893268 +47,2015,0.921356783919598 +47,2016,0.705762081784389 +47,2017,0.5792035398230124 +47,2018,0.4959657701711534 +47,2019,0.437056367432155 +47,2020,0.4348145179668887 +47,2021,0.5152188928032826 +48,2008,0.89155844155844155 +48,2009,0.9602272727272727 +48,2010,0.9606666666666667 +48,2011,0.7307968413496052 +48,2012,0.7240373395565928 +48,2013,0.7238689547581904 +48,2014,0.7240449438202248 +48,2015,0.7247532270311313 +48,2016,0.7280947926410976 +48,2017,0.7287602265575834 +48,2018,0.7097470697100555 +48,2019,0.713063320022818 +48,2020,0.7162255466052935 +48,2021,0.8486674613461404 +49,2008,1 +49,2009,1 +49,2010,1 +49,2011,1 +49,2012,1 +49,2013,1 +49,2014,1 +49,2015,1 +49,2016,1 +49,2017,1 +49,2018,1 +49,2019,1 +49,2020,1 +49,2021,1 +50,2008,0.8329288254219112 +50,2009,0.8181545161048127 +50,2010,0.8330134357005758 +50,2011,0.8987702839756593 +50,2012,0.8228951478812919 +50,2013,0.7912109962877496 +50,2014,0.7935680139069969 +50,2015,0.8241275075570211 +50,2016,0.8638866280461531 +50,2017,0.8657494491320471 +50,2018,0.8727376209447922 +50,2019,0.8636901241868716 +50,2020,0.8476034412126178 +50,2021,1 +51,2008,0.0546875 +51,2009,0.05837264150943396 +51,2010,0.039746543778801845 +51,2011,0.04825977753857194 +51,2012,0.052365159713737126 +51,2013,0.04938073025575036 +51,2014,0.030330882352941176 +51,2015,0.02622100561878692 +51,2016,0.02877391920623671 +51,2017,0.024706358849736737 +51,2018,0.023507287259050307 +51,2019,0.01786339754816112 +51,2020,0.03979639055992596 +51,2021,0.04715539945106764 +52,2008,0.4592747074498899 +52,2009,0.4473535718316217 +52,2010,0.3316599732262383 +52,2011,0.5888294711824124 +52,2012,0.49168940709501363 +52,2013,0.43260940739932335 +52,2014,0.37925755836203595 +52,2015,0.4099276111685626 +52,2016,0.3927938570584761 +52,2017,0.38447336029541057 +52,2018,0.36247405562474055 +52,2019,0.3479793870355302 +52,2020,0.43321110529072815 +52,2021,0.6040974529346622 +53,2008,1 +53,2009,1 +53,2010,1 +53,2011,1 +53,2012,1 +53,2013,1 +53,2014,1 +53,2015,1 +53,2016,1 +53,2017,1 +53,2018,1 +53,2019,1 +53,2020,1 +53,2021,1 +54,2008,0.8404701496401388 +54,2009,0.8404701496401388 +54,2010,0.8404701496401388 +54,2011,0.8404701496401388 +54,2012,0.8404701496401388 +54,2013,0.8404701496401388 +54,2014,0.8404701496401388 +54,2015,0.8720550924247916 +54,2016,0.86833540729396 +54,2017,0.8790644347626692 +54,2018,0.8753680928460073 +54,2019,0.852820188276244 +54,2020,0.886318654131618 +54,2021,1 +55,2008,0.3032229965156799 +55,2009,0.2781906160891737 +55,2010,0.2895594033944806 +55,2011,0.30886980185390034 +55,2012,0.31652885588930285 +55,2013,0.3841356215989975 +55,2014,0.4359943512211358 +55,2015,0.4831835792597511 +55,2016,0.5464250654450303 +55,2017,0.6264512462450325 +55,2018,0.6521353746978302 +55,2019,0.6911541230104842 +55,2020,0.5638391375176751 +55,2021,0.7850130724373291 +56,2008,1 +56,2009,1 +56,2010,1 +56,2011,1 +56,2012,1 +56,2013,1 +56,2014,1 +56,2015,1 +56,2016,1 +56,2017,1 +56,2018,1 +56,2019,1 +56,2020,1 +56,2021,1 +57,2008,0.3032229965156799 +57,2009,0.2781906160891737 +57,2010,0.2895594033944806 +57,2011,0.30886980185390034 +57,2012,0.31652885588930285 +57,2013,0.3841356215989975 +57,2014,0.4359943512211358 +57,2015,0.4831835792597511 +57,2016,0.5464250654450303 +57,2017,0.6264512462450325 +57,2018,0.6521353746978302 +57,2019,0.6911541230104842 +57,2020,0.5638391375176751 +57,2021,0.7850130724373291 +58,2008,0.5855636326405242 +58,2009,0.5677754926604207 +58,2010,0.5619239631336406 +58,2011,0.5663746257069979 +58,2012,0.585602478395565 +58,2013,0.5877594908506166 +58,2014,0.6060908683640708 +58,2015,0.6207094342371214 +58,2016,0.6517337163922085 +58,2017,0.6726176294190622 +58,2018,0.6653596451758051 +58,2019,0.6618768328445748 +58,2020,0.5199945070035704 +58,2021,0.6039201255059945 +59,2008,1 +59,2009,1 +59,2010,1 +59,2011,1 +59,2012,1 +59,2013,1 +59,2014,1 +59,2015,1 +59,2016,1 +59,2017,1 +59,2018,1 +59,2019,1 +59,2020,1 +59,2021,1 +61,2008,0.9096774193548387 +61,2009,0.9165393205595392 +61,2010,0.9060185185185186 +61,2011,0.9516396157668102 +61,2012,1 +61,2013,1 +61,2014,1 +61,2015,1 +61,2016,1 +61,2017,1 +61,2018,1 +61,2019,1 +61,2020,1 +61,2021,1 +62,2008,0.9598002192715313 +62,2009,0.9630527652695994 +62,2010,0.9524200164068909 +62,2011,0.9548242027800491 +62,2012,0.9537131230925737 +62,2013,0.9707218088704223 +62,2014,0.9786808794137242 +62,2015,0.965376588882565 +62,2016,0.9676875526833381 +62,2017,0.9834488734835355 +62,2018,0.9839859075986869 +62,2019,0.9864978259211229 +62,2020,0.9914346895074947 +62,2021,1 +64,2008,1 +64,2009,1 +64,2010,1 +64,2011,1 +64,2012,1 +64,2013,1 +64,2014,1 +64,2015,1 +64,2016,1 +64,2017,1 +64,2018,1 +64,2019,1 +64,2020,1 +64,2021,1 +65,2008,0.2286158631415241 +65,2009,0.22049689440993797 +65,2010,0.14108527131782955 +65,2011,0.16408668730650172 +65,2012,0.24265842349304517 +65,2013,0.26388888888888934 +65,2014,0.2403697996918341 +65,2015,0.6907692307692325 +65,2016,0.6912442396313384 +65,2017,0.8006134969325179 +65,2018,0.8453292496171546 +65,2019,0.9480122324159058 +65,2020,1 +65,2021,1 +66,2008,0.9885974914481186 +66,2009,0.9938650306748467 +66,2010,0.9933774834437086 +66,2011,0.9907881269191402 +66,2012,0.9948293691830403 +66,2013,0.9943872778297475 +66,2014,0.9866803278688525 +66,2015,0.9927021696252466 +66,2016,0.992616899097621 +66,2017,0.9920058139534884 +66,2018,0.9920174165457184 +66,2019,0.9920289855072464 +66,2020,0.9869404435789946 +66,2021,1 +67,2008,0.04473684210526316 +67,2009,0.32352941176470845 +67,2010,0.4803921568627454 +67,2011,0.6372549019607847 +67,2012,0.7941176470588241 +67,2013,0.9509803921568635 +67,2014,1 +67,2015,1 +67,2016,1 +67,2017,1 +67,2018,1 +67,2019,1 +67,2020,1 +67,2021,1 +68,2008,0.7046943231441049 +68,2009,0.7350746268656716 +68,2010,0.737741046831956 +68,2011,0.738517745302714 +68,2012,0.71898355754858 +68,2013,0.7858917039244908 +68,2014,0.7816836262719704 +68,2015,0.7482165337809484 +68,2016,0.7584876543209876 +68,2017,0.7724184782608695 +68,2018,0.8041460396039604 +68,2019,0.7823245240125035 +68,2020,0.9178272980501393 +68,2021,0.872072072072072 +69,2008,0.3064046579330422 +69,2009,0.2798815316268246 +69,2010,0.2723125743752479 +69,2011,0.2695919104369809 +69,2012,0.257676423056204 +69,2013,0.26382686362074886 +69,2014,0.2950688440601985 +69,2015,0.2958199356913183 +69,2016,0.2637928497866706 +69,2017,0.2522650789541807 +69,2018,0.2502893890675241 +69,2019,0.23195876288659795 +69,2020,0.19850187265917604 +69,2021,0.2467733608673206 +70,2008,0.5804597701149425 +70,2009,0.5685967657798644 +70,2010,0.5747310597390707 +70,2011,0.5753005909924598 +70,2012,0.5905731975234672 +70,2013,0.5422694788216839 +70,2014,0.5444521019986216 +70,2015,0.5198384831460674 +70,2016,0.5269269606193201 +70,2017,0.5279088689991863 +70,2018,0.5347256754516824 +70,2019,0.5466164181550057 +70,2020,0.6035398230088496 +70,2021,0.616793893129771 +71,2008,0.6773702097738193 +71,2009,0.7289470341674076 +71,2010,0.7221160735610223 +71,2011,0.7262710891770917 +71,2012,0.7376790346227585 +71,2013,0.7504351610095735 +71,2014,0.7770220002125624 +71,2015,0.761940538800043 +71,2016,0.7781969068276122 +71,2017,0.7660400137978614 +71,2018,0.7497574385510997 +71,2019,0.6194231994901211 +71,2020,0.25940076412628194 +71,2021,0.3199777406789093 +72,2008,0.6140825998645885 +72,2009,0.7541914191419117 +72,2010,0.7980794878634275 +72,2011,0.8218368151359845 +72,2012,0.8222250220486299 +72,2013,0.8476119216859925 +72,2014,0.837242359630416 +72,2015,0.7865180580859469 +72,2016,0.7443998826176238 +72,2017,0.7213069741900024 +72,2018,0.6955631399317376 +72,2019,0.6572766289504458 +72,2020,0.49790500652761277 +72,2021,0.47274378810488543 +73,2008,0.9471194458523399 +73,2009,0.9415623974881672 +73,2010,0.9463219783672187 +73,2011,0.9491015562329537 +73,2012,0.9520530929481492 +73,2013,0.9517407118732139 +73,2014,0.9888343974584375 +73,2015,0.9504877108719499 +73,2016,1 +73,2017,1 +73,2018,1 +73,2019,1 +73,2020,1 +73,2021,1 +74,2008,0.8271317829457364 +74,2009,0.7113333333333334 +74,2010,0.5250984251968503 +74,2011,0.6758849557522124 +74,2012,0.599123234291281 +74,2013,0.5821558336697618 +74,2014,0.587330135891287 +74,2015,0.5730593607305936 +74,2016,0.6113480437604302 +74,2017,0.6277032238161345 +74,2018,0.6604192697487158 +74,2019,0.6575718353611183 +74,2020,0.7184401850627892 +74,2021,0.916327716443928 +75,2008,0.8828181912790093 +75,2009,0.8653934173844298 +75,2010,0.8792817450443725 +75,2011,0.872834725901773 +75,2012,0.9182793982682256 +75,2013,0.947973102785783 +75,2014,0.9610644893021849 +75,2015,0.9541650671785029 +75,2016,0.9708023882335809 +75,2017,0.9760614582618835 +75,2018,0.9834053827918003 +75,2019,0.9801604668125455 +75,2020,0.9287403903015967 +75,2021,1 +76,2008,0.9567730746997238 +76,2009,0.9504722921914358 +76,2010,0.9505106524835591 +76,2011,0.9424787184856809 +76,2012,0.9465199522736312 +76,2013,0.9481698903690324 +76,2014,0.9563744684940063 +76,2015,0.9602082015858345 +76,2016,0.9800045297181869 +76,2017,0.9902818014221754 +76,2018,0.9925183787652072 +76,2019,0.9892747405646705 +76,2020,0.9951787615052282 +76,2021,0.9962049335863378 +77,2008,0.781182563659905 +77,2009,0.7890169667141562 +77,2010,0.7790337283500456 +77,2011,0.7828906732550958 +77,2012,1 +77,2013,1 +77,2014,1 +77,2015,1 +77,2016,1 +77,2017,1 +77,2018,1 +77,2019,1 +77,2020,1 +77,2021,1 +78,2008,1 +78,2009,1 +78,2010,1 +78,2011,1 +78,2012,1 +78,2013,1 +78,2014,1 +78,2015,1 +78,2016,1 +78,2017,1 +78,2018,1 +78,2019,1 +78,2020,1 +78,2021,1 +79,2008,0.8477257745550428 +79,2009,0.8470802919708029 +79,2010,0.8138792102206737 +79,2011,0.8387864366448543 +79,2012,0.8198863636363637 +79,2013,0.8367231638418079 +79,2014,0.9003383574284836 +79,2015,0.9002894821486008 +79,2016,0.9446254071661238 +79,2017,0.9352834584519804 +79,2018,0.9389382547277284 +79,2019,0.928032619775739 +79,2020,0.9368658399098083 +79,2021,0.9875621890547264 +80,2008,0.7925119331742243 +80,2009,0.7415970564836913 +80,2010,0.7461714399363564 +80,2011,0.8167760540970564 +80,2012,0.7715791567223548 +80,2013,0.8910103420843277 +80,2014,0.9077537903757416 +80,2015,0.9036915064716244 +80,2016,0.8834384239962951 +80,2017,0.9016279301084181 +80,2018,0.9108309143686503 +80,2019,0.9218761946772533 +80,2020,0.9957331893059681 +80,2021,0.9645152826971009 +81,2008,0.9137210186240973 +81,2009,0.9033755274261603 +81,2010,0.8869387755102041 +81,2011,0.9108910891089109 +81,2012,0.9354838709677419 +81,2013,0.9158415841584159 +81,2014,0.95426114151681 +81,2015,0.9564748201438849 +81,2016,0.9698721850273889 +81,2017,0.9738666666666667 +81,2018,0.9788767395626242 +81,2019,0.9659946563031333 +81,2020,0.5143513985637688 +81,2021,0.6094634542539009 +82,2008,0.8781690140845071 +82,2009,0.921875 +82,2010,0.9064956557716177 +82,2011,0.842087312414734 +82,2012,0.8981217985202049 +82,2013,0.8774570024570024 +82,2014,0.9096106724748162 +82,2015,0.9160009682885499 +82,2016,0.859375 +82,2017,0.9071903087143416 +82,2018,0.9009617006917496 +82,2019,0.9566031845145176 +82,2020,0.9796839729119639 +82,2021,0.9694146598699244 +96,2008,0.48 +96,2009,0.49333333333333335 +96,2010,0.52 +96,2011,0.6933333333333334 +96,2012,0.8 +96,2013,0.8526315789473684 +96,2014,0.8301886792452831 +96,2015,0.7741935483870968 +96,2016,0.9166666666666666 +96,2017,0.864406779661017 +96,2018,0.8636363636363636 +96,2019,0.8873239436619719 +96,2020,0.9230769230769231 +96,2021,0.9090909090909091 +98,2008,0.22492401215805471 +98,2009,0.45592705167173253 +98,2010,0.6139817629179332 +98,2011,0.9118541033434651 +98,2012,0.7142857142857143 +98,2013,0.993920972644377 +98,2014,0.9969596266704377 +98,2015,0.9963503649635036 +98,2016,0.9970501474926253 +98,2017,0.9980582524271845 +98,2018,1 +98,2019,1 +98,2020,1 +98,2021,1 +99,2008,0.1830574488802337 +99,2009,0.8558558558558559 +99,2010,0.8963963963963963 +99,2011,0.9414414414414415 +99,2012,0.9482758620689655 +99,2013,0.9166666666666666 +99,2014,0.9132075471698113 +99,2015,0.9139784946236559 +99,2016,0.9143835616438356 +99,2017,0.9153094462540716 +99,2018,0.9161490683229814 +99,2019,0.9169139465875371 +99,2020,0.9180790960451978 +99,2021,1 +100,2008,0.31155778894472363 +100,2009,0.4723618090452261 +100,2010,0.9748743718592965 +100,2011,0.9732142857142857 +100,2012,0.9884169884169884 +100,2013,0.9942028985507246 +100,2014,0.9868995633187773 +100,2015,0.9821428571428571 +100,2016,0.9906103286384976 +100,2017,0.9867549668874173 +100,2018,0.9873417721518988 +100,2019,0.8633879781420758 +100,2020,0.8589592910862452 +100,2021,1 +101,2008,0.8628359592215014 +101,2009,0.8909090909090909 +101,2010,0.8833034111310593 +101,2011,0.883061049011178 +101,2012,0.8666666666666667 +101,2013,0.8862094951017332 +101,2014,0.9237228831350595 +101,2015,0.9327956989247311 +101,2016,0.9471308833010961 +101,2017,0.948134092346616 +101,2018,0.9499694935936547 +101,2019,0.966686856450636 +101,2020,0.9064671298770711 +101,2021,0.8909299655568312 +102,2008,0.9859183883235687 +102,2009,0.7356273604699958 +102,2010,0.7143236308944528 +102,2011,0.689344465569976 +102,2012,0.7030377228556125 +102,2013,0.6660846486939517 +102,2014,0.6571920165175499 +102,2015,0.6381880733944955 +102,2016,0.664241782950863 +102,2017,0.6868113522537562 +102,2018,0.6979472140762464 +102,2019,0.6911874028519295 +102,2020,0.7209386095816395 +102,2021,0.8468468468468469 +103,2008,1 +103,2009,1 +103,2010,1 +103,2011,1 +103,2012,1 +103,2013,1 +103,2014,1 +103,2015,1 +103,2016,1 +103,2017,1 +103,2018,1 +103,2019,1 +103,2020,1 +103,2021,1 +106,2008,1 +106,2009,1 +106,2010,1 +106,2011,1 +106,2012,1 +106,2013,1 +106,2014,1 +106,2015,1 +106,2016,1 +106,2017,1 +106,2018,1 +106,2019,1 +106,2020,1 +106,2021,1 +108,2008,0.48 +108,2009,0.4259927797833935 +108,2010,0.4 +108,2011,0.3619631901840491 +108,2012,0.380327868852459 +108,2013,0.4097222222222222 +108,2014,0.38620689655172413 +108,2015,0.3685092127303183 +108,2016,0.38006230529595014 +108,2017,0.39244186046511625 +108,2018,0.3681462140992167 +108,2019,0.3341614906832298 +108,2020,0.8190661478599222 +108,2021,0.8514150943396226 +110,2008,0.3343195266272189 +110,2009,0.2876210979547901 +110,2010,0.2622264509990485 +110,2011,0.24248389405869722 +110,2012,0.2409090909090909 +110,2013,0.2238660380425947 +110,2014,0.22848101265822784 +110,2015,0.24476439790575916 +110,2016,0.2392657621707901 +110,2017,0.23663624511082137 +110,2018,0.246602234974328 +110,2019,0.24924137931034482 +110,2020,0.24575090554471998 +110,2021,0.42408376963350786 +111,2008,0.46499339498018494 +111,2009,0.40578034682080927 +111,2010,0.3125695216907675 +111,2011,0.3504950495049505 +111,2012,0.3013429752066116 +111,2013,0.2718428437792329 +111,2014,0.26917293233082706 +111,2015,0.2933130699088146 +111,2016,0.3464506172839506 +111,2017,0.33499597747385357 +111,2018,0.3014354066985646 +111,2019,0.30456535334584117 +111,2020,0.44411447084233263 +111,2021,0.9375 +112,2008,0.9863713798977853 +112,2009,0.9897119341563786 +112,2010,0.9901263823064771 +112,2011,0.9896907216494846 +112,2012,0.9915700737618546 +112,2013,0.9919636617749825 +112,2014,0.9890510948905109 +112,2015,0.9903954802259887 +112,2016,0.991519082065353 +112,2017,0.9871078642028362 +112,2018,0.9940577249575552 +112,2019,0.9969597754911131 +112,2020,0.9990791896869244 +112,2021,1 +113,2008,0.1632543103448276 +113,2009,0.15178571428571427 +113,2010,0.15270413573700956 +113,2011,0.18070175438596492 +113,2012,0.17605248769819573 +113,2013,0.20046484601975595 +113,2014,0.1921726041144004 +113,2015,0.18315889628924834 +113,2016,0.18359561278016215 +113,2017,0.19469026548672566 +113,2018,0.19421140939597314 +113,2019,0.21550985432733505 +113,2020,0.18484848484848485 +113,2021,0.02420292991049893 +114,2008,0.3403693931398417 +114,2009,0.4685230024213075 +114,2010,0.32156368221941994 +114,2011,0.3689217758985201 +114,2012,0.36392075078206465 +114,2013,0.39473684210526316 +114,2014,0.41255764455480665 +114,2015,0.4336134453781513 +114,2016,0.38594969644405897 +114,2017,0.37004754358161646 +114,2018,0.3353338334583646 +114,2019,0.3049040511727079 +114,2020,0.6304347826086957 +114,2021,0.7470125703232957 +115,2008,0.8933782267115601 +115,2009,0.8892849186901315 +115,2010,0.9211701652523447 +115,2011,0.9252256123764504 +115,2012,0.9310344827586207 +115,2013,0.9170903402424716 +115,2014,0.9220588235294118 +115,2015,0.9136890194158916 +115,2016,0.8803811493573644 +115,2017,0.8481359649122807 +115,2018,0.8699509998675672 +115,2019,0.8537748344370861 +115,2020,0.8751819505094615 +115,2021,0.9374882673174395 +116,2008,0.7128333013619796 +116,2009,0.720951302378256 +116,2010,0.7275633706325645 +116,2011,0.7233032747982914 +116,2012,0.7312365975696926 +116,2013,0.7534441805225653 +116,2014,0.7284560143626571 +116,2015,0.7012472777667789 +116,2016,0.7467519488307016 +116,2017,0.7130099451999188 +116,2018,0.72018779342723 +116,2019,0.6448996146826201 +116,2020,0.6742400824317362 +116,2021,0.7989181924705798 +117,2008,0.37044967880085655 +117,2009,0.3605600933488915 +117,2010,0.3919239904988123 +117,2011,0.40673886883273164 +117,2012,0.46613545816733065 +117,2013,0.49326145552560646 +117,2014,0.49935316946959896 +117,2015,0.4262472885032538 +117,2016,0.36298932384341637 +117,2017,0.3743016759776536 +117,2018,0.21452513966480447 +117,2019,0.337877094972067 +117,2020,0.31072684172728937 +117,2021,0.36818535891477744 +118,2008,0.53125 +118,2009,0.5178571428571429 +118,2010,0.5254237288135594 +118,2011,0.532258064516129 +118,2012,0.5038759689922481 +118,2013,0.45695364238410596 +118,2014,0.4011299435028249 +118,2015,0.3924731182795699 +118,2016,0.44886363636363635 +118,2017,0.452317880794702 +118,2018,0.632183908045977 +118,2019,0.572289156626506 +118,2020,0.6180048661800487 +118,2021,0.9895470383275261 +119,2008,0.2401500938086304 +119,2009,0.15145985401459855 +119,2010,0.15705128205128205 +119,2011,0.14384508990318118 +119,2012,0.15615615615615616 +119,2013,0.1539568345323741 +119,2014,0.13814180929095354 +119,2015,0.1138996138996139 +119,2016,0.10995260663507109 +119,2017,0.09631490787269682 +119,2018,0.09780907668231612 +119,2019,0.10840108401084012 +119,2020,0.09754479097544791 +119,2021,0.11558243142406988 +120,2008,0.3082271147161066 +120,2009,0.2478813559322034 +120,2010,0.2918781725888325 +120,2011,0.2841981132075472 +120,2012,0.30158730158730157 +120,2013,0.3127413127413127 +120,2014,0.3229571984435798 +120,2015,0.2796420581655481 +120,2016,0.30320366132723114 +120,2017,0.2375 +120,2018,0.25281954887218044 +120,2019,0.29082125603864734 +120,2020,0.4528985507246377 +120,2021,0.6776 +121,2008,0.8809523809523809 +121,2009,0.863013698630137 +121,2010,0.7792207792207793 +121,2011,0.7297297297297297 +121,2012,0.7380111055022716 +121,2013,0.8275862068965517 +121,2014,0.822429906542056 +121,2015,0.6691729323308271 +121,2016,0.6444444444444445 +121,2017,0.510752688172043 +121,2018,0.6107784431137725 +121,2019,0.538860103626943 +121,2020,0.5844155844155844 +121,2021,1 +122,2008,0.32 +122,2009,0.2830957230142566 +122,2010,0.31097560975609756 +122,2011,0.32842105263157895 +122,2012,0.34533183352080987 +122,2013,0.3463626492942454 +122,2014,0.342451874366768 +122,2015,0.33462657613967023 +122,2016,0.3670886075949367 +122,2017,0.36278195488721804 +122,2018,0.33905579399141633 +122,2019,0.3475409836065574 +122,2020,0.30219653179190753 +122,2021,0.67003367003367 +123,2008,0.17307692307692307 +123,2009,0.12335526315789473 +123,2010,0.12941176470588237 +123,2011,0.18181818181818182 +123,2012,0.22701149425287356 +123,2013,0.2508038585209003 +123,2014,0.22027027027027027 +123,2015,0.20949720670391062 +123,2016,0.21910112359550563 +123,2017,0.3130434782608696 +123,2018,0.3165829145728643 +123,2019,0.2795031055900621 +123,2020,0.15714285714285714 +123,2021,0.18620116284905797 +124,2008,0.4875536480686695 +124,2009,0.44974003466204504 +124,2010,0.4444444444444444 +124,2011,0.4785172704296546 +124,2012,0.5090218423551757 +124,2013,0.47173308619091753 +124,2014,0.48285449490268767 +124,2015,0.5021204410517388 +124,2016,0.515077424612877 +124,2017,0.49368029739776953 +124,2018,0.5014749262536873 +124,2019,0.5414078674948241 +124,2020,0.3799926713081715 +124,2021,0.45025958263809973 +125,2008,0.3037383177570093 +125,2009,0.24782608695652175 +125,2010,0.24719101123595505 +125,2011,0.2639821029082774 +125,2012,0.33783783783783783 +125,2013,0.39143730886850153 +125,2014,0.3875968992248062 +125,2015,0.35469107551487417 +125,2016,0.3291139240506329 +125,2017,0.358974358974359 +125,2018,0.3516068052930057 +125,2019,0.3574144486692015 +125,2020,0.24976958525345622 +125,2021,0.29595610048149384 +126,2008,0.9066390041493776 +126,2009,0.7846441947565543 +126,2010,0.7918367346938775 +126,2011,0.8778004073319755 +126,2012,0.9027777777777778 +126,2013,0.9293361884368309 +126,2014,0.9054945054945055 +126,2015,0.8477842003853564 +126,2016,0.8313008130081301 +126,2017,0.8494623655913979 +126,2018,0.7485029940119761 +126,2019,0.8104166666666667 +126,2020,0.6737588652482269 +126,2021,0.2684914866470303 +127,2008,0.336 +127,2009,0.2767527675276753 +127,2010,0.3116883116883117 +127,2011,0.3557692307692308 +127,2012,0.37 +127,2013,0.36 +127,2014,0.3463414634146341 +127,2015,0.36231884057971014 +127,2016,0.34801762114537443 +127,2017,0.2508250825082508 +127,2018,0.2247191011235955 +127,2019,0.21287128712871287 +127,2020,0.17419354838709677 +127,2021,0.42680776014109345 +129,2008,0.7917460317460318 +129,2009,0.7682458386683739 +129,2010,0.7670915411355735 +129,2011,0.7350299401197605 +129,2012,0.7698945349952061 +129,2013,0.7529518619436876 +129,2014,0.7570498915401301 +129,2015,0.826478652565609 +129,2016,0.8074821353509878 +129,2017,0.7322208978943187 +129,2018,0.7177322074788902 +129,2019,0.7028869286287089 +129,2020,0.6398763523956723 +129,2021,0.7686567164179104 +130,2008,0.867164798671648 +130,2009,0.8328280640970117 +130,2010,0.8416833667334669 +130,2011,0.8677751385589866 +130,2012,0.9217151848937845 +130,2013,0.9193487315410829 +130,2014,0.9155797101449276 +130,2015,0.9175577785443256 +130,2016,0.9129213483146067 +130,2017,0.9161250386877128 +130,2018,0.9106549954723815 +130,2019,0.9325609031491384 +130,2020,0.8826864369821195 +130,2021,0.9796363636363636 +131,2008,0.8486646884272997 +131,2009,0.9227722772277228 +131,2010,0.9439775910364145 +131,2011,0.9447415329768271 +131,2012,0.9570154095701541 +131,2013,0.9654359780047133 +131,2014,0.9568345323741008 +131,2015,0.9519230769230769 +131,2016,0.9423558897243107 +131,2017,0.9126659856996936 +131,2018,0.8895184135977338 +131,2019,0.8900343642611683 +131,2020,0.810126582278481 +131,2021,0.7119078104993598 +132,2008,0.9104125736738703 +132,2009,0.8924122310305775 +132,2010,0.8259847148736038 +132,2011,0.8671477079796265 +132,2012,0.895645028759244 +132,2013,0.8816955684007707 +132,2014,0.8904396371249128 +132,2015,0.919311776920795 +132,2016,0.9170068027210885 +132,2017,0.9151873767258383 +132,2018,0.9142597225380942 +132,2019,0.9201059368792761 +132,2020,0.9040114613180515 +132,2021,0.9912603495860166 +133,2008,0.5566944266495836 +133,2009,0.526117054751416 +133,2010,0.4391857506361323 +133,2011,0.4703023758099352 +133,2012,0.4703100367840252 +133,2013,0.464728056004308 +133,2014,0.4169068203650336 +133,2015,0.42044911610129 +133,2016,0.3761220825852783 +133,2017,0.396455223880597 +133,2018,0.3646147223417994 +133,2019,0.3127429805615551 +133,2020,0.30493273542600896 +133,2021,0.5556900726392252 +134,2008,0.7386666666666667 +134,2009,0.7361673414304993 +134,2010,0.7160647571606475 +134,2011,0.7246022031823746 +134,2012,0.7220943613348677 +134,2013,0.7041712403951701 +134,2014,0.7131495227995758 +134,2015,0.7105930055752661 +134,2016,0.6988304093567251 +134,2017,0.6924788607031598 +134,2018,0.6613958990536277 +134,2019,0.6691928760894278 +134,2020,0.7765205091937766 +134,2021,0.8488857938718662 +135,2008,0.24670783663984164 +135,2009,0.2538049157239562 +135,2010,0.28418727807401806 +135,2011,0.3090239264775788 +135,2012,0.30492905445022084 +135,2013,0.30923175416133164 +135,2014,0.36210853631450357 +135,2015,0.36833889979226203 +135,2016,0.3698248869303027 +135,2017,0.3954846047770989 +135,2018,0.42812729929427856 +135,2019,0.4622302527565037 +135,2020,0.4855265216711 +135,2021,0.5753083822768364 +136,2008,0.8903790087463557 +136,2009,0.8047292143401983 +136,2010,0.8085260115606936 +136,2011,0.8089260808926081 +136,2012,0.8048289738430584 +136,2013,0.8073878627968337 +136,2014,0.7883841288096607 +136,2015,0.7898123324396783 +136,2016,0.8315844700944386 +136,2017,0.7863207547169812 +136,2018,0.7402327514546966 +136,2019,0.68453125 +136,2020,0.6661616161616162 +136,2021,0.904054054054054 +138,2008,0.7973653622626888 +138,2009,0.7982096232748974 +138,2010,0.7798507462686567 +138,2011,0.7875113670809336 +138,2012,0.7814387699066447 +138,2013,0.7890274314214464 +138,2014,0.7914820285573609 +138,2015,0.788860990641406 +138,2016,0.7935565917761763 +138,2017,0.8076923076923077 +138,2018,0.8207652303120356 +138,2019,0.8288151658767773 +138,2020,0.8016085790884718 +138,2021,1 +139,2008,0.9957264957264957 +139,2009,0.9911816578483245 +139,2010,0.983177570093458 +139,2011,0.952 +139,2012,0.9311969839773798 +139,2013,0.9087557603686636 +139,2014,0.8862461220268872 +139,2015,0.8945578231292517 +139,2016,0.882525697503671 +139,2017,0.9953379953379954 +139,2018,0.9529411764705885 +139,2019,0.9221658206429786 +139,2020,0.9174356368361585 +139,2021,1 +143,2008,0.8948306595365418 +143,2009,0.8774422735346359 +143,2010,0.8747763864042933 +143,2011,0.9012738853503185 +143,2012,0.8797385620915033 +143,2013,0.897 +143,2014,0.9047186932849365 +143,2015,0.9280057595392368 +143,2016,0.9476467477525119 +143,2017,0.9456013599660008 +143,2018,0.9420418006430868 +143,2019,0.9141689373297003 +143,2020,0.996516393442623 +143,2021,1 +147,2008,0.8634361233480177 +147,2009,0.8421052631578947 +147,2010,0.8603351955307262 +147,2011,0.8316326530612245 +147,2012,0.8047619047619048 +147,2013,0.7663551401869159 +147,2014,0.793859649122807 +147,2015,0.7698744769874477 +147,2016,0.7966804979253111 +147,2017,0.7834645669291339 +147,2018,0.8193181818181818 +147,2019,0.79 +147,2020,0.8612975391498882 +147,2021,1 +148,2008,0.46987951807228917 +148,2009,0.46987951807228917 +148,2010,0.5662650602409639 +148,2011,0.6385542168674698 +148,2012,0.5903614457831325 +148,2013,0.7108433734939759 +148,2014,0.6024096385542169 +148,2015,0.47560975609756095 +148,2016,0.75 +148,2017,0.7733333333333333 +148,2018,0.7888888888888889 +148,2019,0.6583333333333333 +148,2020,0.3909043500846322 +148,2021,0.46318901076326935 +151,2008,0.6029776674937966 +151,2009,0.5831265508684863 +151,2010,0.5732009925558312 +151,2011,0.5472154963680388 +151,2012,0.450199203187251 +151,2013,0.42190669371196754 +151,2014,0.4186046511627907 +151,2015,0.4309978768577495 +151,2016,0.5248041775456919 +151,2017,0.4728132387706856 +151,2018,0.38996138996138996 +151,2019,0.32764505119453924 +151,2020,0.051459860810751185 +151,2021,0.060975637691897955 +152,2008,0.9672131147540983 +152,2009,0.9457364341085271 +152,2010,0.9384615384615385 +152,2011,0.9453125 +152,2012,0.9333333333333333 +152,2013,0.928 +152,2014,0.9121212121212121 +152,2015,0.920863309352518 +152,2016,0.9178082191780822 +152,2017,0.9240506329113924 +152,2018,0.9534883720930233 +152,2019,0.9502762430939227 +152,2020,0.9665271966527197 +152,2021,1 +153,2008,1 +153,2009,1 +153,2010,1 +153,2011,1 +153,2012,1 +153,2013,1 +153,2014,1 +153,2015,1 +153,2016,1 +153,2017,1 +153,2018,1 +153,2019,1 +153,2020,1 +153,2021,1 +155,2008,0.7692307692307693 +155,2009,0.6117804551539491 +155,2010,0.7246153846153847 +155,2011,0.672514619883041 +155,2012,0.8286713286713286 +155,2013,0.8073701842546064 +155,2014,0.7659574468085106 +155,2015,0.7410468319559229 +155,2016,0.6816608996539792 +155,2017,0.7217090069284064 +155,2018,0.6985769728331177 +155,2019,0.7159574468085106 +155,2020,0.782608695652174 +155,2021,0.016058239498295344 +157,2008,0.46987951807228917 +157,2009,0.46987951807228917 +157,2010,0.5662650602409639 +157,2011,0.6385542168674698 +157,2012,0.5903614457831325 +157,2013,0.7108433734939759 +157,2014,0.6024096385542169 +157,2015,0.47560975609756095 +157,2016,0.75 +157,2017,0.7733333333333333 +157,2018,0.7888888888888889 +157,2019,0.6583333333333333 +157,2020,0.3909043500846322 +157,2021,0.46318901076326935 +162,2008,0.954893274265002 +162,2009,0.959563283461383 +162,2010,0.9624505928853755 +162,2011,0.9594956056553305 +162,2012,0.9607614607614607 +162,2013,0.970110701107011 +162,2014,0.9712683952347583 +162,2015,0.9712368168744008 +162,2016,0.9645105895821409 +162,2017,0.9548751007252216 +162,2018,0.9554173146708139 +162,2019,0.9521604938271605 +162,2020,0.9518072289156626 +162,2021,0.9903381642512077 +163,2008,0.33014234247565494 +163,2009,0.34330376056022127 +163,2010,0.3698043444769681 +163,2011,0.43102332906203605 +163,2012,0.39018200308073364 +163,2013,0.3995479569346941 +163,2014,0.4227400684759536 +163,2015,0.43973502069035597 +163,2016,0.4359627940623213 +163,2017,0.44285944556433554 +163,2018,0.4709638660507132 +163,2019,0.48007590132827327 +163,2020,0.42891587783532775 +163,2021,0.3318677358320569 +164,2008,0.2895981087470449 +164,2009,0.24654622741764082 +164,2010,0.22960151802656548 +164,2011,0.22603978300180833 +164,2012,0.2694552529182879 +164,2013,0.2876712328767123 +164,2014,0.24903025601241272 +164,2015,0.26250962278675904 +164,2016,0.2774982027318476 +164,2017,0.2963219986120749 +164,2018,0.2881555686505598 +164,2019,0.3004778972520908 +164,2020,0.29589322381930183 +164,2021,0.5011441647597255 +166,2008,0.6180482686253935 +166,2009,0.6650926262259353 +166,2010,0.6786723163841808 +166,2011,0.63438414039649 +166,2012,0.6007259528130672 +166,2013,0.6134392180818571 +166,2014,0.593607305936073 +166,2015,0.5750270855904659 +166,2016,0.5686734427938493 +166,2017,0.5502806361085126 +166,2018,0.5725862468163927 +166,2019,0.6332073689182806 +166,2020,0.6621042340377529 +166,2021,0.9537459283387623 +167,2008,1 +167,2009,1 +167,2010,1 +167,2011,1 +167,2012,1 +167,2013,1 +167,2014,1 +167,2015,1 +167,2016,1 +167,2017,1 +167,2018,1 +167,2019,1 +167,2020,0.9988439306358381 +167,2021,1 +168,2008,1 +168,2009,1 +168,2010,0.9951456310679612 +168,2011,0.995475113122172 +168,2012,1 +168,2013,0.996 +168,2014,0.9960474308300395 +168,2015,0.9956331877729258 +168,2016,0.9961089494163424 +168,2017,0.996415770609319 +168,2018,1 +168,2019,1 +168,2020,1 +168,2021,1 +169,2008,0.8583247156153051 +169,2009,0.8583247156153051 +169,2010,0.8996897621509824 +169,2011,0.8996897621509824 +169,2012,0.8996897621509824 +169,2013,0.8996897621509824 +169,2014,0.8996897621509824 +169,2015,0.8996897621509824 +169,2016,0.9927611168562565 +169,2017,1 +169,2018,1 +169,2019,1 +169,2020,1 +169,2021,1 +171,2008,1 +171,2009,1 +171,2010,1 +171,2011,1 +171,2012,1 +171,2013,1 +171,2014,1 +171,2015,1 +171,2016,1 +171,2017,1 +171,2018,1 +171,2019,1 +171,2020,1 +171,2021,1 +172,2008,0.4706589224914881 +172,2009,0.43140396555177246 +172,2010,0.6809533346685359 +172,2011,0.6712397356298818 +172,2012,0.6506108551972762 +172,2013,0.6519126777488484 +172,2014,0.7175045063088323 +172,2015,0.6825555778089325 +172,2016,0.6677348287602644 +172,2017,0.6735246888799679 +172,2018,0.6678853184529536 +172,2019,0.6647201509298356 +172,2020,0.6750645994832042 +172,2021,0.6456521739130435 +173,2008,0.8594235033259423 +173,2009,0.8923143725575337 +173,2010,0.8689069423929099 +173,2011,0.8807028360049322 +173,2012,0.8541996830427893 +173,2013,0.8275755706354102 +173,2014,0.8394366197183099 +173,2015,0.8438831405964698 +173,2016,0.8361784140969163 +173,2017,0.8708224697795686 +173,2018,0.8773394031360647 +173,2019,0.8790229885057471 +173,2020,0.8745141027793673 +173,2021,1 +174,2008,0.5900856389986825 +174,2009,0.6010535557506584 +174,2010,0.5936590100291168 +174,2011,0.5774104683195592 +174,2012,0.5534311157674175 +174,2013,0.36963129377560466 +174,2014,0.3642304614563885 +174,2015,0.35294117647058837 +174,2016,0.3789402173913045 +174,2017,0.4361541626663012 +174,2018,0.44641373580725596 +174,2019,0.45994687543688006 +174,2020,0.41970437699566315 +174,2021,0.3490396777255195 +175,2008,0.3355414960922962 +175,2009,0.3216664784915886 +175,2010,0.3271230826786382 +175,2011,0.30467630080198366 +175,2012,0.31978637981971064 +175,2013,0.3227108161110273 +175,2014,0.3657641610260064 +175,2015,0.36952745577652524 +175,2016,0.3757493377945072 +175,2017,0.4042816241540864 +175,2018,0.4139151326255641 +175,2019,0.44610642734112954 +175,2020,0.38057069573581276 +175,2021,0.438120071228695 +176,2008,1 +176,2009,1 +176,2010,1 +176,2011,1 +176,2012,1 +176,2013,1 +176,2014,1 +176,2015,1 +176,2016,1 +176,2017,1 +176,2018,1 +176,2019,1 +176,2020,1 +176,2021,1 +177,2008,1 +177,2009,1 +177,2010,1 +177,2011,1 +177,2012,1 +177,2013,1 +177,2014,1 +177,2015,1 +177,2016,1 +177,2017,1 +177,2018,1 +177,2019,1 +177,2020,1 +177,2021,1 +178,2008,0.21623425377492284 +178,2009,0.22083952451708766 +178,2010,0.21374700034281796 +178,2011,0.21977117458227013 +178,2012,0.2202107137557501 +178,2013,0.21850366477665606 +178,2014,0.21694915254237288 +178,2015,0.21517049766538465 +178,2016,0.21709578010835529 +178,2017,0.21786549568039712 +178,2018,0.22830614571940522 +178,2019,0.23903293227136643 +178,2020,0.16481321951601535 +178,2021,0.19528990171586705 +179,2008,0.4092451865207082 +179,2009,0.39904558426773545 +179,2010,0.40377503608567844 +179,2011,0.4094661613977975 +179,2012,0.4150423750265793 +179,2013,0.40914828041680934 +179,2014,0.4051374885648043 +179,2015,0.41540171764173495 +179,2016,0.4072162409747737 +179,2017,0.418566728099038 +179,2018,0.4213341635298446 +179,2019,0.41727213060580054 +179,2020,0.35594190028093486 +179,2021,0.4217614274300859 +180,2008,0.9452458605117913 +180,2009,0.9448056127703398 +180,2010,0.951082308046582 +180,2011,0.9528946873235903 +180,2012,0.9438254554483101 +180,2013,0.9517085232520035 +180,2014,0.950957919461188 +180,2015,0.9553435529462927 +180,2016,0.9547394515576683 +180,2017,0.962585199610516 +180,2018,0.9598093488568379 +180,2019,0.9647795971314586 +180,2020,0.9651382758310062 +180,2021,1 +181,2008,0.9357584236912674 +181,2009,0.9375326030255607 +181,2010,0.9420308992473261 +181,2011,0.9397709077472595 +181,2012,0.9404583956153463 +181,2013,0.932806324110672 +181,2014,0.9190739388883096 +181,2015,0.9142199194012666 +181,2016,0.8972195078617748 +181,2017,0.8956077276271334 +181,2018,0.890754932333279 +181,2019,0.8830739456495444 +181,2020,0.8785442808274152 +181,2021,1 +182,2008,0.5855636326405242 +182,2009,0.5677754926604207 +182,2010,0.5619239631336406 +182,2011,0.5663746257069979 +182,2012,0.585602478395565 +182,2013,0.5877594908506166 +182,2014,0.6060908683640708 +182,2015,0.6207094342371214 +182,2016,0.6517337163922085 +182,2017,0.6726176294190622 +182,2018,0.6653596451758051 +182,2019,0.6618768328445748 +182,2020,0.5199945070035704 +182,2021,0.6039201255059945 +183,2008,0.3032229965156799 +183,2009,0.2781906160891737 +183,2010,0.2895594033944806 +183,2011,0.30886980185390034 +183,2012,0.31652885588930285 +183,2013,0.3841356215989975 +183,2014,0.4359943512211358 +183,2015,0.4831835792597511 +183,2016,0.5464250654450303 +183,2017,0.6264512462450325 +183,2018,0.6521353746978302 +183,2019,0.6911541230104842 +183,2020,0.5638391375176751 +183,2021,0.7850130724373291 +184,2008,0.604278906658748 +184,2009,0.6031216872175417 +184,2010,0.5957801297371117 +184,2011,0.6079007724145203 +184,2012,0.6076573211172716 +184,2013,0.6214533232589041 +184,2014,0.6252220248667851 +184,2015,0.6257956283613756 +184,2016,0.6166853105681483 +184,2017,0.6477521655491433 +184,2018,0.6603896229268701 +184,2019,0.6762439857860145 +184,2020,0.6556651656732346 +184,2021,0.6690887373712238 +185,2008,0.5827338129496403 +185,2009,0.5289421157684631 +185,2010,0.46422628951747086 +185,2011,0.5086206896551724 +185,2012,0.5561904761904762 +185,2013,0.5724258289703316 +185,2014,0.6290630975143403 +185,2015,0.5648464163822525 +185,2016,0.6486486486486487 +185,2017,0.6813819577735125 +185,2018,0.6724806201550387 +185,2019,0.6660550458715596 +185,2020,0.9931292941911305 +185,2021,1 +186,2008,1 +186,2009,1 +186,2010,1 +186,2011,1 +186,2012,1 +186,2013,1 +186,2014,1 +186,2015,1 +186,2016,1 +186,2017,1 +186,2018,1 +186,2019,1 +186,2020,1 +186,2021,1 +187,2008,0.168789932990494 +187,2009,0.18275071994618797 +187,2010,0.18591601028445495 +187,2011,0.198663171166123 +187,2012,0.2197520398431705 +187,2013,0.22645568311097322 +187,2014,0.22715368980612882 +187,2015,0.22705789680976762 +187,2016,0.2397937034400125 +187,2017,0.2632263074377933 +187,2018,0.28863494485676633 +187,2019,0.2891154762499792 +187,2020,0.2566179192891522 +187,2021,0.311842452304897 +188,2008,0.028174688826534303 +188,2009,0.02347580987682925 +188,2010,0.023853595501693886 +188,2011,0.02376170285119185 +188,2012,0.023234900247304627 +188,2013,0.022641509433962318 +188,2014,0.02253447564170611 +188,2015,0.023812337974454204 +188,2016,0.025142290413067845 +188,2017,0.027848136596121856 +188,2018,0.029205029205029293 +188,2019,0.029439571241633728 +188,2020,0.02550974659838057 +188,2021,0.03548655287400668 +189,2008,0.3612917694550348 +189,2009,0.335166208447888 +189,2010,0.3699975448072674 +189,2011,0.3940941385435169 +189,2012,0.38160273147218315 +189,2013,0.3822188449848024 +189,2014,0.39543799118267203 +189,2015,0.41026148969889065 +189,2016,0.4314167606163097 +189,2017,0.4513416815742397 +189,2018,0.46197874080130824 +189,2019,0.46747967479674796 +189,2020,0.4102451838879159 +189,2021,0.4861062836837171 +190,2008,0.9480431848852902 +190,2009,0.9601889338731441 +190,2010,0.8476470588235289 +190,2011,0.7092853670393771 +190,2012,0.635542168674698 +190,2013,0.5723583460949455 +190,2014,0.5329341317365259 +190,2015,0.5205712342740554 +190,2016,0.52722940776038 +190,2017,0.6945921985815584 +190,2018,0.8713578889499699 +190,2019,0.7502925345190709 +190,2020,0.8178118674004797 +190,2021,0.9996711320676294 +193,2008,1 +193,2009,1 +193,2010,1 +193,2011,1 +193,2012,1 +193,2013,1 +193,2014,1 +193,2015,1 +193,2016,1 +193,2017,1 +193,2018,1 +193,2019,1 +193,2020,1 +193,2021,1 +194,2008,0.5150214592274678 +194,2009,0.26609442060085836 +194,2010,0.26609442060085836 +194,2011,1 +194,2012,1 +194,2013,1 +194,2014,0.7081545064377682 +194,2015,0.7510729613733905 +194,2016,1 +194,2017,1 +194,2018,1 +194,2019,1 +194,2020,1 +194,2021,1 +196,2008,0.22560137457044674 +196,2009,0.23360317198083594 +196,2010,0.2543759201701292 +196,2011,0.1899070385126162 +196,2012,0.10400171196233683 +196,2013,0.1485884101040119 +196,2014,0.26129502394336873 +196,2015,0.2085757021771647 +196,2016,0.3587844254510921 +196,2017,0.37186414511771515 +196,2018,0.37419109250095167 +196,2019,0.3739973885469129 +196,2020,0.4152191894127378 +196,2021,0.4157303370786517 +197,2008,0.9856262833675564 +197,2009,0.9939759036144579 +197,2010,0.9930191972076788 +197,2011,0.9933774834437086 +197,2012,0.9938800489596084 +197,2013,1 +197,2014,1 +197,2015,1 +197,2016,0.9979879275653915 +197,2017,0.9592969472710442 +197,2018,1 +197,2019,1 +197,2020,1 +197,2021,1 +198,2008,0.5792253521126753 +198,2009,0.5996563573883152 +198,2010,0.6191275167785223 +198,2011,0.6377049180327854 +198,2012,0.6554487179487163 +198,2013,0.6724137931034463 +198,2014,0.6886503067484641 +198,2015,0.7042042042042017 +198,2016,0.7191176470588209 +198,2017,0.7334293948126772 +198,2018,0.7471751412429346 +198,2019,0.7603878116343455 +198,2020,0.7564874565864991 +198,2021,0.8963744624362967 +199,2008,0.25380710659898476 +199,2009,0.26903553299492383 +199,2010,0.41116751269035534 +199,2011,0.9441624365482234 +199,2012,0.7877358490566035 +199,2013,0.8414096916299555 +199,2014,1 +199,2015,1 +199,2016,1 +199,2017,1 +199,2018,1 +199,2019,1 +199,2020,1 +199,2021,1 +200,2008,1 +200,2009,1 +200,2010,1 +200,2011,1 +200,2012,1 +200,2013,1 +200,2014,1 +200,2015,1 +200,2016,1 +200,2017,1 +200,2018,1 +200,2019,1 +200,2020,1 +200,2021,1 +202,2008,0.974025974025974 +202,2009,0.9733893557422969 +202,2010,0.9629629629629629 +202,2011,0.9711981566820277 +202,2012,0.968430826369545 +202,2013,0.9698905109489051 +202,2014,0.9763157894736842 +202,2015,0.9709762532981531 +202,2016,0.9602803738317757 +202,2017,0.9608138658628486 +202,2018,0.9150066401062417 +202,2019,0.9449901768172888 +202,2020,0.9533011272141707 +202,2021,1 +203,2008,0.983249581239531 +203,2009,0.9760151085930123 +203,2010,0.9821458935555177 +203,2011,1 +203,2012,1 +203,2013,1 +203,2014,1 +203,2015,1 +203,2016,1 +203,2017,1 +203,2018,1 +203,2019,1 +203,2020,1 +203,2021,1 +204,2008,1 +204,2009,1 +204,2010,1 +204,2011,1 +204,2012,1 +204,2013,1 +204,2014,1 +204,2015,1 +204,2016,1 +204,2017,1 +204,2018,1 +204,2019,1 +204,2020,1 +204,2021,1 +205,2008,1 +205,2009,1 +205,2010,1 +205,2011,1 +205,2012,1 +205,2013,1 +205,2014,1 +205,2015,1 +205,2016,1 +205,2017,1 +205,2018,1 +205,2019,1 +205,2020,1 +205,2021,1 +206,2008,0.8708976738675408 +206,2009,0.7504522517375988 +206,2010,0.7012783199223878 +206,2011,0.7051874678993323 +206,2012,0.714289790560977 +206,2013,0.7337499286651828 +206,2014,0.7828853506819609 +206,2015,0.733921132226217 +206,2016,0.763482280431433 +206,2017,0.7403983336186726 +206,2018,0.7370883981053472 +206,2019,0.7447640244250414 +206,2020,0.7100950508030154 +206,2021,0.3383458646616541 +207,2008,0.9641170915958451 +207,2009,0.9823859087269816 +207,2010,0.9900990099009901 +207,2011,0.9923511805786498 +207,2012,1 +207,2013,0.9510036978341257 +207,2014,0.9509779019558039 +207,2015,0.9510322255790534 +207,2016,0.7684010785978227 +207,2017,0.6061755146262187 +207,2018,0.5143889534133435 +207,2019,0.4503859181520349 +207,2020,0.6276614747261657 +207,2021,1 +208,2008,0.7688809806247529 +208,2009,0.773314055561293 +208,2010,0.786892286548703 +208,2011,0.7888543011160883 +208,2012,0.7655905077262694 +208,2013,0.7643242548818089 +208,2014,0.7859556144418681 +208,2015,0.7912549650395562 +208,2016,0.7872340425531915 +208,2017,0.7978766140602582 +208,2018,0.792792306029825 +208,2019,0.7909081397781963 +208,2020,0.7607585703865791 +208,2021,1 +209,2008,0.40798449552785193 +209,2009,0.40225022929251397 +209,2010,0.41614210313841 +209,2011,0.42519365248148394 +209,2012,0.43597296174615763 +209,2013,0.4314135638916004 +209,2014,0.43285939968404424 +209,2015,0.42509340905694215 +209,2016,0.41805972886424875 +209,2017,0.3963199791204489 +209,2018,0.3965802050363795 +209,2019,0.40436697879880396 +209,2020,0.2620551279521084 +209,2021,0.3105134426242625 +212,2008,0.46987951807228917 +212,2009,0.46987951807228917 +212,2010,0.5662650602409639 +212,2011,0.6385542168674698 +212,2012,0.5903614457831325 +212,2013,0.7108433734939759 +212,2014,0.6024096385542169 +212,2015,0.47560975609756095 +212,2016,0.75 +212,2017,0.7733333333333333 +212,2018,0.7888888888888889 +212,2019,0.6583333333333333 +212,2020,0.3909043500846322 +212,2021,0.46318901076326935 +214,2008,0.958005453837164 +214,2009,0.950382897255903 +214,2010,0.9538388432557192 +214,2011,0.9646521076688674 +214,2012,0.9708636836628513 +214,2013,0.9693575655114116 +214,2014,0.9747216035634744 +214,2015,0.9797384219554031 +214,2016,0.9738840526023338 +214,2017,0.9837192474674384 +214,2018,0.9867794817556849 +214,2019,0.9884845693228926 +214,2020,1 +214,2021,1 +215,2008,0.5252112676056339 +215,2009,0.5347918136908962 +215,2010,0.5207972270363952 +215,2011,0.5812417437252312 +215,2012,0.6591700981944885 +215,2013,0.7320467619224346 +215,2014,0.7490144546649146 +215,2015,0.7820752755250572 +215,2016,0.8420679886685553 +215,2017,0.8419496166484118 +215,2018,0.8431531897602601 +215,2019,0.8372318597276628 +215,2020,0.8604838709677419 +215,2021,0.8529037727850785 +216,2008,1 +216,2009,1 +216,2010,1 +216,2011,1 +216,2012,1 +216,2013,1 +216,2014,1 +216,2015,0.9573364081867973 +216,2016,0.9611945481378592 +216,2017,0.9222222222222223 +216,2018,0.8473118279569892 +216,2019,0.9595207052834172 +216,2020,0.9660498396249692 +216,2021,0.9924903722721438 +218,2008,0.6263061746437706 +218,2009,0.6372287010042113 +218,2010,0.633035400647906 +218,2011,0.6388733742918694 +218,2012,0.6455486215340864 +218,2013,0.6380975086422697 +218,2014,0.6470381093982315 +218,2015,0.6521865360188713 +218,2016,0.6625638643752902 +218,2017,0.6718895788423795 +218,2018,0.6757690094007802 +218,2019,0.6828553808202282 +218,2020,0.5840568271507498 +218,2021,0.6920585660889146 +220,2008,0.26084568918176826 +220,2009,0.26586102719033233 +220,2010,0.22648261758691207 +220,2011,0.20384615384615384 +220,2012,0.20678733031674207 +220,2013,0.2072791833111407 +220,2014,0.19984012789768185 +220,2015,0.2098047361861238 +220,2016,0.24032771961766045 +220,2017,0.2451219512195122 +220,2018,0.10028169014084506 +220,2019,0.16393442622950818 +220,2020,0.19557195571955718 +220,2021,0.23173643548138376 +222,2008,0.23473331615562998 +222,2009,0.2524607060036073 +222,2010,0.2670961092501932 +222,2011,0.5960834836382376 +222,2012,0.618259957023637 +222,2013,0.5839493697814179 +222,2014,0.5275507646026573 +222,2015,0.3245868803204806 +222,2016,0.3391847961990495 +222,2017,0.352347652347652 +222,2018,0.3711648790221995 +222,2019,0.37947184853014376 +222,2020,0.32671356528534007 +222,2021,0.38712829129349413 +223,2008,0.7180376610505451 +223,2009,0.7108276087667648 +223,2010,0.7246883551231378 +223,2011,0.741520992081279 +223,2012,0.6702111948013594 +223,2013,0.6976200905241654 +223,2014,0.7008806120975911 +223,2015,0.7653104925053562 +223,2016,0.8414513624170588 +223,2017,0.873062421449523 +223,2018,0.7857438872772532 +223,2019,0.8034713680470196 +223,2020,0.639715781723464 +223,2021,0.75800977922602 +224,2008,0.7298680312415836 +224,2009,0.7547169811320755 +224,2010,0.7815290178571429 +224,2011,0.7915720413827908 +224,2012,0.8082783716170115 +224,2013,0.8023334081220552 +224,2014,0.7985220604216474 +224,2015,0.8161108073628577 +224,2016,0.840435041716329 +224,2017,0.8463456239338669 +224,2018,0.8667272451915796 +224,2019,0.8318909961333087 +224,2020,0.853948874475391 +224,2021,1 +231,2008,1 +231,2009,1 +231,2010,1 +231,2011,1 +231,2012,1 +231,2013,1 +231,2014,1 +231,2015,1 +231,2016,1 +231,2017,1 +231,2018,1 +231,2019,1 +231,2020,1 +231,2021,1 +232,2008,1 +232,2009,1 +232,2010,1 +232,2011,1 +232,2012,1 +232,2013,1 +232,2014,1 +232,2015,1 +232,2016,1 +232,2017,1 +232,2018,1 +232,2019,1 +232,2020,1 +232,2021,1 +237,2008,1 +237,2009,1 +237,2010,1 +237,2011,1 +237,2012,1 +237,2013,1 +237,2014,1 +237,2015,1 +237,2016,1 +237,2017,1 +237,2018,1 +237,2019,1 +237,2020,1 +237,2021,1 +244,2008,0.5291073738680466 +244,2009,0.4542079207920792 +244,2010,0.44881889763779526 +244,2011,0.4659498207885305 +244,2012,0.46365638766519823 +244,2013,0.4117647058823529 +244,2014,0.4003542958370239 +244,2015,0.43656716417910446 +244,2016,0.4671610169491525 +244,2017,0.3771266540642722 +244,2018,0.35702479338842974 +244,2019,0.3588553750966744 +244,2020,0.4013761467889908 +244,2021,0.47559721536717264 +245,2008,0.296 +245,2009,0.2392857142857143 +245,2010,0.23905723905723905 +245,2011,0.250814332247557 +245,2012,0.2618296529968454 +245,2013,0.27217125382262997 +245,2014,0.2818991097922849 +245,2015,0.2910662824207493 +245,2016,0.29971988795518206 +245,2017,0.3079019073569482 +245,2018,0.3156498673740053 +245,2019,0.32299741602067183 +245,2020,0.32134062381182554 +245,2021,0.38076180433711376 +247,2008,0.05308902983321588 +247,2009,0.03688043222926944 +247,2010,0.05027014329339911 +247,2011,0.056847545219638244 +247,2012,0.04909560723514212 +247,2013,0.052854122621564484 +247,2014,0.047216349541930935 +247,2015,0.051209772140004696 +247,2016,0.05144467935165609 +247,2017,0.06000926784059314 +247,2018,0.06149082061490821 +247,2019,0.07484828051247472 +247,2020,0.05816993464052288 +247,2021,0.031818181818181815 +250,2008,0.5979754157628344 +250,2009,0.5725352112676056 +250,2010,0.5911047345767575 +250,2011,0.5915588835942818 +250,2012,0.6103983794733289 +250,2013,0.5872825434913017 +250,2014,0.61644623346751 +250,2015,0.6686681222707423 +250,2016,0.626848691695108 +250,2017,0.5746108427267848 +250,2018,0.5703742751713231 +250,2019,0.5735520246027678 +250,2020,1 +250,2021,1 diff --git a/globalprep/tr/v2024/output/tr_arrivals_props_tourism_gf.csv b/globalprep/tr/v2024/output/tr_arrivals_props_tourism_gf.csv new file mode 100644 index 00000000..cda2ceb1 --- /dev/null +++ b/globalprep/tr/v2024/output/tr_arrivals_props_tourism_gf.csv @@ -0,0 +1,2283 @@ +rgn_id,year,arrivals_method,arrivals_gapfilled +5,2008,UNWTO,NA +5,2009,UNWTO,NA +5,2010,UNWTO,NA +5,2011,UNWTO,NA +5,2012,UNWTO,NA +5,2013,UNWTO,NA +5,2014,UNWTO,NA +5,2015,UNWTO,NA +5,2016,UNWTO,NA +5,2017,UNWTO,NA +5,2018,UNWTO,NA +5,2019,UNWTO,NA +5,2020,UNWTO,NA +5,2021,UNWTO,NA +6,2008,UNWTO,NA +6,2009,UNWTO,NA +6,2010,UNWTO,NA +6,2011,UNWTO,NA +6,2012,UNWTO,NA +6,2013,UNWTO,NA +6,2014,UNWTO,NA +6,2015,UNWTO,NA +6,2016,UNWTO,NA +6,2017,UNWTO,NA +6,2018,UNWTO,NA +6,2019,UNWTO,NA +6,2020,UNWTO,NA +6,2021,2020 and 2021 gapfill method,gapfilled +7,2008,UNWTO,NA +7,2009,UNWTO,NA +7,2010,UNWTO,NA +7,2011,UNWTO,NA +7,2012,UNWTO,NA +7,2013,UNWTO,NA +7,2014,UNWTO,NA +7,2015,UNWTO,NA +7,2016,UNWTO,NA +7,2017,UNWTO,NA +7,2018,UNWTO,NA +7,2019,UNWTO,NA +7,2020,UNWTO,NA +7,2021,UNWTO,NA +8,2008,UNWTO,NA +8,2009,UNWTO,NA +8,2010,UNWTO,NA +8,2011,UNWTO,NA +8,2012,UNWTO,NA +8,2013,UNWTO,NA +8,2014,UNWTO,NA +8,2015,UNWTO,NA +8,2016,UNWTO,NA +8,2017,UNWTO,NA +8,2018,UNWTO,NA +8,2019,UNWTO,NA +8,2020,UNWTO,NA +8,2021,2020 and 2021 gapfill method,gapfilled +9,2008,UNWTO,NA +9,2009,UNWTO,NA +9,2010,UNWTO,NA +9,2011,UNWTO,NA +9,2012,UNWTO,NA +9,2013,UNWTO,NA +9,2014,UNWTO,NA +9,2015,UNWTO,NA +9,2016,UNWTO,NA +9,2017,nearby year,gapfilled +9,2018,UNWTO,NA +9,2019,UNWTO,NA +9,2020,2020 and 2021 gapfill method,gapfilled +9,2021,2020 and 2021 gapfill method,gapfilled +11,2008,UNWTO,NA +11,2009,UNWTO,NA +11,2010,UNWTO,NA +11,2011,UNWTO,NA +11,2012,UNWTO,NA +11,2013,nearby year,gapfilled +11,2014,UNWTO,NA +11,2015,UNWTO,NA +11,2016,UNWTO,NA +11,2017,UNWTO,NA +11,2018,UNWTO,NA +11,2019,UNWTO,NA +11,2020,UNWTO,NA +11,2021,2020 and 2021 gapfill method,gapfilled +13,2008,UNWTO,NA +13,2009,UNWTO,NA +13,2010,UNWTO,NA +13,2011,UNWTO,NA +13,2012,UNWTO,NA +13,2013,UNWTO,NA +13,2014,UNWTO,NA +13,2015,UNWTO,NA +13,2016,UNWTO,NA +13,2017,UNWTO,NA +13,2018,UNWTO,NA +13,2019,UNWTO,NA +13,2020,UNWTO,NA +13,2021,2020 and 2021 gapfill method,gapfilled +15,2008,UNWTO,NA +15,2009,UNWTO,NA +15,2010,UNWTO,NA +15,2011,UNWTO,NA +15,2012,UNWTO,NA +15,2013,UNWTO,NA +15,2014,UNWTO,NA +15,2015,UNWTO,NA +15,2016,UNWTO,NA +15,2017,UNWTO,NA +15,2018,UNWTO,NA +15,2019,UNWTO,NA +15,2020,UNWTO,NA +15,2021,UNWTO,NA +16,2008,linear model,gapfilled +16,2009,linear model,gapfilled +16,2010,linear model,gapfilled +16,2011,linear model,gapfilled +16,2012,linear model,gapfilled +16,2013,linear model,gapfilled +16,2014,linear model,gapfilled +16,2015,linear model,gapfilled +16,2016,linear model,gapfilled +16,2017,linear model,gapfilled +16,2018,linear model,gapfilled +16,2019,linear model,gapfilled +16,2020,2020 and 2021 gapfill method,gapfilled +16,2021,2020 and 2021 gapfill method,gapfilled +17,2008,UNWTO,NA +17,2009,UNWTO,NA +17,2010,UNWTO,NA +17,2011,UNWTO,NA +17,2012,UNWTO,NA +17,2013,UNWTO,NA +17,2014,UNWTO,NA +17,2015,UNWTO,NA +17,2016,UNWTO,NA +17,2017,UNWTO,NA +17,2018,UNWTO,NA +17,2019,UNWTO,NA +17,2020,UNWTO,NA +17,2021,2020 and 2021 gapfill method,gapfilled +18,2008,UNWTO,NA +18,2009,UNWTO,NA +18,2010,UNWTO,NA +18,2011,UNWTO,NA +18,2012,UNWTO,NA +18,2013,UNWTO,NA +18,2014,UNWTO,NA +18,2015,UNWTO,NA +18,2016,UNWTO,NA +18,2017,UNWTO,NA +18,2018,UNWTO,NA +18,2019,UNWTO,NA +18,2020,UNWTO,NA +18,2021,UNWTO,NA +19,2008,UNWTO,NA +19,2009,UNWTO,NA +19,2010,UNWTO,NA +19,2011,UNWTO,NA +19,2012,UNWTO,NA +19,2013,UNWTO,NA +19,2014,UNWTO,NA +19,2015,UNWTO,NA +19,2016,UNWTO,NA +19,2017,UNWTO,NA +19,2018,UNWTO,NA +19,2019,UNWTO,NA +19,2020,UNWTO,NA +19,2021,UNWTO,NA +20,2008,nearby year,gapfilled +20,2009,nearby year,gapfilled +20,2010,nearby year,gapfilled +20,2011,nearby year,gapfilled +20,2012,nearby year,gapfilled +20,2013,UNWTO - subtraction,gapfilled +20,2014,UNWTO - subtraction,gapfilled +20,2015,UNWTO - subtraction,gapfilled +20,2016,UNWTO - subtraction,gapfilled +20,2017,UNWTO - subtraction,gapfilled +20,2018,UNWTO - subtraction,gapfilled +20,2019,UNWTO - subtraction,gapfilled +20,2020,UNWTO - subtraction,gapfilled +20,2021,2020 and 2021 gapfill method,gapfilled +24,2008,UNWTO,NA +24,2009,UNWTO,NA +24,2010,UNWTO,NA +24,2011,UNWTO,NA +24,2012,UNWTO,NA +24,2013,UNWTO,NA +24,2014,UNWTO,NA +24,2015,UNWTO,NA +24,2016,UNWTO,NA +24,2017,UNWTO,NA +24,2018,UNWTO,NA +24,2019,UNWTO,NA +24,2020,UNWTO,NA +24,2021,UNWTO,NA +25,2008,UNWTO,NA +25,2009,UNWTO,NA +25,2010,UNWTO,NA +25,2011,UNWTO,NA +25,2012,UNWTO,NA +25,2013,UNWTO,NA +25,2014,UNWTO,NA +25,2015,UNWTO,NA +25,2016,UNWTO,NA +25,2017,UNWTO,NA +25,2018,UNWTO,NA +25,2019,UNWTO,NA +25,2020,UNWTO,NA +25,2021,UNWTO,NA +26,2008,UNWTO,NA +26,2009,UNWTO,NA +26,2010,UNWTO,NA +26,2011,UNWTO,NA +26,2012,UNWTO,NA +26,2013,UNWTO,NA +26,2014,UNWTO,NA +26,2015,UNWTO,NA +26,2016,UNWTO,NA +26,2017,UNWTO,NA +26,2018,UNWTO,NA +26,2019,UNWTO,NA +26,2020,UNWTO,NA +26,2021,UNWTO,NA +28,2008,UNWTO,NA +28,2009,UNWTO,NA +28,2010,UNWTO,NA +28,2011,UNWTO,NA +28,2012,UNWTO,NA +28,2013,UNWTO,NA +28,2014,UNWTO,NA +28,2015,UNWTO,NA +28,2016,UNWTO,NA +28,2017,UNWTO,NA +28,2018,UNWTO,NA +28,2019,UNWTO,NA +28,2020,UNWTO,NA +28,2021,UNWTO,NA +31,2008,UNWTO,NA +31,2009,UNWTO,NA +31,2010,UNWTO,NA +31,2011,UNWTO,NA +31,2012,UNWTO,NA +31,2013,UNWTO,NA +31,2014,UNWTO,NA +31,2015,UNWTO,NA +31,2016,UNWTO,NA +31,2017,UNWTO,NA +31,2018,UNWTO,NA +31,2019,UNWTO,NA +31,2020,UNWTO,NA +31,2021,UNWTO,NA +32,2008,UNWTO,NA +32,2009,UNWTO,NA +32,2010,UNWTO,NA +32,2011,UNWTO,NA +32,2012,UNWTO,NA +32,2013,UNWTO,NA +32,2014,UNWTO,NA +32,2015,UNWTO,NA +32,2016,UNWTO,NA +32,2017,UNWTO,NA +32,2018,UNWTO,NA +32,2019,UNWTO,NA +32,2020,UNWTO,NA +32,2021,UNWTO,NA +37,2008,UNWTO,NA +37,2009,UNWTO,NA +37,2010,UNWTO,NA +37,2011,UNWTO,NA +37,2012,UNWTO,NA +37,2013,UNWTO,NA +37,2014,UNWTO,NA +37,2015,UNWTO,NA +37,2016,UNWTO,NA +37,2017,UNWTO,NA +37,2018,UNWTO,NA +37,2019,UNWTO,NA +37,2020,UNWTO,NA +37,2021,UNWTO,NA +39,2008,UNWTO,NA +39,2009,UNWTO,NA +39,2010,UNWTO,NA +39,2011,UNWTO,NA +39,2012,UNWTO,NA +39,2013,UNWTO,NA +39,2014,UNWTO,NA +39,2015,UNWTO,NA +39,2016,UNWTO,NA +39,2017,UNWTO,NA +39,2018,UNWTO,NA +39,2019,UNWTO,NA +39,2020,UNWTO,NA +39,2021,UNWTO,NA +40,2008,UNWTO,NA +40,2009,UNWTO,NA +40,2010,UNWTO,NA +40,2011,UNWTO,NA +40,2012,UNWTO,NA +40,2013,UNWTO,NA +40,2014,UNWTO,NA +40,2015,UNWTO,NA +40,2016,UNWTO,NA +40,2017,UNWTO,NA +40,2018,UNWTO,NA +40,2019,UNWTO,NA +40,2020,UNWTO,NA +40,2021,UNWTO,NA +41,2008,UNWTO,NA +41,2009,UNWTO,NA +41,2010,UNWTO,NA +41,2011,UNWTO,NA +41,2012,UNWTO,NA +41,2013,UNWTO,NA +41,2014,UNWTO,NA +41,2015,UNWTO,NA +41,2016,UNWTO,NA +41,2017,UNWTO,NA +41,2018,UNWTO,NA +41,2019,UNWTO,NA +41,2020,UNWTO,NA +41,2021,UNWTO,NA +42,2008,UNWTO,NA +42,2009,UNWTO,NA +42,2010,UNWTO,NA +42,2011,UNWTO,NA +42,2012,UNWTO,NA +42,2013,UNWTO,NA +42,2014,UNWTO,NA +42,2015,UNWTO,NA +42,2016,UNWTO,NA +42,2017,UNWTO,NA +42,2018,UNWTO,NA +42,2019,UNWTO,NA +42,2020,UNWTO,NA +42,2021,2020 and 2021 gapfill method,gapfilled +43,2008,UNWTO,NA +43,2009,UNWTO,NA +43,2010,UNWTO,NA +43,2011,UNWTO,NA +43,2012,UNWTO,NA +43,2013,UNWTO,NA +43,2014,UNWTO,NA +43,2015,UNWTO,NA +43,2016,UNWTO,NA +43,2017,UNWTO,NA +43,2018,linear model,gapfilled +43,2019,linear model,gapfilled +43,2020,2020 and 2021 gapfill method,gapfilled +43,2021,2020 and 2021 gapfill method,gapfilled +46,2008,UNWTO,NA +46,2009,UNWTO,NA +46,2010,UNWTO,NA +46,2011,UNWTO,NA +46,2012,UNWTO,NA +46,2013,UNWTO,NA +46,2014,linear model,gapfilled +46,2015,linear model,gapfilled +46,2016,linear model,gapfilled +46,2017,linear model,gapfilled +46,2018,linear model,gapfilled +46,2019,linear model,gapfilled +46,2020,2020 and 2021 gapfill method,gapfilled +46,2021,2020 and 2021 gapfill method,gapfilled +47,2008,UNWTO,NA +47,2009,UNWTO,NA +47,2010,UNWTO,NA +47,2011,UNWTO,NA +47,2012,UNWTO,NA +47,2013,UNWTO,NA +47,2014,UNWTO,NA +47,2015,UNWTO,NA +47,2016,linear model,gapfilled +47,2017,linear model,gapfilled +47,2018,linear model,gapfilled +47,2019,linear model,gapfilled +47,2020,2020 and 2021 gapfill method,gapfilled +47,2021,2020 and 2021 gapfill method,gapfilled +48,2008,UNWTO,NA +48,2009,UNWTO,NA +48,2010,UNWTO,NA +48,2011,UNWTO,NA +48,2012,UNWTO,NA +48,2013,UNWTO,NA +48,2014,UNWTO,NA +48,2015,UNWTO,NA +48,2016,UNWTO,NA +48,2017,UNWTO,NA +48,2018,UNWTO,NA +48,2019,UNWTO,NA +48,2020,UNWTO,NA +48,2021,2020 and 2021 gapfill method,gapfilled +49,2008,UNWTO,NA +49,2009,UNWTO,NA +49,2010,UNWTO,NA +49,2011,UNWTO,NA +49,2012,UNWTO,NA +49,2013,UNWTO,NA +49,2014,UNWTO,NA +49,2015,UNWTO,NA +49,2016,UNWTO,NA +49,2017,UNWTO,NA +49,2018,UNWTO,NA +49,2019,linear model,gapfilled +49,2020,2020 and 2021 gapfill method,gapfilled +49,2021,2020 and 2021 gapfill method,gapfilled +50,2008,UNWTO,NA +50,2009,UNWTO,NA +50,2010,UNWTO,NA +50,2011,UNWTO,NA +50,2012,UNWTO,NA +50,2013,UNWTO,NA +50,2014,UNWTO,NA +50,2015,UNWTO,NA +50,2016,UNWTO,NA +50,2017,UNWTO,NA +50,2018,UNWTO,NA +50,2019,UNWTO,NA +50,2020,UNWTO,NA +50,2021,2020 and 2021 gapfill method,gapfilled +51,2008,UNWTO,NA +51,2009,UNWTO,NA +51,2010,UNWTO,NA +51,2011,UNWTO,NA +51,2012,UNWTO,NA +51,2013,UNWTO,NA +51,2014,UNWTO,NA +51,2015,UNWTO,NA +51,2016,UNWTO,NA +51,2017,UNWTO,NA +51,2018,UNWTO,NA +51,2019,UNWTO,NA +51,2020,UNWTO,NA +51,2021,2020 and 2021 gapfill method,gapfilled +52,2008,nearby year,gapfilled +52,2009,nearby year,gapfilled +52,2010,nearby year,gapfilled +52,2011,nearby year,gapfilled +52,2012,nearby year,gapfilled +52,2013,nearby year,gapfilled +52,2014,nearby year,gapfilled +52,2015,UNWTO,NA +52,2016,UNWTO,NA +52,2017,UNWTO,NA +52,2018,UNWTO,NA +52,2019,UNWTO,NA +52,2020,UNWTO,NA +52,2021,UNWTO,NA +53,2008,UNWTO,NA +53,2009,UNWTO,NA +53,2010,UNWTO,NA +53,2011,UNWTO,NA +53,2012,UNWTO,NA +53,2013,linear model,gapfilled +53,2014,linear model,gapfilled +53,2015,linear model,gapfilled +53,2016,linear model,gapfilled +53,2017,linear model,gapfilled +53,2018,linear model,gapfilled +53,2019,linear model,gapfilled +53,2020,2020 and 2021 gapfill method,gapfilled +53,2021,2020 and 2021 gapfill method,gapfilled +54,2008,nearby year,gapfilled +54,2009,nearby year,gapfilled +54,2010,nearby year,gapfilled +54,2011,nearby year,gapfilled +54,2012,nearby year,gapfilled +54,2013,nearby year,gapfilled +54,2014,UNWTO,NA +54,2015,UNWTO,NA +54,2016,UNWTO,NA +54,2017,UNWTO,NA +54,2018,UNWTO,NA +54,2019,UNWTO,NA +54,2020,UNWTO,NA +54,2021,2020 and 2021 gapfill method,gapfilled +55,2008,UNWTO,NA +55,2009,UNWTO,NA +55,2010,UNWTO,NA +55,2011,UNWTO,NA +55,2012,UNWTO,NA +55,2013,UNWTO,NA +55,2014,UNWTO,NA +55,2015,UNWTO,NA +55,2016,UNWTO,NA +55,2017,UNWTO,NA +55,2018,UNWTO,NA +55,2019,UNWTO,NA +55,2020,UNWTO,NA +55,2021,UNWTO,NA +56,2008,UNWTO,NA +56,2009,UNWTO,NA +56,2010,UNWTO,NA +56,2011,UNWTO,NA +56,2012,UNWTO,NA +56,2013,UNWTO,NA +56,2014,UNWTO,NA +56,2015,UNWTO,NA +56,2016,UNWTO,NA +56,2017,UNWTO,NA +56,2018,UNWTO,NA +56,2019,UNWTO,NA +56,2020,UNWTO,NA +56,2021,UNWTO,NA +57,2008,UNWTO,NA +57,2009,UNWTO,NA +57,2010,UNWTO,NA +57,2011,UNWTO,NA +57,2012,UNWTO,NA +57,2013,UNWTO,NA +57,2014,UNWTO,NA +57,2015,UNWTO,NA +57,2016,UNWTO,NA +57,2017,UNWTO,NA +57,2018,UNWTO,NA +57,2019,UNWTO,NA +57,2020,UNWTO,NA +57,2021,UNWTO,NA +58,2008,UNWTO,NA +58,2009,UNWTO,NA +58,2010,UNWTO,NA +58,2011,UNWTO,NA +58,2012,UNWTO,NA +58,2013,UNWTO,NA +58,2014,UNWTO,NA +58,2015,UNWTO,NA +58,2016,UNWTO,NA +58,2017,UNWTO,NA +58,2018,UNWTO,NA +58,2019,UNWTO,NA +58,2020,UNWTO,NA +58,2021,UNWTO,NA +59,2008,UNWTO,NA +59,2009,UNWTO,NA +59,2010,UNWTO,NA +59,2011,UNWTO,NA +59,2012,UNWTO,NA +59,2013,UNWTO,NA +59,2014,UNWTO,NA +59,2015,UNWTO,NA +59,2016,UNWTO,NA +59,2017,UNWTO,NA +59,2018,UNWTO,NA +59,2019,UNWTO,NA +59,2020,UNWTO,NA +59,2021,UNWTO,NA +61,2008,UNWTO,NA +61,2009,UNWTO,NA +61,2010,UNWTO,NA +61,2011,UNWTO,NA +61,2012,UNWTO,NA +61,2013,UNWTO,NA +61,2014,UNWTO,NA +61,2015,UNWTO,NA +61,2016,UNWTO,NA +61,2017,UNWTO,NA +61,2018,UNWTO,NA +61,2019,UNWTO,NA +61,2020,UNWTO,NA +61,2021,UNWTO,NA +62,2008,UNWTO,NA +62,2009,UNWTO,NA +62,2010,UNWTO,NA +62,2011,UNWTO,NA +62,2012,UNWTO,NA +62,2013,UNWTO,NA +62,2014,UNWTO,NA +62,2015,UNWTO,NA +62,2016,UNWTO,NA +62,2017,UNWTO,NA +62,2018,UNWTO,NA +62,2019,UNWTO,NA +62,2020,UNWTO,NA +62,2021,2020 and 2021 gapfill method,gapfilled +64,2008,linear model,gapfilled +64,2009,linear model,gapfilled +64,2010,linear model,gapfilled +64,2011,linear model,gapfilled +64,2012,linear model,gapfilled +64,2013,linear model,gapfilled +64,2014,linear model,gapfilled +64,2015,linear model,gapfilled +64,2016,linear model,gapfilled +64,2017,linear model,gapfilled +64,2018,linear model,gapfilled +64,2019,linear model,gapfilled +64,2020,2020 and 2021 gapfill method,gapfilled +64,2021,2020 and 2021 gapfill method,gapfilled +65,2008,UNWTO,NA +65,2009,UNWTO,NA +65,2010,UNWTO,NA +65,2011,UNWTO,NA +65,2012,UNWTO,NA +65,2013,UNWTO,NA +65,2014,UNWTO,NA +65,2015,UNWTO,NA +65,2016,UNWTO,NA +65,2017,UNWTO,NA +65,2018,UNWTO,NA +65,2019,UNWTO,NA +65,2020,UNWTO,NA +65,2021,UNWTO,NA +66,2008,UNWTO,NA +66,2009,UNWTO,NA +66,2010,UNWTO,NA +66,2011,UNWTO,NA +66,2012,UNWTO,NA +66,2013,UNWTO,NA +66,2014,UNWTO,NA +66,2015,UNWTO,NA +66,2016,UNWTO,NA +66,2017,UNWTO,NA +66,2018,linear model,gapfilled +66,2019,linear model,gapfilled +66,2020,2020 and 2021 gapfill method,gapfilled +66,2021,2020 and 2021 gapfill method,gapfilled +67,2008,UNWTO,NA +67,2009,linear model,gapfilled +67,2010,linear model,gapfilled +67,2011,linear model,gapfilled +67,2012,linear model,gapfilled +67,2013,linear model,gapfilled +67,2014,linear model,gapfilled +67,2015,linear model,gapfilled +67,2016,linear model,gapfilled +67,2017,linear model,gapfilled +67,2018,linear model,gapfilled +67,2019,linear model,gapfilled +67,2020,2020 and 2021 gapfill method,gapfilled +67,2021,2020 and 2021 gapfill method,gapfilled +68,2008,UNWTO,NA +68,2009,UNWTO,NA +68,2010,UNWTO,NA +68,2011,UNWTO,NA +68,2012,UNWTO,NA +68,2013,UNWTO,NA +68,2014,UNWTO,NA +68,2015,UNWTO,NA +68,2016,UNWTO,NA +68,2017,UNWTO,NA +68,2018,UNWTO,NA +68,2019,UNWTO,NA +68,2020,UNWTO,NA +68,2021,UNWTO,NA +69,2008,UNWTO,NA +69,2009,UNWTO,NA +69,2010,UNWTO,NA +69,2011,UNWTO,NA +69,2012,UNWTO,NA +69,2013,UNWTO,NA +69,2014,UNWTO,NA +69,2015,UNWTO,NA +69,2016,UNWTO,NA +69,2017,UNWTO,NA +69,2018,UNWTO,NA +69,2019,UNWTO,NA +69,2020,UNWTO,NA +69,2021,UNWTO,NA +70,2008,UNWTO,NA +70,2009,UNWTO,NA +70,2010,UNWTO,NA +70,2011,UNWTO,NA +70,2012,UNWTO,NA +70,2013,UNWTO,NA +70,2014,UNWTO,NA +70,2015,UNWTO,NA +70,2016,UNWTO,NA +70,2017,UNWTO,NA +70,2018,UNWTO,NA +70,2019,UNWTO,NA +70,2020,UNWTO,NA +70,2021,UNWTO,NA +71,2008,UNWTO,NA +71,2009,UNWTO,NA +71,2010,UNWTO,NA +71,2011,UNWTO,NA +71,2012,UNWTO,NA +71,2013,UNWTO,NA +71,2014,UNWTO,NA +71,2015,UNWTO,NA +71,2016,UNWTO,NA +71,2017,UNWTO,NA +71,2018,UNWTO,NA +71,2019,UNWTO,NA +71,2020,UNWTO,NA +71,2021,UNWTO,NA +72,2008,linear model,gapfilled +72,2009,linear model,gapfilled +72,2010,linear model,gapfilled +72,2011,linear model,gapfilled +72,2012,linear model,gapfilled +72,2013,linear model,gapfilled +72,2014,linear model,gapfilled +72,2015,linear model,gapfilled +72,2016,linear model,gapfilled +72,2017,linear model,gapfilled +72,2018,linear model,gapfilled +72,2019,linear model,gapfilled +72,2020,2020 and 2021 gapfill method,gapfilled +72,2021,2020 and 2021 gapfill method,gapfilled +73,2008,UNWTO - subtraction,gapfilled +73,2009,UNWTO - subtraction,gapfilled +73,2010,UNWTO - subtraction,gapfilled +73,2011,UNWTO - subtraction,gapfilled +73,2012,UNWTO - subtraction,gapfilled +73,2013,UNWTO - subtraction,gapfilled +73,2014,nearby year,gapfilled +73,2015,UNWTO - subtraction,gapfilled +73,2016,linear model,gapfilled +73,2017,linear model,gapfilled +73,2018,linear model,gapfilled +73,2019,linear model,gapfilled +73,2020,2020 and 2021 gapfill method,gapfilled +73,2021,2020 and 2021 gapfill method,gapfilled +74,2008,nearby year,gapfilled +74,2009,nearby year,gapfilled +74,2010,UNWTO,NA +74,2011,UNWTO,NA +74,2012,UNWTO,NA +74,2013,UNWTO,NA +74,2014,UNWTO,NA +74,2015,UNWTO,NA +74,2016,UNWTO,NA +74,2017,UNWTO,NA +74,2018,UNWTO,NA +74,2019,UNWTO,NA +74,2020,UNWTO,NA +74,2021,UNWTO,NA +75,2008,UNWTO,NA +75,2009,UNWTO,NA +75,2010,UNWTO,NA +75,2011,UNWTO,NA +75,2012,UNWTO,NA +75,2013,UNWTO,NA +75,2014,UNWTO,NA +75,2015,UNWTO,NA +75,2016,UNWTO,NA +75,2017,UNWTO,NA +75,2018,UNWTO,NA +75,2019,UNWTO,NA +75,2020,UNWTO,NA +75,2021,2020 and 2021 gapfill method,gapfilled +76,2008,UNWTO,NA +76,2009,UNWTO,NA +76,2010,UNWTO,NA +76,2011,UNWTO,NA +76,2012,UNWTO,NA +76,2013,UNWTO,NA +76,2014,UNWTO,NA +76,2015,UNWTO,NA +76,2016,UNWTO,NA +76,2017,UNWTO,NA +76,2018,UNWTO,NA +76,2019,UNWTO,NA +76,2020,UNWTO,NA +76,2021,UNWTO,NA +77,2008,UNWTO,NA +77,2009,UNWTO,NA +77,2010,UNWTO,NA +77,2011,UNWTO,NA +77,2012,linear model,gapfilled +77,2013,linear model,gapfilled +77,2014,linear model,gapfilled +77,2015,linear model,gapfilled +77,2016,linear model,gapfilled +77,2017,linear model,gapfilled +77,2018,linear model,gapfilled +77,2019,linear model,gapfilled +77,2020,2020 and 2021 gapfill method,gapfilled +77,2021,2020 and 2021 gapfill method,gapfilled +78,2008,UNWTO,NA +78,2009,UNWTO,NA +78,2010,UNWTO,NA +78,2011,UNWTO,NA +78,2012,UNWTO,NA +78,2013,UNWTO,NA +78,2014,UNWTO,NA +78,2015,UNWTO,NA +78,2016,UNWTO,NA +78,2017,UNWTO,NA +78,2018,UNWTO,NA +78,2019,UNWTO,NA +78,2020,UNWTO,NA +78,2021,UNWTO,NA +79,2008,UNWTO,NA +79,2009,UNWTO,NA +79,2010,UNWTO,NA +79,2011,UNWTO,NA +79,2012,UNWTO,NA +79,2013,UNWTO,NA +79,2014,UNWTO,NA +79,2015,UNWTO,NA +79,2016,UNWTO,NA +79,2017,UNWTO,NA +79,2018,UNWTO,NA +79,2019,UNWTO,NA +79,2020,UNWTO,NA +79,2021,UNWTO,NA +80,2008,UNWTO,NA +80,2009,UNWTO,NA +80,2010,UNWTO,NA +80,2011,UNWTO,NA +80,2012,UNWTO,NA +80,2013,UNWTO,NA +80,2014,UNWTO,NA +80,2015,UNWTO,NA +80,2016,UNWTO,NA +80,2017,UNWTO,NA +80,2018,UNWTO,NA +80,2019,UNWTO,NA +80,2020,UNWTO,NA +80,2021,UNWTO,NA +81,2008,UNWTO,NA +81,2009,UNWTO,NA +81,2010,UNWTO,NA +81,2011,UNWTO,NA +81,2012,UNWTO,NA +81,2013,UNWTO,NA +81,2014,UNWTO,NA +81,2015,UNWTO,NA +81,2016,UNWTO,NA +81,2017,UNWTO,NA +81,2018,UNWTO,NA +81,2019,UNWTO,NA +81,2020,UNWTO,NA +81,2021,2020 and 2021 gapfill method,gapfilled +82,2008,UNWTO,NA +82,2009,UNWTO,NA +82,2010,UNWTO,NA +82,2011,UNWTO,NA +82,2012,UNWTO,NA +82,2013,UNWTO,NA +82,2014,UNWTO,NA +82,2015,UNWTO,NA +82,2016,UNWTO,NA +82,2017,UNWTO,NA +82,2018,UNWTO,NA +82,2019,UNWTO,NA +82,2020,UNWTO,NA +82,2021,UNWTO,NA +96,2008,UNWTO,NA +96,2009,UNWTO,NA +96,2010,UNWTO,NA +96,2011,UNWTO,NA +96,2012,UNWTO,NA +96,2013,UNWTO,NA +96,2014,UNWTO,NA +96,2015,UNWTO,NA +96,2016,UNWTO,NA +96,2017,UNWTO,NA +96,2018,UNWTO,NA +96,2019,UNWTO,NA +96,2020,UNWTO,NA +96,2021,UNWTO,NA +98,2008,UNWTO,NA +98,2009,UNWTO,NA +98,2010,UNWTO,NA +98,2011,UNWTO,NA +98,2012,UNWTO,NA +98,2013,UNWTO,NA +98,2014,UNWTO,NA +98,2015,UNWTO,NA +98,2016,UNWTO,NA +98,2017,UNWTO,NA +98,2018,UNWTO,NA +98,2019,UNWTO,NA +98,2020,UNWTO,NA +98,2021,2020 and 2021 gapfill method,gapfilled +99,2008,UNWTO,NA +99,2009,UNWTO,NA +99,2010,UNWTO,NA +99,2011,UNWTO,NA +99,2012,UNWTO,NA +99,2013,UNWTO,NA +99,2014,UNWTO,NA +99,2015,UNWTO,NA +99,2016,UNWTO,NA +99,2017,UNWTO,NA +99,2018,UNWTO,NA +99,2019,UNWTO,NA +99,2020,UNWTO,NA +99,2021,2020 and 2021 gapfill method,gapfilled +100,2008,UNWTO,NA +100,2009,UNWTO,NA +100,2010,UNWTO,NA +100,2011,UNWTO,NA +100,2012,UNWTO,NA +100,2013,UNWTO,NA +100,2014,UNWTO,NA +100,2015,UNWTO,NA +100,2016,UNWTO,NA +100,2017,UNWTO,NA +100,2018,UNWTO,NA +100,2019,linear model,gapfilled +100,2020,2020 and 2021 gapfill method,gapfilled +100,2021,2020 and 2021 gapfill method,gapfilled +101,2008,UNWTO,NA +101,2009,UNWTO,NA +101,2010,UNWTO,NA +101,2011,UNWTO,NA +101,2012,UNWTO,NA +101,2013,UNWTO,NA +101,2014,UNWTO,NA +101,2015,UNWTO,NA +101,2016,UNWTO,NA +101,2017,UNWTO,NA +101,2018,UNWTO,NA +101,2019,UNWTO,NA +101,2020,UNWTO,NA +101,2021,UNWTO,NA +102,2008,UNWTO,NA +102,2009,UNWTO,NA +102,2010,UNWTO,NA +102,2011,UNWTO,NA +102,2012,UNWTO,NA +102,2013,UNWTO,NA +102,2014,UNWTO,NA +102,2015,UNWTO,NA +102,2016,UNWTO,NA +102,2017,UNWTO,NA +102,2018,UNWTO,NA +102,2019,UNWTO,NA +102,2020,UNWTO,NA +102,2021,UNWTO,NA +103,2008,UNWTO,NA +103,2009,UNWTO,NA +103,2010,UNWTO,NA +103,2011,UNWTO,NA +103,2012,nearby year,gapfilled +103,2013,nearby year,gapfilled +103,2014,nearby year,gapfilled +103,2015,UNWTO,NA +103,2016,UNWTO,NA +103,2017,UNWTO,NA +103,2018,UNWTO,NA +103,2019,UNWTO,NA +103,2020,UNWTO,NA +103,2021,UNWTO,NA +106,2008,UNWTO,NA +106,2009,UNWTO,NA +106,2010,UNWTO,NA +106,2011,UNWTO,NA +106,2012,UNWTO,NA +106,2013,UNWTO,NA +106,2014,UNWTO,NA +106,2015,UNWTO,NA +106,2016,UNWTO,NA +106,2017,UNWTO,NA +106,2018,UNWTO,NA +106,2019,UNWTO,NA +106,2020,UNWTO,NA +106,2021,UNWTO,NA +108,2008,UNWTO,NA +108,2009,UNWTO,NA +108,2010,UNWTO,NA +108,2011,UNWTO,NA +108,2012,UNWTO,NA +108,2013,UNWTO,NA +108,2014,UNWTO,NA +108,2015,UNWTO,NA +108,2016,UNWTO,NA +108,2017,UNWTO,NA +108,2018,UNWTO,NA +108,2019,UNWTO,NA +108,2020,UNWTO,NA +108,2021,UNWTO,NA +110,2008,UNWTO,NA +110,2009,UNWTO,NA +110,2010,UNWTO,NA +110,2011,UNWTO,NA +110,2012,UNWTO,NA +110,2013,UNWTO,NA +110,2014,UNWTO,NA +110,2015,UNWTO,NA +110,2016,UNWTO,NA +110,2017,UNWTO,NA +110,2018,UNWTO,NA +110,2019,UNWTO,NA +110,2020,UNWTO,NA +110,2021,UNWTO,NA +111,2008,UNWTO,NA +111,2009,UNWTO,NA +111,2010,UNWTO,NA +111,2011,UNWTO,NA +111,2012,UNWTO,NA +111,2013,UNWTO,NA +111,2014,UNWTO,NA +111,2015,UNWTO,NA +111,2016,UNWTO,NA +111,2017,UNWTO,NA +111,2018,UNWTO,NA +111,2019,UNWTO,NA +111,2020,UNWTO,NA +111,2021,UNWTO,NA +112,2008,UNWTO,NA +112,2009,UNWTO,NA +112,2010,UNWTO,NA +112,2011,UNWTO,NA +112,2012,UNWTO,NA +112,2013,UNWTO,NA +112,2014,UNWTO,NA +112,2015,UNWTO,NA +112,2016,UNWTO,NA +112,2017,UNWTO,NA +112,2018,UNWTO,NA +112,2019,UNWTO,NA +112,2020,UNWTO,NA +112,2021,2020 and 2021 gapfill method,gapfilled +113,2008,UNWTO,NA +113,2009,UNWTO,NA +113,2010,UNWTO,NA +113,2011,UNWTO,NA +113,2012,UNWTO,NA +113,2013,UNWTO,NA +113,2014,UNWTO,NA +113,2015,UNWTO,NA +113,2016,UNWTO,NA +113,2017,UNWTO,NA +113,2018,UNWTO,NA +113,2019,UNWTO,NA +113,2020,UNWTO,NA +113,2021,UNWTO,NA +114,2008,UNWTO,NA +114,2009,UNWTO,NA +114,2010,UNWTO,NA +114,2011,UNWTO,NA +114,2012,UNWTO,NA +114,2013,UNWTO,NA +114,2014,UNWTO,NA +114,2015,UNWTO,NA +114,2016,UNWTO,NA +114,2017,UNWTO,NA +114,2018,UNWTO,NA +114,2019,UNWTO,NA +114,2020,UNWTO,NA +114,2021,2020 and 2021 gapfill method,gapfilled +115,2008,UNWTO,NA +115,2009,UNWTO,NA +115,2010,UNWTO,NA +115,2011,UNWTO,NA +115,2012,UNWTO,NA +115,2013,UNWTO,NA +115,2014,UNWTO,NA +115,2015,UNWTO,NA +115,2016,UNWTO,NA +115,2017,UNWTO,NA +115,2018,UNWTO,NA +115,2019,UNWTO,NA +115,2020,UNWTO,NA +115,2021,UNWTO,NA +116,2008,UNWTO,NA +116,2009,UNWTO,NA +116,2010,UNWTO,NA +116,2011,UNWTO,NA +116,2012,UNWTO,NA +116,2013,UNWTO,NA +116,2014,UNWTO,NA +116,2015,UNWTO,NA +116,2016,UNWTO,NA +116,2017,UNWTO,NA +116,2018,UNWTO,NA +116,2019,UNWTO,NA +116,2020,UNWTO,NA +116,2021,2020 and 2021 gapfill method,gapfilled +117,2008,UNWTO,NA +117,2009,UNWTO,NA +117,2010,UNWTO,NA +117,2011,UNWTO,NA +117,2012,UNWTO,NA +117,2013,UNWTO,NA +117,2014,UNWTO,NA +117,2015,UNWTO,NA +117,2016,UNWTO,NA +117,2017,UNWTO,NA +117,2018,UNWTO,NA +117,2019,UNWTO,NA +117,2020,UNWTO,NA +117,2021,2020 and 2021 gapfill method,gapfilled +118,2008,UNWTO,NA +118,2009,UNWTO,NA +118,2010,UNWTO,NA +118,2011,UNWTO,NA +118,2012,UNWTO,NA +118,2013,UNWTO,NA +118,2014,UNWTO,NA +118,2015,UNWTO,NA +118,2016,UNWTO,NA +118,2017,UNWTO,NA +118,2018,UNWTO,NA +118,2019,UNWTO,NA +118,2020,UNWTO,NA +118,2021,UNWTO,NA +119,2008,UNWTO,NA +119,2009,UNWTO,NA +119,2010,UNWTO,NA +119,2011,UNWTO,NA +119,2012,UNWTO,NA +119,2013,UNWTO,NA +119,2014,UNWTO,NA +119,2015,UNWTO,NA +119,2016,UNWTO,NA +119,2017,UNWTO,NA +119,2018,UNWTO,NA +119,2019,UNWTO,NA +119,2020,UNWTO,NA +119,2021,2020 and 2021 gapfill method,gapfilled +120,2008,UNWTO,NA +120,2009,UNWTO,NA +120,2010,UNWTO,NA +120,2011,UNWTO,NA +120,2012,UNWTO,NA +120,2013,UNWTO,NA +120,2014,UNWTO,NA +120,2015,UNWTO,NA +120,2016,UNWTO,NA +120,2017,UNWTO,NA +120,2018,UNWTO,NA +120,2019,UNWTO,NA +120,2020,UNWTO,NA +120,2021,UNWTO,NA +121,2008,UNWTO,NA +121,2009,UNWTO,NA +121,2010,UNWTO,NA +121,2011,UNWTO,NA +121,2012,UNWTO,NA +121,2013,UNWTO,NA +121,2014,UNWTO,NA +121,2015,UNWTO,NA +121,2016,UNWTO,NA +121,2017,UNWTO,NA +121,2018,UNWTO,NA +121,2019,UNWTO,NA +121,2020,UNWTO,NA +121,2021,UNWTO,NA +122,2008,UNWTO,NA +122,2009,UNWTO,NA +122,2010,UNWTO,NA +122,2011,UNWTO,NA +122,2012,UNWTO,NA +122,2013,UNWTO,NA +122,2014,UNWTO,NA +122,2015,UNWTO,NA +122,2016,UNWTO,NA +122,2017,UNWTO,NA +122,2018,UNWTO,NA +122,2019,UNWTO,NA +122,2020,UNWTO,NA +122,2021,UNWTO,NA +123,2008,UNWTO,NA +123,2009,UNWTO,NA +123,2010,UNWTO,NA +123,2011,UNWTO,NA +123,2012,UNWTO,NA +123,2013,UNWTO,NA +123,2014,UNWTO,NA +123,2015,UNWTO,NA +123,2016,UNWTO,NA +123,2017,UNWTO,NA +123,2018,UNWTO,NA +123,2019,UNWTO,NA +123,2020,UNWTO,NA +123,2021,2020 and 2021 gapfill method,gapfilled +124,2008,UNWTO,NA +124,2009,UNWTO,NA +124,2010,UNWTO,NA +124,2011,UNWTO,NA +124,2012,UNWTO,NA +124,2013,UNWTO,NA +124,2014,UNWTO,NA +124,2015,UNWTO,NA +124,2016,UNWTO,NA +124,2017,UNWTO,NA +124,2018,UNWTO,NA +124,2019,UNWTO,NA +124,2020,UNWTO,NA +124,2021,2020 and 2021 gapfill method,gapfilled +125,2008,UNWTO,NA +125,2009,UNWTO,NA +125,2010,UNWTO,NA +125,2011,UNWTO,NA +125,2012,UNWTO,NA +125,2013,UNWTO,NA +125,2014,UNWTO,NA +125,2015,UNWTO,NA +125,2016,UNWTO,NA +125,2017,UNWTO,NA +125,2018,UNWTO,NA +125,2019,UNWTO,NA +125,2020,UNWTO,NA +125,2021,2020 and 2021 gapfill method,gapfilled +126,2008,UNWTO,NA +126,2009,UNWTO,NA +126,2010,UNWTO,NA +126,2011,UNWTO,NA +126,2012,UNWTO,NA +126,2013,UNWTO,NA +126,2014,UNWTO,NA +126,2015,UNWTO,NA +126,2016,UNWTO,NA +126,2017,UNWTO,NA +126,2018,UNWTO,NA +126,2019,UNWTO,NA +126,2020,UNWTO,NA +126,2021,UNWTO,NA +127,2008,UNWTO,NA +127,2009,UNWTO,NA +127,2010,UNWTO,NA +127,2011,UNWTO,NA +127,2012,UNWTO,NA +127,2013,UNWTO,NA +127,2014,UNWTO,NA +127,2015,UNWTO,NA +127,2016,UNWTO,NA +127,2017,UNWTO,NA +127,2018,UNWTO,NA +127,2019,UNWTO,NA +127,2020,UNWTO,NA +127,2021,UNWTO,NA +129,2008,UNWTO,NA +129,2009,UNWTO,NA +129,2010,UNWTO,NA +129,2011,UNWTO,NA +129,2012,UNWTO,NA +129,2013,UNWTO,NA +129,2014,UNWTO,NA +129,2015,UNWTO,NA +129,2016,UNWTO,NA +129,2017,UNWTO,NA +129,2018,UNWTO,NA +129,2019,UNWTO,NA +129,2020,UNWTO,NA +129,2021,UNWTO,NA +130,2008,UNWTO,NA +130,2009,UNWTO,NA +130,2010,UNWTO,NA +130,2011,UNWTO,NA +130,2012,UNWTO,NA +130,2013,UNWTO,NA +130,2014,UNWTO,NA +130,2015,UNWTO,NA +130,2016,UNWTO,NA +130,2017,UNWTO,NA +130,2018,UNWTO,NA +130,2019,UNWTO,NA +130,2020,UNWTO,NA +130,2021,UNWTO,NA +131,2008,UNWTO,NA +131,2009,UNWTO,NA +131,2010,UNWTO,NA +131,2011,UNWTO,NA +131,2012,UNWTO,NA +131,2013,UNWTO,NA +131,2014,UNWTO,NA +131,2015,UNWTO,NA +131,2016,UNWTO,NA +131,2017,UNWTO,NA +131,2018,UNWTO,NA +131,2019,UNWTO,NA +131,2020,UNWTO,NA +131,2021,UNWTO,NA +132,2008,UNWTO,NA +132,2009,UNWTO,NA +132,2010,UNWTO,NA +132,2011,UNWTO,NA +132,2012,UNWTO,NA +132,2013,UNWTO,NA +132,2014,UNWTO,NA +132,2015,UNWTO,NA +132,2016,UNWTO,NA +132,2017,UNWTO,NA +132,2018,UNWTO,NA +132,2019,UNWTO,NA +132,2020,UNWTO,NA +132,2021,UNWTO,NA +133,2008,UNWTO,NA +133,2009,UNWTO,NA +133,2010,UNWTO,NA +133,2011,UNWTO,NA +133,2012,UNWTO,NA +133,2013,UNWTO,NA +133,2014,UNWTO,NA +133,2015,UNWTO,NA +133,2016,UNWTO,NA +133,2017,UNWTO,NA +133,2018,UNWTO,NA +133,2019,UNWTO,NA +133,2020,UNWTO,NA +133,2021,UNWTO,NA +134,2008,UNWTO,NA +134,2009,UNWTO,NA +134,2010,UNWTO,NA +134,2011,UNWTO,NA +134,2012,UNWTO,NA +134,2013,UNWTO,NA +134,2014,UNWTO,NA +134,2015,UNWTO,NA +134,2016,UNWTO,NA +134,2017,UNWTO,NA +134,2018,UNWTO,NA +134,2019,UNWTO,NA +134,2020,UNWTO,NA +134,2021,UNWTO,NA +135,2008,UNWTO,NA +135,2009,UNWTO,NA +135,2010,UNWTO,NA +135,2011,UNWTO,NA +135,2012,UNWTO,NA +135,2013,UNWTO,NA +135,2014,UNWTO,NA +135,2015,UNWTO,NA +135,2016,UNWTO,NA +135,2017,UNWTO,NA +135,2018,UNWTO,NA +135,2019,UNWTO,NA +135,2020,UNWTO,NA +135,2021,2020 and 2021 gapfill method,gapfilled +136,2008,UNWTO,NA +136,2009,UNWTO,NA +136,2010,UNWTO,NA +136,2011,UNWTO,NA +136,2012,UNWTO,NA +136,2013,UNWTO,NA +136,2014,UNWTO,NA +136,2015,UNWTO,NA +136,2016,UNWTO,NA +136,2017,UNWTO,NA +136,2018,UNWTO,NA +136,2019,UNWTO,NA +136,2020,UNWTO,NA +136,2021,UNWTO,NA +138,2008,UNWTO,NA +138,2009,UNWTO,NA +138,2010,UNWTO,NA +138,2011,UNWTO,NA +138,2012,UNWTO,NA +138,2013,UNWTO,NA +138,2014,UNWTO,NA +138,2015,UNWTO,NA +138,2016,UNWTO,NA +138,2017,UNWTO,NA +138,2018,UNWTO,NA +138,2019,UNWTO,NA +138,2020,UNWTO,NA +138,2021,UNWTO,NA +139,2008,UNWTO,NA +139,2009,UNWTO,NA +139,2010,UNWTO,NA +139,2011,UNWTO,NA +139,2012,UNWTO,NA +139,2013,UNWTO,NA +139,2014,UNWTO,NA +139,2015,UNWTO,NA +139,2016,UNWTO,NA +139,2017,UNWTO,NA +139,2018,linear model,gapfilled +139,2019,linear model,gapfilled +139,2020,2020 and 2021 gapfill method,gapfilled +139,2021,2020 and 2021 gapfill method,gapfilled +143,2008,UNWTO,NA +143,2009,UNWTO,NA +143,2010,UNWTO,NA +143,2011,UNWTO,NA +143,2012,UNWTO,NA +143,2013,UNWTO,NA +143,2014,UNWTO,NA +143,2015,UNWTO,NA +143,2016,UNWTO,NA +143,2017,UNWTO,NA +143,2018,UNWTO,NA +143,2019,UNWTO,NA +143,2020,UNWTO,NA +143,2021,UNWTO,NA +147,2008,UNWTO,NA +147,2009,UNWTO,NA +147,2010,UNWTO,NA +147,2011,UNWTO,NA +147,2012,UNWTO,NA +147,2013,UNWTO,NA +147,2014,UNWTO,NA +147,2015,UNWTO,NA +147,2016,UNWTO,NA +147,2017,UNWTO,NA +147,2018,UNWTO,NA +147,2019,UNWTO,NA +147,2020,UNWTO,NA +147,2021,UNWTO,NA +148,2008,UNWTO,NA +148,2009,UNWTO,NA +148,2010,UNWTO,NA +148,2011,UNWTO,NA +148,2012,UNWTO,NA +148,2013,UNWTO,NA +148,2014,UNWTO,NA +148,2015,UNWTO,NA +148,2016,UNWTO,NA +148,2017,UNWTO,NA +148,2018,UNWTO,NA +148,2019,UNWTO,NA +148,2020,UNWTO,NA +148,2021,2020 and 2021 gapfill method,gapfilled +151,2008,UNWTO,NA +151,2009,UNWTO,NA +151,2010,UNWTO,NA +151,2011,UNWTO,NA +151,2012,UNWTO,NA +151,2013,UNWTO,NA +151,2014,UNWTO,NA +151,2015,UNWTO,NA +151,2016,UNWTO,NA +151,2017,UNWTO,NA +151,2018,UNWTO,NA +151,2019,UNWTO,NA +151,2020,UNWTO,NA +151,2021,2020 and 2021 gapfill method,gapfilled +152,2008,UNWTO,NA +152,2009,UNWTO,NA +152,2010,UNWTO,NA +152,2011,UNWTO,NA +152,2012,UNWTO,NA +152,2013,UNWTO,NA +152,2014,UNWTO,NA +152,2015,UNWTO,NA +152,2016,UNWTO,NA +152,2017,UNWTO,NA +152,2018,UNWTO,NA +152,2019,UNWTO,NA +152,2020,UNWTO,NA +152,2021,UNWTO,NA +153,2008,UNWTO,NA +153,2009,UNWTO,NA +153,2010,UNWTO,NA +153,2011,UNWTO,NA +153,2012,UNWTO,NA +153,2013,UNWTO,NA +153,2014,UNWTO,NA +153,2015,UNWTO,NA +153,2016,UNWTO,NA +153,2017,UNWTO,NA +153,2018,UNWTO,NA +153,2019,UNWTO,NA +153,2020,UNWTO,NA +153,2021,UNWTO,NA +155,2008,UNWTO,NA +155,2009,UNWTO,NA +155,2010,UNWTO,NA +155,2011,UNWTO,NA +155,2012,UNWTO,NA +155,2013,UNWTO,NA +155,2014,UNWTO,NA +155,2015,UNWTO,NA +155,2016,UNWTO,NA +155,2017,UNWTO,NA +155,2018,UNWTO,NA +155,2019,UNWTO,NA +155,2020,UNWTO,NA +155,2021,UNWTO,NA +157,2008,UNWTO,NA +157,2009,UNWTO,NA +157,2010,UNWTO,NA +157,2011,UNWTO,NA +157,2012,UNWTO,NA +157,2013,UNWTO,NA +157,2014,UNWTO,NA +157,2015,UNWTO,NA +157,2016,UNWTO,NA +157,2017,UNWTO,NA +157,2018,UNWTO,NA +157,2019,UNWTO,NA +157,2020,UNWTO,NA +157,2021,2020 and 2021 gapfill method,gapfilled +162,2008,UNWTO,NA +162,2009,UNWTO,NA +162,2010,UNWTO,NA +162,2011,UNWTO,NA +162,2012,UNWTO,NA +162,2013,UNWTO,NA +162,2014,UNWTO,NA +162,2015,UNWTO,NA +162,2016,UNWTO,NA +162,2017,UNWTO,NA +162,2018,UNWTO,NA +162,2019,UNWTO,NA +162,2020,UNWTO,NA +162,2021,UNWTO,NA +163,2008,UNWTO,NA +163,2009,UNWTO,NA +163,2010,UNWTO,NA +163,2011,UNWTO,NA +163,2012,UNWTO,NA +163,2013,UNWTO,NA +163,2014,UNWTO,NA +163,2015,UNWTO,NA +163,2016,UNWTO,NA +163,2017,UNWTO,NA +163,2018,UNWTO,NA +163,2019,UNWTO,NA +163,2020,UNWTO,NA +163,2021,UNWTO,NA +164,2008,UNWTO,NA +164,2009,UNWTO,NA +164,2010,UNWTO,NA +164,2011,UNWTO,NA +164,2012,UNWTO,NA +164,2013,UNWTO,NA +164,2014,UNWTO,NA +164,2015,UNWTO,NA +164,2016,UNWTO,NA +164,2017,UNWTO,NA +164,2018,UNWTO,NA +164,2019,UNWTO,NA +164,2020,UNWTO,NA +164,2021,UNWTO,NA +166,2008,UNWTO,NA +166,2009,UNWTO,NA +166,2010,UNWTO,NA +166,2011,UNWTO,NA +166,2012,UNWTO,NA +166,2013,UNWTO,NA +166,2014,UNWTO,NA +166,2015,UNWTO,NA +166,2016,UNWTO,NA +166,2017,UNWTO,NA +166,2018,UNWTO,NA +166,2019,UNWTO,NA +166,2020,UNWTO,NA +166,2021,UNWTO,NA +167,2008,UNWTO,NA +167,2009,UNWTO,NA +167,2010,UNWTO,NA +167,2011,UNWTO,NA +167,2012,UNWTO,NA +167,2013,UNWTO,NA +167,2014,UNWTO,NA +167,2015,UNWTO,NA +167,2016,UNWTO,NA +167,2017,UNWTO,NA +167,2018,UNWTO,NA +167,2019,UNWTO,NA +167,2020,UNWTO,NA +167,2021,2020 and 2021 gapfill method,gapfilled +168,2008,UNWTO,NA +168,2009,UNWTO,NA +168,2010,UNWTO,NA +168,2011,UNWTO,NA +168,2012,UNWTO,NA +168,2013,UNWTO,NA +168,2014,UNWTO,NA +168,2015,UNWTO,NA +168,2016,UNWTO,NA +168,2017,UNWTO,NA +168,2018,linear model,gapfilled +168,2019,linear model,gapfilled +168,2020,2020 and 2021 gapfill method,gapfilled +168,2021,2020 and 2021 gapfill method,gapfilled +169,2008,nearby year,gapfilled +169,2009,UNWTO,NA +169,2010,nearby year,gapfilled +169,2011,nearby year,gapfilled +169,2012,nearby year,gapfilled +169,2013,nearby year,gapfilled +169,2014,nearby year,gapfilled +169,2015,UNWTO,NA +169,2016,UNWTO,NA +169,2017,UNWTO,NA +169,2018,linear model,gapfilled +169,2019,linear model,gapfilled +169,2020,2020 and 2021 gapfill method,gapfilled +169,2021,2020 and 2021 gapfill method,gapfilled +171,2008,UNWTO,NA +171,2009,UNWTO,NA +171,2010,UNWTO,NA +171,2011,UNWTO,NA +171,2012,UNWTO,NA +171,2013,UNWTO,NA +171,2014,UNWTO,NA +171,2015,UNWTO,NA +171,2016,UNWTO,NA +171,2017,UNWTO,NA +171,2018,UNWTO,NA +171,2019,UNWTO,NA +171,2020,UNWTO,NA +171,2021,2020 and 2021 gapfill method,gapfilled +172,2008,UNWTO,NA +172,2009,UNWTO,NA +172,2010,UNWTO,NA +172,2011,UNWTO,NA +172,2012,UNWTO,NA +172,2013,UNWTO,NA +172,2014,UNWTO,NA +172,2015,UNWTO,NA +172,2016,UNWTO,NA +172,2017,UNWTO,NA +172,2018,UNWTO,NA +172,2019,UNWTO,NA +172,2020,UNWTO,NA +172,2021,UNWTO,NA +173,2008,UNWTO,NA +173,2009,UNWTO,NA +173,2010,UNWTO,NA +173,2011,UNWTO,NA +173,2012,UNWTO,NA +173,2013,UNWTO,NA +173,2014,UNWTO,NA +173,2015,UNWTO,NA +173,2016,UNWTO,NA +173,2017,UNWTO,NA +173,2018,UNWTO,NA +173,2019,UNWTO,NA +173,2020,2020 and 2021 gapfill method,gapfilled +173,2021,2020 and 2021 gapfill method,gapfilled +174,2008,UNWTO,NA +174,2009,UNWTO,NA +174,2010,UNWTO,NA +174,2011,UNWTO,NA +174,2012,UNWTO,NA +174,2013,UNWTO,NA +174,2014,UNWTO,NA +174,2015,UNWTO,NA +174,2016,UNWTO,NA +174,2017,UNWTO,NA +174,2018,UNWTO,NA +174,2019,UNWTO,NA +174,2020,UNWTO,NA +174,2021,UNWTO,NA +175,2008,UNWTO,NA +175,2009,UNWTO,NA +175,2010,UNWTO,NA +175,2011,UNWTO,NA +175,2012,UNWTO,NA +175,2013,UNWTO,NA +175,2014,UNWTO,NA +175,2015,UNWTO,NA +175,2016,UNWTO,NA +175,2017,UNWTO,NA +175,2018,UNWTO,NA +175,2019,UNWTO,NA +175,2020,UNWTO,NA +175,2021,UNWTO,NA +176,2008,UNWTO,NA +176,2009,UNWTO,NA +176,2010,UNWTO,NA +176,2011,UNWTO,NA +176,2012,UNWTO,NA +176,2013,UNWTO,NA +176,2014,UNWTO,NA +176,2015,UNWTO,NA +176,2016,UNWTO,NA +176,2017,UNWTO,NA +176,2018,UNWTO,NA +176,2019,UNWTO,NA +176,2020,UNWTO,NA +176,2021,UNWTO,NA +177,2008,UNWTO,NA +177,2009,UNWTO,NA +177,2010,UNWTO,NA +177,2011,UNWTO,NA +177,2012,UNWTO,NA +177,2013,UNWTO,NA +177,2014,UNWTO,NA +177,2015,UNWTO,NA +177,2016,UNWTO,NA +177,2017,UNWTO,NA +177,2018,UNWTO,NA +177,2019,UNWTO,NA +177,2020,UNWTO,NA +177,2021,2020 and 2021 gapfill method,gapfilled +178,2008,UNWTO,NA +178,2009,UNWTO,NA +178,2010,UNWTO,NA +178,2011,UNWTO,NA +178,2012,UNWTO,NA +178,2013,UNWTO,NA +178,2014,UNWTO,NA +178,2015,UNWTO,NA +178,2016,UNWTO,NA +178,2017,UNWTO,NA +178,2018,UNWTO,NA +178,2019,UNWTO,NA +178,2020,UNWTO,NA +178,2021,2020 and 2021 gapfill method,gapfilled +179,2008,UNWTO,NA +179,2009,UNWTO,NA +179,2010,UNWTO,NA +179,2011,UNWTO,NA +179,2012,UNWTO,NA +179,2013,UNWTO,NA +179,2014,UNWTO,NA +179,2015,UNWTO,NA +179,2016,UNWTO,NA +179,2017,UNWTO,NA +179,2018,UNWTO,NA +179,2019,UNWTO,NA +179,2020,UNWTO,NA +179,2021,2020 and 2021 gapfill method,gapfilled +180,2008,UNWTO,NA +180,2009,UNWTO,NA +180,2010,UNWTO,NA +180,2011,UNWTO,NA +180,2012,UNWTO,NA +180,2013,UNWTO,NA +180,2014,UNWTO,NA +180,2015,UNWTO,NA +180,2016,UNWTO,NA +180,2017,UNWTO,NA +180,2018,UNWTO,NA +180,2019,UNWTO,NA +180,2020,UNWTO,NA +180,2021,2020 and 2021 gapfill method,gapfilled +181,2008,UNWTO,NA +181,2009,UNWTO,NA +181,2010,UNWTO,NA +181,2011,UNWTO,NA +181,2012,UNWTO,NA +181,2013,UNWTO,NA +181,2014,UNWTO,NA +181,2015,UNWTO,NA +181,2016,UNWTO,NA +181,2017,UNWTO,NA +181,2018,UNWTO,NA +181,2019,UNWTO,NA +181,2020,2020 and 2021 gapfill method,gapfilled +181,2021,2020 and 2021 gapfill method,gapfilled +182,2008,UNWTO,NA +182,2009,UNWTO,NA +182,2010,UNWTO,NA +182,2011,UNWTO,NA +182,2012,UNWTO,NA +182,2013,UNWTO,NA +182,2014,UNWTO,NA +182,2015,UNWTO,NA +182,2016,UNWTO,NA +182,2017,UNWTO,NA +182,2018,UNWTO,NA +182,2019,UNWTO,NA +182,2020,UNWTO,NA +182,2021,UNWTO,NA +183,2008,UNWTO,NA +183,2009,UNWTO,NA +183,2010,UNWTO,NA +183,2011,UNWTO,NA +183,2012,UNWTO,NA +183,2013,UNWTO,NA +183,2014,UNWTO,NA +183,2015,UNWTO,NA +183,2016,UNWTO,NA +183,2017,UNWTO,NA +183,2018,UNWTO,NA +183,2019,UNWTO,NA +183,2020,UNWTO,NA +183,2021,UNWTO,NA +184,2008,UNWTO,NA +184,2009,UNWTO,NA +184,2010,UNWTO,NA +184,2011,UNWTO,NA +184,2012,UNWTO,NA +184,2013,UNWTO,NA +184,2014,UNWTO,NA +184,2015,UNWTO,NA +184,2016,UNWTO,NA +184,2017,UNWTO,NA +184,2018,UNWTO,NA +184,2019,UNWTO,NA +184,2020,UNWTO,NA +184,2021,UNWTO,NA +185,2008,UNWTO,NA +185,2009,UNWTO,NA +185,2010,UNWTO,NA +185,2011,UNWTO,NA +185,2012,UNWTO,NA +185,2013,UNWTO,NA +185,2014,UNWTO,NA +185,2015,UNWTO,NA +185,2016,UNWTO,NA +185,2017,UNWTO,NA +185,2018,UNWTO,NA +185,2019,UNWTO,NA +185,2020,UNWTO,NA +185,2021,UNWTO,NA +186,2008,UNWTO,NA +186,2009,UNWTO,NA +186,2010,UNWTO,NA +186,2011,UNWTO,NA +186,2012,UNWTO,NA +186,2013,UNWTO,NA +186,2014,UNWTO,NA +186,2015,UNWTO,NA +186,2016,UNWTO,NA +186,2017,UNWTO,NA +186,2018,UNWTO,NA +186,2019,UNWTO,NA +186,2020,UNWTO,NA +186,2021,2020 and 2021 gapfill method,gapfilled +187,2008,UNWTO,NA +187,2009,UNWTO,NA +187,2010,UNWTO,NA +187,2011,UNWTO,NA +187,2012,UNWTO,NA +187,2013,UNWTO,NA +187,2014,UNWTO,NA +187,2015,UNWTO,NA +187,2016,UNWTO,NA +187,2017,UNWTO,NA +187,2018,UNWTO,NA +187,2019,UNWTO,NA +187,2020,UNWTO,NA +187,2021,UNWTO,NA +188,2008,UNWTO,NA +188,2009,UNWTO,NA +188,2010,UNWTO,NA +188,2011,UNWTO,NA +188,2012,UNWTO,NA +188,2013,UNWTO,NA +188,2014,UNWTO,NA +188,2015,UNWTO,NA +188,2016,UNWTO,NA +188,2017,UNWTO,NA +188,2018,UNWTO,NA +188,2019,UNWTO,NA +188,2020,UNWTO,NA +188,2021,UNWTO,NA +189,2008,UNWTO,NA +189,2009,UNWTO,NA +189,2010,UNWTO,NA +189,2011,UNWTO,NA +189,2012,UNWTO,NA +189,2013,UNWTO,NA +189,2014,UNWTO,NA +189,2015,UNWTO,NA +189,2016,UNWTO,NA +189,2017,UNWTO,NA +189,2018,UNWTO,NA +189,2019,UNWTO,NA +189,2020,UNWTO,NA +189,2021,2020 and 2021 gapfill method,gapfilled +190,2008,UNWTO,NA +190,2009,linear model,gapfilled +190,2010,linear model,gapfilled +190,2011,linear model,gapfilled +190,2012,linear model,gapfilled +190,2013,linear model,gapfilled +190,2014,linear model,gapfilled +190,2015,linear model,gapfilled +190,2016,linear model,gapfilled +190,2017,linear model,gapfilled +190,2018,linear model,gapfilled +190,2019,linear model,gapfilled +190,2020,2020 and 2021 gapfill method,gapfilled +190,2021,2020 and 2021 gapfill method,gapfilled +193,2008,UNWTO,NA +193,2009,UNWTO,NA +193,2010,UNWTO,NA +193,2011,UNWTO,NA +193,2012,UNWTO,NA +193,2013,UNWTO,NA +193,2014,UNWTO,NA +193,2015,UNWTO,NA +193,2016,UNWTO,NA +193,2017,UNWTO,NA +193,2018,UNWTO,NA +193,2019,UNWTO,NA +193,2020,2020 and 2021 gapfill method,gapfilled +193,2021,2020 and 2021 gapfill method,gapfilled +194,2008,UNWTO,NA +194,2009,nearby year,gapfilled +194,2010,UNWTO,NA +194,2011,UNWTO,NA +194,2012,UNWTO,NA +194,2013,UNWTO,NA +194,2014,UNWTO,NA +194,2015,UNWTO,NA +194,2016,UNWTO,NA +194,2017,UNWTO,NA +194,2018,linear model,gapfilled +194,2019,linear model,gapfilled +194,2020,2020 and 2021 gapfill method,gapfilled +194,2021,2020 and 2021 gapfill method,gapfilled +196,2008,UNWTO,NA +196,2009,UNWTO,NA +196,2010,UNWTO,NA +196,2011,UNWTO,NA +196,2012,UNWTO,NA +196,2013,UNWTO,NA +196,2014,nearby year,gapfilled +196,2015,UNWTO,NA +196,2016,UNWTO,NA +196,2017,UNWTO,NA +196,2018,UNWTO,NA +196,2019,UNWTO,NA +196,2020,UNWTO,NA +196,2021,UNWTO,NA +197,2008,UNWTO,NA +197,2009,UNWTO,NA +197,2010,UNWTO,NA +197,2011,UNWTO,NA +197,2012,UNWTO,NA +197,2013,linear model,gapfilled +197,2014,linear model,gapfilled +197,2015,linear model,gapfilled +197,2016,linear model,gapfilled +197,2017,linear model,gapfilled +197,2018,linear model,gapfilled +197,2019,linear model,gapfilled +197,2020,2020 and 2021 gapfill method,gapfilled +197,2021,2020 and 2021 gapfill method,gapfilled +198,2008,linear model,gapfilled +198,2009,linear model,gapfilled +198,2010,linear model,gapfilled +198,2011,linear model,gapfilled +198,2012,linear model,gapfilled +198,2013,linear model,gapfilled +198,2014,linear model,gapfilled +198,2015,linear model,gapfilled +198,2016,linear model,gapfilled +198,2017,linear model,gapfilled +198,2018,linear model,gapfilled +198,2019,linear model,gapfilled +198,2020,2020 and 2021 gapfill method,gapfilled +198,2021,2020 and 2021 gapfill method,gapfilled +199,2008,UNWTO,NA +199,2009,UNWTO,NA +199,2010,UNWTO,NA +199,2011,UNWTO,NA +199,2012,UNWTO,NA +199,2013,UNWTO,NA +199,2014,UNWTO,NA +199,2015,UNWTO,NA +199,2016,UNWTO,NA +199,2017,linear model,gapfilled +199,2018,linear model,gapfilled +199,2019,linear model,gapfilled +199,2020,2020 and 2021 gapfill method,gapfilled +199,2021,2020 and 2021 gapfill method,gapfilled +200,2008,UNWTO,NA +200,2009,UNWTO,NA +200,2010,UNWTO,NA +200,2011,UNWTO,NA +200,2012,UNWTO,NA +200,2013,UNWTO,NA +200,2014,UNWTO,NA +200,2015,UNWTO,NA +200,2016,UNWTO,NA +200,2017,UNWTO,NA +200,2018,UNWTO,NA +200,2019,UNWTO,NA +200,2020,UNWTO,NA +200,2021,2020 and 2021 gapfill method,gapfilled +202,2008,UNWTO,NA +202,2009,UNWTO,NA +202,2010,UNWTO,NA +202,2011,UNWTO,NA +202,2012,UNWTO,NA +202,2013,UNWTO,NA +202,2014,UNWTO,NA +202,2015,UNWTO,NA +202,2016,UNWTO,NA +202,2017,UNWTO,NA +202,2018,UNWTO,NA +202,2019,UNWTO,NA +202,2020,UNWTO,NA +202,2021,2020 and 2021 gapfill method,gapfilled +203,2008,UNWTO,NA +203,2009,UNWTO,NA +203,2010,UNWTO,NA +203,2011,UNWTO,NA +203,2012,UNWTO,NA +203,2013,UNWTO,NA +203,2014,UNWTO,NA +203,2015,UNWTO,NA +203,2016,UNWTO,NA +203,2017,UNWTO,NA +203,2018,UNWTO,NA +203,2019,UNWTO,NA +203,2020,UNWTO,NA +203,2021,UNWTO,NA +204,2008,UNWTO,NA +204,2009,UNWTO,NA +204,2010,UNWTO,NA +204,2011,UNWTO,NA +204,2012,UNWTO,NA +204,2013,UNWTO,NA +204,2014,UNWTO,NA +204,2015,UNWTO,NA +204,2016,UNWTO,NA +204,2017,UNWTO,NA +204,2018,UNWTO,NA +204,2019,UNWTO,NA +204,2020,UNWTO,NA +204,2021,2020 and 2021 gapfill method,gapfilled +205,2008,UNWTO,NA +205,2009,UNWTO,NA +205,2010,UNWTO,NA +205,2011,UNWTO,NA +205,2012,UNWTO,NA +205,2013,UNWTO,NA +205,2014,UNWTO,NA +205,2015,UNWTO,NA +205,2016,UNWTO,NA +205,2017,UNWTO,NA +205,2018,UNWTO,NA +205,2019,UNWTO,NA +205,2020,UNWTO,NA +205,2021,UNWTO,NA +206,2008,UNWTO,NA +206,2009,UNWTO,NA +206,2010,UNWTO,NA +206,2011,UNWTO,NA +206,2012,UNWTO,NA +206,2013,UNWTO,NA +206,2014,UNWTO,NA +206,2015,UNWTO,NA +206,2016,UNWTO,NA +206,2017,UNWTO,NA +206,2018,UNWTO,NA +206,2019,UNWTO,NA +206,2020,UNWTO,NA +206,2021,UNWTO,NA +207,2008,UNWTO - subtraction,gapfilled +207,2009,UNWTO - subtraction,gapfilled +207,2010,UNWTO - subtraction,gapfilled +207,2011,UNWTO - subtraction,gapfilled +207,2012,nearby year,gapfilled +207,2013,UNWTO,NA +207,2014,UNWTO,NA +207,2015,UNWTO,NA +207,2016,linear model,gapfilled +207,2017,linear model,gapfilled +207,2018,linear model,gapfilled +207,2019,linear model,gapfilled +207,2020,2020 and 2021 gapfill method,gapfilled +207,2021,2020 and 2021 gapfill method,gapfilled +208,2008,UNWTO,NA +208,2009,UNWTO,NA +208,2010,UNWTO,NA +208,2011,UNWTO,NA +208,2012,UNWTO,NA +208,2013,UNWTO,NA +208,2014,UNWTO,NA +208,2015,UNWTO,NA +208,2016,UNWTO,NA +208,2017,UNWTO,NA +208,2018,UNWTO,NA +208,2019,UNWTO,NA +208,2020,UNWTO,NA +208,2021,2020 and 2021 gapfill method,gapfilled +209,2008,UNWTO,NA +209,2009,UNWTO,NA +209,2010,UNWTO,NA +209,2011,UNWTO,NA +209,2012,UNWTO,NA +209,2013,UNWTO,NA +209,2014,UNWTO,NA +209,2015,UNWTO,NA +209,2016,UNWTO,NA +209,2017,UNWTO,NA +209,2018,UNWTO,NA +209,2019,UNWTO,NA +209,2020,UNWTO,NA +209,2021,2020 and 2021 gapfill method,gapfilled +212,2008,UNWTO,NA +212,2009,UNWTO,NA +212,2010,UNWTO,NA +212,2011,UNWTO,NA +212,2012,UNWTO,NA +212,2013,UNWTO,NA +212,2014,UNWTO,NA +212,2015,UNWTO,NA +212,2016,UNWTO,NA +212,2017,UNWTO,NA +212,2018,UNWTO,NA +212,2019,UNWTO,NA +212,2020,UNWTO,NA +212,2021,2020 and 2021 gapfill method,gapfilled +214,2008,UNWTO,NA +214,2009,UNWTO,NA +214,2010,UNWTO,NA +214,2011,UNWTO,NA +214,2012,UNWTO,NA +214,2013,UNWTO,NA +214,2014,UNWTO,NA +214,2015,UNWTO,NA +214,2016,UNWTO,NA +214,2017,UNWTO,NA +214,2018,UNWTO,NA +214,2019,UNWTO,NA +214,2020,2020 and 2021 gapfill method,gapfilled +214,2021,2020 and 2021 gapfill method,gapfilled +215,2008,UNWTO,NA +215,2009,UNWTO,NA +215,2010,UNWTO,NA +215,2011,UNWTO,NA +215,2012,UNWTO,NA +215,2013,UNWTO,NA +215,2014,UNWTO,NA +215,2015,UNWTO,NA +215,2016,UNWTO,NA +215,2017,UNWTO,NA +215,2018,UNWTO,NA +215,2019,UNWTO,NA +215,2020,UNWTO,NA +215,2021,UNWTO,NA +216,2008,nearby year,gapfilled +216,2009,nearby year,gapfilled +216,2010,nearby year,gapfilled +216,2011,nearby year,gapfilled +216,2012,nearby year,gapfilled +216,2013,nearby year,gapfilled +216,2014,nearby year,gapfilled +216,2015,UNWTO,NA +216,2016,UNWTO,NA +216,2017,UNWTO,NA +216,2018,UNWTO,NA +216,2019,UNWTO,NA +216,2020,UNWTO,NA +216,2021,UNWTO,NA +218,2008,UNWTO,NA +218,2009,UNWTO,NA +218,2010,UNWTO,NA +218,2011,UNWTO,NA +218,2012,UNWTO,NA +218,2013,UNWTO,NA +218,2014,UNWTO,NA +218,2015,UNWTO,NA +218,2016,UNWTO,NA +218,2017,UNWTO,NA +218,2018,UNWTO,NA +218,2019,UNWTO,NA +218,2020,UNWTO,NA +218,2021,2020 and 2021 gapfill method,gapfilled +220,2008,UNWTO,NA +220,2009,UNWTO,NA +220,2010,UNWTO,NA +220,2011,UNWTO,NA +220,2012,UNWTO,NA +220,2013,UNWTO,NA +220,2014,UNWTO,NA +220,2015,UNWTO,NA +220,2016,UNWTO,NA +220,2017,UNWTO,NA +220,2018,UNWTO,NA +220,2019,UNWTO,NA +220,2020,UNWTO,NA +220,2021,2020 and 2021 gapfill method,gapfilled +222,2008,UNWTO,NA +222,2009,UNWTO,NA +222,2010,UNWTO,NA +222,2011,UNWTO,NA +222,2012,UNWTO,NA +222,2013,UNWTO,NA +222,2014,UNWTO,NA +222,2015,UNWTO,NA +222,2016,UNWTO,NA +222,2017,UNWTO,NA +222,2018,UNWTO,NA +222,2019,UNWTO,NA +222,2020,UNWTO,NA +222,2021,2020 and 2021 gapfill method,gapfilled +223,2008,UNWTO,NA +223,2009,UNWTO,NA +223,2010,UNWTO,NA +223,2011,UNWTO,NA +223,2012,UNWTO,NA +223,2013,UNWTO,NA +223,2014,UNWTO,NA +223,2015,UNWTO,NA +223,2016,UNWTO,NA +223,2017,UNWTO,NA +223,2018,UNWTO,NA +223,2019,UNWTO,NA +223,2020,UNWTO,NA +223,2021,2020 and 2021 gapfill method,gapfilled +224,2008,UNWTO,NA +224,2009,UNWTO,NA +224,2010,UNWTO,NA +224,2011,UNWTO,NA +224,2012,UNWTO,NA +224,2013,UNWTO,NA +224,2014,UNWTO,NA +224,2015,UNWTO,NA +224,2016,UNWTO,NA +224,2017,UNWTO,NA +224,2018,UNWTO,NA +224,2019,UNWTO,NA +224,2020,UNWTO,NA +224,2021,2020 and 2021 gapfill method,gapfilled +231,2008,UNWTO,NA +231,2009,UNWTO,NA +231,2010,UNWTO,NA +231,2011,UNWTO,NA +231,2012,UNWTO,NA +231,2013,UNWTO,NA +231,2014,UNWTO,NA +231,2015,UNWTO,NA +231,2016,UNWTO,NA +231,2017,UNWTO,NA +231,2018,UNWTO,NA +231,2019,UNWTO,NA +231,2020,UNWTO,NA +231,2021,2020 and 2021 gapfill method,gapfilled +232,2008,UNWTO,NA +232,2009,UNWTO,NA +232,2010,UNWTO,NA +232,2011,UNWTO,NA +232,2012,UNWTO,NA +232,2013,UNWTO,NA +232,2014,UNWTO,NA +232,2015,UNWTO,NA +232,2016,UNWTO,NA +232,2017,UNWTO,NA +232,2018,UNWTO,NA +232,2019,UNWTO,NA +232,2020,UNWTO,NA +232,2021,UNWTO,NA +237,2008,UNWTO,NA +237,2009,UNWTO,NA +237,2010,UNWTO,NA +237,2011,UNWTO,NA +237,2012,UNWTO,NA +237,2013,UNWTO,NA +237,2014,UNWTO,NA +237,2015,UNWTO,NA +237,2016,UNWTO,NA +237,2017,UNWTO,NA +237,2018,UNWTO,NA +237,2019,UNWTO,NA +237,2020,UNWTO,NA +237,2021,2020 and 2021 gapfill method,gapfilled +244,2008,UNWTO,NA +244,2009,UNWTO,NA +244,2010,UNWTO,NA +244,2011,UNWTO,NA +244,2012,UNWTO,NA +244,2013,UNWTO,NA +244,2014,UNWTO,NA +244,2015,UNWTO,NA +244,2016,UNWTO,NA +244,2017,UNWTO,NA +244,2018,UNWTO,NA +244,2019,UNWTO,NA +244,2020,UNWTO,NA +244,2021,2020 and 2021 gapfill method,gapfilled +245,2008,UNWTO,NA +245,2009,UNWTO,NA +245,2010,UNWTO,NA +245,2011,linear model,gapfilled +245,2012,linear model,gapfilled +245,2013,linear model,gapfilled +245,2014,linear model,gapfilled +245,2015,linear model,gapfilled +245,2016,linear model,gapfilled +245,2017,linear model,gapfilled +245,2018,linear model,gapfilled +245,2019,linear model,gapfilled +245,2020,2020 and 2021 gapfill method,gapfilled +245,2021,2020 and 2021 gapfill method,gapfilled +247,2008,UNWTO,NA +247,2009,UNWTO,NA +247,2010,UNWTO,NA +247,2011,UNWTO,NA +247,2012,UNWTO,NA +247,2013,UNWTO,NA +247,2014,UNWTO,NA +247,2015,UNWTO,NA +247,2016,UNWTO,NA +247,2017,UNWTO,NA +247,2018,UNWTO,NA +247,2019,UNWTO,NA +247,2020,UNWTO,NA +247,2021,UNWTO,NA +250,2008,UNWTO,NA +250,2009,UNWTO,NA +250,2010,UNWTO,NA +250,2011,UNWTO,NA +250,2012,UNWTO,NA +250,2013,UNWTO,NA +250,2014,UNWTO,NA +250,2015,UNWTO,NA +250,2016,UNWTO,NA +250,2017,UNWTO,NA +250,2018,UNWTO,NA +250,2019,UNWTO,NA +250,2020,UNWTO,NA +250,2021,UNWTO,NA diff --git a/globalprep/tr/v2024/tr_data_prep.Rmd b/globalprep/tr/v2024/tr_data_prep.Rmd new file mode 100644 index 00000000..7be5733c --- /dev/null +++ b/globalprep/tr/v2024/tr_data_prep.Rmd @@ -0,0 +1,668 @@ +--- +title: 'OHI `r format(Sys.Date(), "%Y")` - Tourism and Recreation ' +author: "*Compiled on `r date()` by `r Sys.info()['user']`*" +output: + html_document: + code_folding: show + toc: true + toc_depth: 1 + toc_float: yes + number_sections: true + theme: cerulean + highlight: haddock + includes: + in_header: '../../../workflow/templates/ohi_hdr.html' + pdf_document: + toc: true +editor_options: + chunk_output_type: console +--- + +[REFERENCE RMD FILE](http://ohi-science.org/ohiprep_v2024/globalprep/tr/v2024/tr_data_prep.html) + +# Summary + +This document describes the steps for obtaining the data used to calculate the tourism and recreation goal for the 2024 global assessment. + +The general calculation is: tr = Ap \* Sr and Xtr = tr/90th quantile across regions + +- Ap = Proportion of overnight tourist arrivals to total arrivals +- Sr = (S-1)/5; Sustainability of tourism + +*The following data are used:* + +- Numbers of tourist arrivals, used in the calculation of the proportion of arrivals to area of coastline to population: obtained through the [UNWTO](https://www.unwto.org/tourism-statistics/key-tourism-statistics) (in the form of thousands of people). More info on tourism terms [here](https://www.unwto.org/glossary-tourism-terms). Range: 1995-2021 (only 2008-2021 is used) +- Tourism sustainability: World Economic Forum. The Travel & Tourism Development Index 2021 dataset (version 24 May 2022). 2022. [TTDI](https://www.weforum.org/reports/travel-and-tourism-development-index-2021/downloads-510eb47e12#report-nav) +- Per capita GDP: (World Bank with gaps filled using CIA data), used to gapfill missing values in Tourism sustainability + +# Updates from previous assessment + +**We were able to update the following data:** + +- Proportion of tourist arrivals to area of coastline to population - UNWTO data on thousands of tourist arrivals, reported until 2021 (downloaded [here](https://www.unwto.org/tourism-statistics/key-tourism-statistics) (dataset: "Total arrivals" under Inbound Tourism; we use the "Overnights visitors (tourists)" categorization as arrivals where possible) on 8/10/2023. + + +# v2024 updates + +Building upon updates made in v2023 for Tourism & Recreation. + +### Layers + +- tr_arrivals_props_tourism (arrivals to a country, staying overnight) +- tr_sustainability (Tourism sustainability index) + +### Data Sources +Using Erika and Gage's methodology (v2023): + +- UNWTO data on thousands of tourist arrivals, reported until 2021 (downloaded here (dataset: "Total arrivals" under Inbound Tourism; we use the "Overnights visitors (tourists)" categorization as arrivals where possible) on 8/10/2023. Use Overnights from this, and gapfill Overnights with Total minus Same-day if possible. +- Sum of inland (1 km) and offshore (3 nm) area (calculated from the csvs used in LSP) +- Population data + - primarily from the WDI() function which retrieves data from World Bank and gapfill missing populations that also have arrivals data (I do not gapfill all missing populations, just ones that match with regions that don't have NAs in the arrivals data) + - secondarily with Our World in Data data; in this data, Saba, Sint Eustatius, and Bonaire are not broken up, so I found broken up values separately for them from Statista. These only go back to 2011 instead of the earliest data year for this layer which is 2008, so I gapfill 2008-2010 with each of their respective 2011 data. This causes all OHI regions with arrivals data to now have both inland + offshore data and population data. +- v2024: The (tourism sustainability index dataset)[https://www3.weforum.org/docs/WEF_Travel_and_Tourism_Development_Index_2024.pdf] (TTDI) has been updated! + +### Next Steps + +- Explore updated UNWTO data. Determine if Inbound Tourism Arrivals Overnight stays can be aggregated with Domestic Arrivals Overnight stays. - See where there are gaps, what would need to be filled. +- If there are too many gaps, look at employment data instead. +- Integrate the fixed (globalprep/mar_prs_population/v2024/output/mar_pop_25mi.csv) coastal population data for a new method of calculating "Ap" (Arrival proportion): + +> Ap = multiply arrivals by coastal population/total population, then divide by coastal area (sum of inland (1 km) and offshore (3 nm) area) + +- Rescale using the 90th quartile as the reference point, or 80th (reevaluate when we get to this step) +- Consider dropping low population areas, like they did in v2023 +- Calculate `Sr = (S-1)/5`; Sustainability of tourism +- Finally, use the equation: `tr = Ap * Sr` for final scores before updating ohi-global + +## Initial set-up code + +```{r setup, message=FALSE, warning=FALSE, results="hide"} +# library(devtools) +# devtools::install_github("ohi-science/ohicore@dev") # dont worry about devtools +library(ohicore) +library(tidyverse) +library(stringr) +library(WDI) +library(here) +library(janitor) +library(plotly) +library(readxl) +library(naniar) +library(countrycode) + +# ---- sources! ---- +source(here("workflow", "R", "common.R")) # file creates objects to process data + +region_data() # for rgns_all and rgns_eez + +regions_shape() # returns spatial shape object named 'regions' which includes land, eez, highseas, and antarctica regions + +#source(here(paste0("globalprep/tr/v", version_year, "/R/tr_fxns.R"))) # not used presently + +# ---- set year and file path info ---- +current_year <- 2024 # Update this in the future!! +version_year <- paste0("v",current_year) +data_dir_version_year <- paste0("d", current_year) +prev_ver_yr <- paste0("d", (current_year - 1)) + +# ---- data directories ---- + +# Raw data directory (on Mazu) +raw_data_dir <- here::here(dir_M, "git-annex", "globalprep", "_raw_data") + +# UNWTO (UN World Tourism) raw data directory +unwto_dir <- here(raw_data_dir, "UNWTO", data_dir_version_year) + +# final output dir +output_dir <- here("globalprep","tr", version_year, "output") +``` + +# Ap: Proportion of tourist arrivals to area of coastline to population + +We use international arrivals data from the [United Nations World Tourism Organization (UNWTO)](https://www.unwto.org/). Up until the current assessment, we accessed data from the [World Travel & Tourism Council (WTTC)](http://www.wttc.org/), but this is no longer a viable option. + +To address missing values in arrivals, specifically referring to "Overnight visitors (tourists)," we employ a two-step process. First, we attempt to fill the gaps by subtracting "Same-day visitors (excursionists)" from "Total arrivals" if the latter is available. If this is not feasible, we resort to interpolating or extrapolating based on historical data spanning from 1995 to 2019, employing a linear model to estimate increases or decreases on a regional level. + +However, in light of the Covid-19 pandemic, we have adopted a distinct approach for the years 2020 and 2021. We calculate the global average proportionate change from the preceding year, apply this percentage change to the previous year's arrivals or total values, and then add the result to the corresponding previous year's arrivals or total value. - So 2020 was gapfilled with the global average decrease proportion of \~-0.70 for both arrivals and totals. Meaning that we took the 2019 value and multiplied it by -0.7 and then addd that to the 2019 value. 2019*-0.7 + 2019 = 2020 - 2021 was gapfilled with the global average increase proportion of \~0.2. Meaning that we took the 2020 value and multiplied it by 0.2 and then addd that to the 2020 value. 2020* 0.2 + 2020 = 2021 + +### Source cleaned and gapfilled arrivals and population data sources + +```{r, eval=FALSE} +# source in cleaned UNWTO data for current version year (make sure to download from website and put on Mazu in the UNWTO folder first) +source(here(paste0("globalprep/tr/v", version_year, "/R/process_UNWTO_arrivals.R"))) # outputs unwto_dupe_fix_downup_gf + +coastal_pop_data <- read.csv(here("globalprep/mar_prs_population/v2021/output/mar_pop_25mi.csv")) ## read in coastal population data from other data layer + +coastal_pop_data_fill <- coastal_pop_data %>% + filter(year == 2020) %>% + mutate(year = 2021) %>% + rbind(coastal_pop_data) # add 2021 data year, just using year 2020 +``` + +### Divide tourist arrival count by total arrival count + +- In 2023, we considered rescaling by coastal area and/or coastal population, however, we decided to scrap this, as it was unduly harming scores for larger regions. We will just use the tourist arrival/total arrivals metric. +- Because of some gapfilling and uncertainty in the data, some regions reported higher tourist arrivals than total arrivals. Due to this, we sometimes have ratios \>1. To deal with this, we just give those regions a ratio of 1. +- Some regions reported only tourist arrivals, and no total arrivals. Because of this, we gapfilled any that didn't have total arrivals with the tourist arrivals. This isn't ideal, but was the best we could do. + +```{r, eval=FALSE} +# divide the number of tourist arrivals by area of coastline and population to get the proportion +tourism_props <- unwto_all_gf %>% + mutate(year = as.numeric(year)) %>% + # left_join(offshore_data, by = c("rgn_id", "year")) %>% + left_join(coastal_pop_data_fill, by = c("rgn_id", "year")) %>% + # mutate(Ap = ((tourism_arrivals_ct/total_inland_offshore_area)/popsum)) %>% + mutate(total = ifelse(is.na(total), tourism_arrivals_ct, total)) %>% + mutate(Ap = tourism_arrivals_ct/total) %>% + filter(year >= 2008) %>% # filter to the years we are interested in for any data that isn't filtered yet + filter(popsum > 0) %>% # filter out no pop regions + left_join(rgns_eez) %>% + mutate(Ap = ifelse(Ap > 1, 1, Ap)) # if greater than 1 make 1 + +# check out things so far +summary(tourism_props) # should be 0 NAs for Ap if gapfilling worked +hist(tourism_props$Ap) + +``` + +```{r, eval=FALSE} + +# make rescaled column the actual value column +tourism_props_rescaled <- tourism_props %>% + dplyr::select(rgn_id, year, arrivals_method, arrivals_gapfilled, Ap) + +``` + +### Removing low population / uninhabited regions + +```{r, eval=FALSE} +### after gap-filling, make sure low/uninhabited regions are NA +# create df for unpopulated/low populated regions +low_pop() +low_pop <- low_pop %>% + filter(est_population < 3000 | is.na(est_population)) %>% # filter out regions that have populations > or equal to 3000 and keep NA values + rename(rgn_label = rgn_nam) + +summary(tourism_props_rescaled) +# v2020 371 NAs +# v2022 114 NAs +# v2023 0 NAs (because of gapfilling) + +# make sure all the NAs are uninhabited regions +tourism_props_nas <- tourism_props_rescaled %>% + filter(is.na(Ap)) %>% + select(rgn_id, year) %>% # v2023: was rgn_id, year, r1_label, r2_label, rgn_label but we did not gapfill by georegion so did not have the last 3 + left_join(low_pop, by = "rgn_id") # v2023: was by = c("rgn_id", "rgn_label") but we did not gapfill by georegion so did not have rgn_label + +tourism_props_nas %>% + filter(Inhabited == 0 & !is.na(est_population)) %>% + nrow() # 0 ✓ + +max(tourism_props_nas$est_population, na.rm=TRUE) < 3000 # should be true + +# make sure all the uninhabited regions are NA and then drop them (all NA regions get added back as a last step just in case its relevant) +tourism_props_rescaled <- tourism_props_rescaled %>% + mutate(Ap = ifelse(rgn_id %in% low_pop$rgn_id, NA, Ap)) + + +# check NAs once more +summary(tourism_props_rescaled) +# v2019: Adding the low pop df identifies 13 additional regions that should be NA instead of gapfilled, taking the total number of NAs in the data set from 245 to 700 +# v2020: Adding the low pop df takes the total number of NAs in the data set from 371 to 832 +# v2022: Adding the low pop df takes the total number of NAs in the data set from 14 to 40 +# v2023: Adding the low pop df takes the total number of NAs in the data set from 0 to 14 + +# after checking NAs, get rid of them +tourism_props_rescaled <- tourism_props_rescaled %>% + drop_na(Ap) +``` + +### Write output files + +```{r, eval=FALSE} +# we want to make sure all OHI regions are present in the data, even if could not calculate Ap (this will add back in what we removed above as well as any region not present in the data) +year_range <- unique(tourism_props_rescaled$year) # get the year range of Ap +year_range_df <- data.frame(year = year_range) # make it a dataframe + +# save gapfill info +tourism_props_gf_to_write <- tourism_props_rescaled %>% + select(-Ap) # don't need actual values for the gapfill information + +write_csv(tourism_props_gf_to_write, here(paste0("globalprep/tr/v", version_year, "/output/tr_arrivals_props_tourism_gf.csv"))) + +# save gap-filled data +tourism_props_to_write <- tourism_props_rescaled %>% + select(rgn_id, year, Ap) # don't need gf info here, just the values + +write_csv(tourism_props_to_write, here(paste0("globalprep/tr/v", version_year, "/output/tr_arrivals_props_tourism.csv"))) +``` + +### Look at changes in recent years + +We would expect for tourism jobs to decrease across the board from 2019 and 2020 given the pandemic, and likely see a rebound to some extent between 2020 and 2021 — let's make sure that's reflected in our results. + +```{r, eval=FALSE} +tourism_props_compare <- tourism_props_to_write %>% + mutate(year = as.numeric(as.character(year))) %>% + filter(year >= 2019) %>% + pivot_wider(names_from = year, values_from = Ap) + +# compare 2019 and 2020 +plot(tourism_props_compare$"2019", tourism_props_compare$"2020", + xlab = "v2023 2019 Arrivals Proportion", ylab = "v2023 2020 Arrivals Proportion") +abline(0, 1) # more data below the line + +# compare 2020 and 2021 +plot(tourism_props_compare$"2020", tourism_props_compare$"2021", + xlab = "v2023 2020 Arrivals Proportion", ylab = "v2023 2021 Arrivals Proportion") +abline(0, 1) # more data above the line +``` + +Everything looks reasonable. + +### Look at changes vs. previous data source (v2023) + +```{r, eval=FALSE} +new_data <- read_csv(paste0("globalprep/tr/v", version_year, "/output/tr_arrivals_props_tourism.csv")) +old_data <- read_csv(paste0("globalprep/tr/v", prev_ver_yr, "/output/tr_jobs_pct_tourism.csv")) + +compare_common_data <- new_data %>% + left_join(old_data, by = c("rgn_id", "year")) %>% + drop_na() + +plot(compare_common_data$Ep, compare_common_data$Ap, + xlab = "v2022 Employment Proportion", ylab = "v2023 Arrivals Proportion") +abline(0, 1) + + + + +compare_common_data_2021 <- new_data %>% + left_join(old_data, by = c("rgn_id", "year")) %>% + drop_na() %>% + filter(year == 2021) + +plot(compare_common_data_2021$Ap, compare_common_data_2021$Ep, + xlab = "v2023 Arrivals Proportion", ylab = "v2022 Employment Proportion") +abline(0, 1) + +compare_common_data_2020 <- new_data %>% + left_join(old_data, by = c("rgn_id", "year")) %>% + drop_na() %>% + filter(year == 2020) + +plot(compare_common_data_2020$Ap, compare_common_data_2020$Ep, + xlab = "v2023 Arrivals Proportion", ylab = "v2022 Employment Proportion") +abline(0, 1) + +compare_common_data_2019 <- new_data %>% + left_join(old_data, by = c("rgn_id", "year")) %>% + drop_na() %>% + filter(year == 2019) + +plot(compare_common_data_2019$Ap, compare_common_data_2019$Ep, + xlab = "v2023 Arrivals Proportion", ylab = "v2022 Employment Proportion") +abline(0, 1) + +compare_common_data_2015 <- new_data %>% + left_join(old_data, by = c("rgn_id", "year")) %>% + drop_na() %>% + filter(year == 2015) + +plot(compare_common_data_2015$Ap, compare_common_data_2015$Ep, + xlab = "v2023 Arrivals Proportion", ylab = "v2022 Employment Proportion") +abline(0, 1) +``` + +### Check out some specific countries (v2023) -- this was for exploring changes in methodology, can skip or use/edit parts in future years + +```{r, eval=FALSE} +# check some countries that changed a lot in v2023's first push to global +check_countries_graph <- tourism_props %>% + filter(rgn_id == 24 | rgn_id == 51 | rgn_id == 189 | rgn_id == 118 | rgn_id == 31) %>% + mutate(rgn_id_plot = as.factor(rgn_id), + year_plot = year) + +Ap_graph <- ggplot(check_countries_graph, aes(x = year_plot, y = Ap, color = rgn_id_plot)) + + geom_line() + + theme_minimal() + + labs(x = "", + color = "Region ID") + + +Ap_graph + +countries_in_2021 <- check_countries_graph %>% + filter(year == "2021") %>% + left_join(rgns_eez, by = "rgn_id") %>% + select(-year_plot) + +library(kableExtra) +kable(countries_in_2021) %>% + kable_styling(bootstrap_options = c("striped", "hover")) + +``` + +# Ts: Tourism sustainability + +These data are from the World Economic Forum's "Travel and Tourism Development Index" () See mazu: \_raw_data/WEF-Economics/ for more details and the raw data. + +The TTDI was formerly the TTCI which was a similar index, but unfortunately not comparable. The TTDI only extends back to 2019. + +These data are gapfilled using gdppcppp and UN georegion information (see next section for obtaining and preparing these data). + +```{r WEF processing, eval=FALSE} +# update to latest file name +ttdi_file <- "WEF_TTDI_2021_data_for_download.xlsx" + +ttdi_raw <- read_excel(paste0(dir_M, "/git-annex/globalprep/_raw_data/WEF-Economics/d", version_year, "/", ttdi_file), + skip = 2) + +# move up column names from first row while keeping the full country names as columns too +names(ttdi_raw)[1:9] <- as.character(ttdi_raw[1, 1:9]) + +# filtering for sustainability scores, selecting needed columns, and pivoting to tidy format +ttdi <- ttdi_raw %>% + filter(Title == "T&T Sustainability subindex, 1-7 (best)", + Attribute == "Score") %>% + select(year = Edition, Albania:Zambia) %>% + # currently Zambia is the last country column + pivot_longer(cols = Albania:Zambia, names_to = "country", + values_to = "score") %>% + mutate(score = as.numeric(score)) + + +# Changing names that are not recognized by ohicore +ttdi <- ttdi %>% + mutate(country = ifelse(str_detect(country, "Ivoire"), "Ivory Coast", country)) + + +ttdi_rgn <- name_2_rgn(df_in = ttdi, + fld_name='country') + +## Duplicated regions weighted mean +weight_data <- data.frame(country = c("China", "Hong Kong SAR"), + # pop values from World Bank 2021 estimates - updated v2022 + population = c(1412360000, 7413100)) + + +ttdi_rgn <- ttdi_rgn %>% + arrange(country) %>% + left_join(weight_data, by = "country") %>% + mutate(population = ifelse(is.na(population), 1, population)) %>% + group_by(rgn_id, rgn_name, year) %>% + summarize(score = weighted.mean(score, population)) %>% + select(year, rgn_id, rgn_name, score) + +# compare with old dataframe to make sure only the duplicated region scores changed + +head(ttdi_rgn, 10) + +### Save TTDI data file +write.csv(ttdi_rgn, here(paste0("globalprep/tr/v", version_year, "/intermediate/wef_ttdi.csv")), row.names = FALSE) + +``` + +## Preparing the gdppcppp data: + +These data are used to gapfill missing values in tourism sustainability. Most of the data are from the World Bank, but CIA data fill some gaps (CIA data is available for only the most recent year). + +The Artisanal Opportunities goal uses gdppcppp data, so we will get the data that was processed for that goal. + +```{r worldbank, eval=FALSE} +wb <- read.csv(here(paste0("globalprep/ao/v", version_year, "/intermediate/gdppcppp_ohi.csv"))) %>% + dplyr::select(rgn_id, year, value) + +``` + +CIA data are used to fill in missing gaps in the gdppcppp data () + +Downloaded: 07/05/2022 + +See README on the raw folder for instructions on how to download this data. + +The following code is used to prepare these data for OHI: + +```{r cia gdp, eval=FALSE} + +cia_gdp <- read.csv(here(paste0("globalprep/tr/v", version_year, "/raw/cia_gdp_pc_ppp.csv"))) %>% + # remove dollar signs and commas and convert to numeric + mutate(value = as.numeric(gsub("[$,]", "", value))) %>% + select(name, value) %>% + rename(country = name, pcgdp_cia = value) + + ## Data reported in a lower resolution than OHI regions +splits <- data.frame(country = "Saint Helena, Ascension, and Tristan da Cunha", + country2 = c("Saint Helena", "Ascension","Tristan da Cunha")) + +cia_gdp <- cia_gdp %>% + left_join(splits, by='country') %>% + mutate(country2 = ifelse(is.na(country2), country, country2)) %>% + select(country = country2, pcgdp_cia) + +cia_gdp_rgn <- name_2_rgn(df_in = cia_gdp, + fld_name='country') + +### Duplicated regions: Collapse regions after weighting by population (regions we include as a single region) - + +population_weights <- data.frame(country = c("Virgin Islands", "Puerto Rico", + "China", "Hong Kong", "Macau", + "Guam", "Northern Mariana Islands"), + # from world bank - updated v2022 + population = c(105870, 3263584, 1412360000, + 7413100, 658391, 170184, 57910)) + +cia_gdp_rgn <- cia_gdp_rgn %>% + left_join(population_weights, by="country") %>% + mutate(population = ifelse(is.na(population), 1, population)) %>% + group_by(rgn_id) %>% + summarize(pcgdp_cia = weighted.mean(pcgdp_cia, population)) %>% + ungroup() %>% + filter(rgn_id <= 250) %>% + select(rgn_id, pcgdp_cia) + +write.csv(cia_gdp_rgn, here(paste0("globalprep/tr/v", version_year, "/intermediate/wb_rgn_cia_GDPPCPPP.csv")), row.names=FALSE) + +``` + +The following code combines the two gdp datasets and gapfills missing regions using UN georegions. + +If there is no World Bank gdppcppp data (pcgdp), the CIA data is used (pcgdp_cia). The pcgdp2 variable includes both the World Bank and CIA data (with CIA data only used if there is not World Bank data). The remaining data are estimated using UN geopolitical regions. Ideally, the mean gdppcppp value is calculated at the r2 scale (gdp_pred_r2) using regions within each class with gdppcppp data. If there were not enough regions with data at the r2 scale, the average at the r1 scale was used (gdp_pred_r1). The gdp_all variable combines all estimates using the following heirarchy: World Bank -\> CIA -\> estimated using mean from r2 UN geopolitical regions -\> estimated using mean from r1 UN geopolitical regions. + +```{r gapfill gdp, eval=FALSE} + +### world bank gdp data +gdppcppp <- wb %>% + select(rgn_id, year, pcgdp = value) + +### cia gdp data +gdppcppp2 <- read.csv(here(paste0("globalprep/tr/v", version_year, "/intermediate/wb_rgn_cia_GDPPCPPP.csv"))) + + +### Use WB data, but if missing, use pcgdp_cia. +### combine with UN georegion data +years <- data.frame(year = min(gdppcppp$year):max(gdppcppp$year)) + +georegions <- ohicore::georegions + +regions <- georegions %>% + left_join(georegion_labels, by = 'rgn_id') + +gdp_raw <- merge(years, regions, by=NULL) %>% + left_join(gdppcppp, by = c('rgn_id', 'year')) %>% + left_join(gdppcppp2, by = c("rgn_id")) + +## quick compare to make sure the CIA and World Bank data are compatible +plot(gdp_raw$pcgdp[gdp_raw$year==2021], gdp_raw$pcgdp_cia[gdp_raw$year==2021]) +abline(0,1, col="red") +# a few minor outliers but overall looks good + +gdp_raw <- gdp_raw %>% + mutate(pcgdp2 = ifelse(is.na(pcgdp), pcgdp_cia, pcgdp)) + +## Calculating the means across different geopolitical levels (e.g. r2, r1) +gdp_raw <- gdp_raw %>% + group_by(r2, year) %>% + mutate(gdp_pred_r2 = mean(pcgdp2, na.rm=TRUE)) %>% + ungroup() %>% + group_by(r1, year) %>% + mutate(gdp_pred_r1 = mean(pcgdp2, na.rm=TRUE)) %>% + ungroup() + +gdp_raw_gf <- gdp_raw %>% + mutate(gdp_all = ifelse(is.na(pcgdp2), gdp_pred_r2, pcgdp2)) %>% + mutate(gdp_all = ifelse(is.na(gdp_all), gdp_pred_r1, gdp_all)) %>% + mutate(gapfilled = ifelse(is.na(pcgdp2) & !is.na(gdp_all), "gapfilled", NA)) %>% + mutate(method = ifelse(is.na(pcgdp2) & !is.na(gdp_pred_r2), "UN georegion (r2)", NA)) %>% + mutate(method = ifelse(is.na(pcgdp2) & is.na(gdp_pred_r2) & !is.na(gdp_pred_r1), "UN georegion (r1)", method)) + +write_csv(gdp_raw_gf, here(paste0("globalprep/tr/v", version_year, "/intermediate/gdp_raw_gf.csv"))) + +gdp_data_gf <- gdp_raw_gf %>% + select(rgn_id, year, gapfilled, method) + +write_csv(gdp_data_gf, here(paste0("globalprep/tr/v", version_year, "/intermediate/gdp_gf.csv"))) + +gdp_data <- gdp_raw_gf %>% + select(rgn_id, year, pcgdp = gdp_all) + +write_csv(gdp_data, here(paste0("globalprep/tr/v", version_year, "/intermediate/gdp.csv"))) + +``` + +The final step is gapfilling the Sustainability data using a linear model with gdppcppp and UN geopolitical regions as predictor variables. + +```{r, eval=FALSE} + +sust <- read.csv(here(paste0("globalprep/tr/v", version_year, "/intermediate/wef_ttdi.csv")), stringsAsFactors = FALSE) + +### don't need to gapfill data without tourism data: +## Most recent tourism data is 2019. + +ap_gf <- read.csv(here(paste0("globalprep/tr/v", version_year, "/output/tr_arrivals_props_tourism.csv"))) %>% + # filter(year == 2021) %>% + select(rgn_id, Ap, year) %>% + filter(!is.na(Ap)) + +# gdp dataframe prepared above (World Bank, CIA, and gapfilled gdp data) +gdp_raw_gf <- read.csv(here(paste0("globalprep/tr/v", version_year, "/intermediate/gdp_raw_gf.csv")), stringsAsFactors = FALSE) %>% + # filter(year == 2021) %>% + select(rgn_id, r0_label, r1_label, r2_label, rgn_label, + pcgdp, pcgdp_cia, pcgdp2, gdp_all, year) + +tr_sust <- gdp_raw_gf %>% + left_join(sust, by = c("rgn_id", "year")) %>% + left_join(ap_gf, by = c("rgn_id", "year")) %>% + rename(S_score = score) %>% + filter(rgn_id != 213) + +### Add gapfill flag variable +## Reminder: +## pcgdp2: includes both the World Bank and CIA data (with CIA data only used if there is not World Bank data) +## Ep: Proportion of workforce directly employed in tourism +## S_score: tourism sustainability score + +tr_sust_gf <- tr_sust %>% + mutate(gapfilled = ifelse(is.na(S_score) & !is.na(Ap), "gapfilled", NA)) %>% + mutate(method = ifelse(is.na(S_score) & !is.na(Ap) & is.na(pcgdp2), "lm georegion + gdppcppp, with est. gdppcppp", NA)) %>% + mutate(method = ifelse(is.na(S_score) & !is.na(Ap) & !is.na(pcgdp2), "lm georegion + gdppcppp", method)) %>% + select(rgn_id, gapfilled, method, year) + +write.csv(tr_sust_gf, here(paste0("globalprep/tr/v", version_year, "/output/tr_sustainability_gf.csv")), row.names=FALSE) + +``` + +### Gapfilling + +Linear models using gdppcppp and UN geopolitical regions as predictor variables. However if there is no gdppc data we estimate the gdppc using the UN georegions and then used in the linear model to gapfill the sustainability score. + +```{r, eval=FALSE} + +### Gapfill S using r1 and/or r2 regional data and PPP-adjusted per-capita GDP +### Looked at models with a year variable, but wasn't significant and decided to exclude + +mod3 <- lm(S_score ~ as.factor(r2_label) + gdp_all, data=tr_sust, na.action = na.exclude) +summary(mod3) +anova(mod3) + +mod4 <- lm(S_score ~ as.factor(r1_label) + gdp_all, data=tr_sust, na.action = na.exclude) +summary(mod4) +anova(mod4) + +plot(predict(mod3), tr_sust$S_score) +abline(0,1) +plot(predict(mod4), tr_sust$S_score) +abline(0,1) + + +## Estimate missing data and gapfill +# Some of the r1 levels do not have data and consequently causes a fail. This chunk of code drops these levels so an NA is returned + +# Select only r2 column +new_data <- tr_sust %>% + dplyr::select(r2_label, gdp_all) + +unique(tr_sust$r2_label) + +r2_w_data <- unique(tr_sust$r2_label[!is.na(tr_sust$S_score)]) + +new_data_r2 <- new_data %>% + mutate(r2_label = ifelse(r2_label %in% r2_w_data, r2_label, NA)) + +# Predict sustainability scores using linear model 3 (using r2 data) +tr_sust <- tr_sust %>% + dplyr::mutate(S_score_pred_r2 = predict(mod3, newdata = new_data_r2)) + + +# Select only r1 column +new_data <- tr_sust %>% + dplyr::select(r1_label, gdp_all) + +unique(tr_sust$r1_label) + +r1_w_data <- unique(tr_sust$r1_label[!is.na(tr_sust$S_score)]) + +new_data_r1 <- new_data %>% + mutate(r1_label = ifelse(r1_label %in% r1_w_data, r1_label, NA)) + +# Predict sustainability scores using linear model 4 (using r1 data) +tr_sust <- tr_sust %>% + dplyr::mutate(S_score_pred_r1 = predict(mod4, newdata = new_data_r1)) + + + +## some are missing the r1 predictions, but none of these have Ep scores, so not relevant +View(filter(tr_sust, is.na(S_score_pred_r1))) + +tr_sust <- tr_sust %>% + mutate(S_score_2 = ifelse(is.na(S_score), S_score_pred_r2, S_score)) %>% + mutate(S_score_2 = ifelse(is.na(S_score_2), S_score_pred_r1, S_score_2)) %>% + filter(year %in% c(2019, 2021)) %>% + select(rgn_id, year, S_score=S_score_2) + +summary(tr_sust) + +write_csv(tr_sust, here(paste0("globalprep/tr/v", version_year, "/output/tr_sustainability.csv"))) +``` + +## Compare with previous year of data + +```{r, eval=FALSE} +tr_sust <- read_csv(here(paste0("globalprep/tr/v", version_year, "/output/tr_sustainability.csv"))) + +prev_year <- (as.numeric(version_year) - 1) %>% + as.character() + +compare <- tr_sust %>% + pivot_wider(names_from = year, values_from = S_score) + +# current vs previous year of data +plot(compare$"2021", compare$"2019") +abline(0, 1, col="red") +# looks good + +``` + +# Tw: Travel warnings + +- Travel warnings were deleted from the v2020 assessment. diff --git a/globalprep/tr/v2024/unused_R/README.md b/globalprep/tr/v2024/unused_R/README.md new file mode 100644 index 00000000..fcf5f819 --- /dev/null +++ b/globalprep/tr/v2024/unused_R/README.md @@ -0,0 +1 @@ +This folder contains code that was not ultimately used in this year's data processing (v2023), yet could be useful down the line if changes are implemented or exploration is needed. \ No newline at end of file diff --git a/globalprep/tr/v2024/unused_R/explore_nas_sample.R b/globalprep/tr/v2024/unused_R/explore_nas_sample.R new file mode 100644 index 00000000..3de425ef --- /dev/null +++ b/globalprep/tr/v2024/unused_R/explore_nas_sample.R @@ -0,0 +1,128 @@ +# looking at some UNWTO tourism-related datasets to see which has the most data +library(tidyverse) + +base_path <- "put anything preceding the folder and/or file name here" + +file_path_1 <- paste0(base_path, "unwto-inbound-accommodation-data.xlsx") +file_path_2 <- paste0(base_path, "unwto-inbound-arrivals-by-main-purpose-data.xlsx") # not used +file_path_3 <- paste0(base_path, "unwto-inbound-arrivals-data.xlsx") +file_path_4 <- paste0(base_path, "unwto-inbound-expenditure-data.xlsx") +file_path_5 <- paste0(base_path, "unwto-tourism-industries-data.xlsx") # not used + +test_num_1 <- readxl::read_xlsx(file_path_1, skip = 2) %>% + filter(!is.na(`Basic data and indicators`) | `...7` == "Guests" | `...7` == "Overnights") %>% + mutate(`S.` = as.numeric(`S.`)) %>% + select(-`...5`, -`...6`, -`...8`, -`...38`, -`Notes`, -`Units`, -`Basic data and indicators`) + +test_129 <- test_num_1 %>% # the number at the end is the S. number + filter(`S.` == 1.29) +missing_129 <- sum(apply(test_129, c(1, 2), function(x) sum(x == ".."))) + +test_130 <- test_num_1 %>% + filter(`S.` == 1.30) +missing_130 <- sum(apply(test_130, c(1, 2), function(x) sum(x == ".."))) + +test_131 <- test_num_1 %>% + filter(`S.` == 1.31) +missing_131 <- sum(apply(test_131, c(1, 2), function(x) sum(x == ".."))) + +test_132 <- test_num_1 %>% + filter(`S.` == 1.32) +missing_132 <- sum(apply(test_132, c(1, 2), function(x) sum(x == ".."))) + +test_num_2 <- readxl::read_xlsx(file_path_3, skip = 2) %>% + filter(!is.na(`Basic data and indicators`) | `...6` == "Total arrivals") %>% + mutate(`S.` = as.numeric(`S.`)) %>% + select(-`...5`, -`...7`, -`...8`, -`...39`, -`Notes`, -`Units`, -`Basic data and indicators`) + +test_11 <- test_num_2 %>% + filter(`S.` == 1.1) +missing_11 <- sum(apply(test_11, c(1, 2), function(x) sum(!is.na(x) & x == ".."))) + +test_num_3 <- readxl::read_xlsx(file_path_3, skip = 2) %>% + filter(!is.na(`Basic data and indicators`) | `...7` == "Overnights visitors (tourists)") %>% + mutate(`S.` = as.numeric(`S.`)) %>% + select(-`...5`, -`...6`, -`...8`, -`...39`, -`Notes`, -`Units`, -`Basic data and indicators`, -`Series`) + +test_12 <- test_num_3 %>% + filter(`S.` == 1.2) +missing_12 <- sum(apply(test_12, c(1, 2), function(x) sum(!is.na(x) & x == ".."))) + +test_num_4 <- readxl::read_xlsx(file_path_3, skip = 2) %>% + filter(!is.na(`Basic data and indicators`) | `...7` == "Same-day visitors (excursionists)") %>% + mutate(`S.` = as.numeric(`S.`)) %>% + select(-`...5`, -`...6`, -`...8`, -`...39`, -`Notes`, -`Units`, -`Basic data and indicators`, -`Series`) + +test_13 <- test_num_4 %>% + filter(`S.` == 1.3) +missing_13 <- sum(apply(test_13, c(1, 2), function(x) sum(!is.na(x) & x == ".."))) + +test_num_5 <- readxl::read_xlsx(file_path_3, skip = 2) %>% + filter(!is.na(`Basic data and indicators`) | `...8` == "of which, cruise passengers") %>% + mutate(`S.` = as.numeric(`S.`)) %>% + select(-`...5`, -`...6`, -`...7`, -`...39`, -`Notes`, -`Units`, -`Basic data and indicators`, -`Series`) + +test_14 <- test_num_5 %>% + filter(`S.` == 1.4) +missing_14 <- sum(apply(test_14, c(1, 2), function(x) sum(!is.na(x) & x == ".."))) + + +test_num_6 <- readxl::read_xlsx(file_path_4, skip = 2) %>% + filter(!is.na(`Basic data and indicators`) | `...5` == "Tourism expenditure in the country") %>% + mutate(`S.` = as.numeric(`S.`)) %>% + select(-`...6`, -`...7`, -`...8`, -`...39`, -`Notes`, -`Units`, -`Basic data and indicators`, -`Series`) + +test_133 <- test_num_6 %>% + filter(`S.` == 1.33) +missing_133 <- sum(apply(test_133, c(1, 2), function(x) sum(!is.na(x) & x == ".."))) + +test_num_7 <- readxl::read_xlsx(file_path_4, skip = 2) %>% + filter(!is.na(`Basic data and indicators`) | `...6` == "Travel") %>% + mutate(`S.` = as.numeric(`S.`)) %>% + select(-`...5`, -`...7`, -`...8`, -`...39`, -`Notes`, -`Units`, -`Basic data and indicators`, -`Series`) + +test_134 <- test_num_7 %>% + filter(`S.` == 1.34) +missing_134 <- sum(apply(test_134, c(1, 2), function(x) sum(!is.na(x) & x == ".."))) + + +test_num_8 <- readxl::read_xlsx(file_path_4, skip = 2) %>% + filter(!is.na(`Basic data and indicators`) | `...6` == "Passenger transport") %>% + mutate(`S.` = as.numeric(`S.`)) %>% + select(-`...5`, -`...7`, -`...8`, -`...39`, -`Notes`, -`Units`, -`Basic data and indicators`, -`Series`) + +test_135 <- test_num_8 %>% + filter(`S.` == 1.35) +missing_135 <- sum(apply(test_135, c(1, 2), function(x) sum(!is.na(x) & x == ".."))) + + +# exploring how many countries have NAs in UNWTO tourism data (this example is employment) +file_path_employment <- paste0(base_path, "unwto-employment-data.xlsx") +employment_data <- readxl::read_xlsx(file_path_employment, skip = 2) + +years <- as.character(1995:2021) +employment_data_prepped <- employment_data[1:446,] %>% + select(`C.`, `Basic data and indicators`, all_of(years)) + +combined_rows <- employment_data_prepped %>% + group_by(`C.`) %>% + summarise_all(function(x) ifelse(all(is.na(x)), NA, na.omit(x)[1])) %>% + ungroup() %>% + select(-`C.`) + +combined_rows_long <- combined_rows %>% + pivot_longer(cols = `1995`:`2021`, names_to = "year", values_to = "thousands_employed_in_tourism") %>% + mutate(thousands_employed_in_tourism = as.numeric(na_if(thousands_employed_in_tourism, ".."))) + +check_2020_nas <- combined_rows_long %>% + filter(year == 2020) %>% + mutate(countries = tolower(`Basic data and indicators`)) %>% + select(-`Basic data and indicators`) +sum(is.na(check_2020_nas$thousands_employed_in_tourism)) + +find_countries_w_no_data <- combined_rows_long %>% + mutate(countries = tolower(`Basic data and indicators`)) %>% + select(-`Basic data and indicators`) %>% + group_by(countries) %>% + filter(!all(is.na(thousands_employed_in_tourism))) %>% + ungroup() \ No newline at end of file diff --git a/globalprep/tr/v2024/unused_R/georegions_gapfilling_example.R b/globalprep/tr/v2024/unused_R/georegions_gapfilling_example.R new file mode 100644 index 00000000..b2e9c640 --- /dev/null +++ b/globalprep/tr/v2024/unused_R/georegions_gapfilling_example.R @@ -0,0 +1,113 @@ +### Gapfilling using UN georegions (not used v2023) + +# To round out some gapfilling, we could use georegions. +# This has a very low correlation with the data, but it was the simplest viable option discovered. +# We decided ultimately just to leave values that would have been gapfilled by georegion as NAs since it did not seem to be reliable enough. +# This used to be in the main Rmd, to gapfill proportions, before gapfilling was done before proportions are calculated, so will need to be edited to be used before proportions + + +# the below ended up not being used (v2023) +# gapfill missing data using UN georegion data +# prepare the georegion data +georegions <- georegions +georegion_labels <- georegion_labels + +tourism_props_geo_gf <- tourism_props_downup_gf %>% + left_join(georegions, by = 'rgn_id') %>% + left_join(georegion_labels, by = 'rgn_id') %>% + select(-r0) + +# the below shows the low R-squared with georegions +summary(lm(Ap ~ r1_label + r2_label, data = tourism_props_geo_gf)) +# +# Call: +# lm(formula = Ap ~ r1_label + r2_label, data = tourism_props_geo_gf) +# +# Residuals: +# Min 1Q Median 3Q Max +# -23100 -745 -101 5 463002 +# +# Coefficients: (5 not defined because of singularities) +# Estimate Std. Error t value Pr(>|t|) +# (Intercept) 215.60 1187.25 0.182 0.85590 +# r1_labelAmericas -29.46 3141.16 -0.009 0.99252 +# r1_labelAsia 3660.65 1592.86 2.298 0.02160 +# r1_labelEurope 6786.93 2189.17 3.100 0.00195 +# r1_labelLatin America and the Caribbean -113.48 1716.76 -0.066 0.94730 +# r1_labelOceania -187.87 3141.16 -0.060 0.95231 +# r2_labelCaribbean 746.66 1471.11 0.508 0.61179 +# r2_labelCentral America 218.51 1911.03 0.114 0.90897 +# r2_labelEastern Africa -120.19 1760.97 -0.068 0.94559 +# r2_labelEastern Asia -3347.02 2314.37 -1.446 0.14819 +# r2_labelEastern Europe -2168.00 2601.13 -0.833 0.40462 +# r2_labelMelanesia -18.69 3440.97 -0.005 0.99567 +# r2_labelMicronesia 51.47 3440.97 0.015 0.98807 +# r2_labelMiddle Africa -110.76 2056.37 -0.054 0.95705 +# r2_labelNorthern Africa 95.93 2056.37 0.047 0.96279 +# r2_labelNorthern America NA NA NA NA +# r2_labelNorthern Europe -6240.07 2252.64 -2.770 0.00563 +# r2_labelPolynesia -12.61 3297.53 -0.004 0.99695 +# r2_labelSouth America NA NA NA NA +# r2_labelSouth-Eastern Asia -2272.44 1679.02 -1.353 0.17598 +# r2_labelSouthern Africa 60.55 3141.16 0.019 0.98462 +# r2_labelSouthern Asia -3792.93 1986.64 -1.909 0.05630 +# r2_labelSouthern Europe 16141.80 2252.64 7.166 8.99e-13 +# r2_labelWestern Africa NA NA NA NA +# r2_labelWestern Asia NA NA NA NA +# r2_labelWestern Europe NA NA NA NA +# +# (Intercept) +# r1_labelAmericas +# r1_labelAsia * +# r1_labelEurope ** +# r1_labelLatin America and the Caribbean +# r1_labelOceania +# r2_labelCaribbean +# r2_labelCentral America +# r2_labelEastern Africa +# r2_labelEastern Asia +# r2_labelEastern Europe +# r2_labelMelanesia +# r2_labelMicronesia +# r2_labelMiddle Africa +# r2_labelNorthern Africa +# r2_labelNorthern America +# r2_labelNorthern Europe ** +# r2_labelPolynesia +# r2_labelSouth America +# r2_labelSouth-Eastern Asia +# r2_labelSouthern Africa +# r2_labelSouthern Asia . +# r2_labelSouthern Europe *** +# r2_labelWestern Africa +# r2_labelWestern Asia +# r2_labelWestern Europe +# --- +# Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 +# +# Residual standard error: 21370 on 4515 degrees of freedom +# (135 observations deleted due to missingness) +# Multiple R-squared: 0.06147, Adjusted R-squared: 0.05731 +# F-statistic: 14.79 on 20 and 4515 DF, p-value: < 2.2e-16 + + + + +# calculate two different gapfill columns using r2 and r1 +tourism_props_geo_gf <- tourism_props_geo_gf %>% + group_by(year, r2) %>% + mutate(Ep_pred_r2 = mean(Ep, na.rm=TRUE)) %>% + ungroup() %>% + group_by(year, r1) %>% + mutate(Ep_pred_r1 = mean(Ep, na.rm=TRUE)) %>% + ungroup() + +# first gapfill with r2, if no value available use r1; create column indicating whether value was gapfilled and if so, by what method. +tourism_props_geo_gf <- tourism_props_geo_gf %>% + mutate(Ap_all = ifelse(is.na(Ap), Ap_pred_r2, Ap)) %>% + mutate(Ap_all = ifelse(is.na(Ap_all), Ap_pred_r1, Ap_all)) %>% + mutate(gapfilled = case_when(is.na(Ap) & !is.na(Ap_all) ~ "gapfilled", + TRUE ~ gapfilled)) %>% + mutate(method = case_when(is.na(Ap) & !is.na(Ap_pred_r2) ~ "UN georegion (r2)", + is.na(Ap) & is.na(Ap_pred_r2) & !is.na(Ap_pred_r1) ~ "UN georegion (r1)", + TRUE ~ method)) diff --git a/globalprep/tr/v2024/unused_R/process_Eurostat.R b/globalprep/tr/v2024/unused_R/process_Eurostat.R new file mode 100644 index 00000000..f92ae2b4 --- /dev/null +++ b/globalprep/tr/v2024/unused_R/process_Eurostat.R @@ -0,0 +1,55 @@ +file_path_euro <- file.path(dir_M, "git-annex", "globalprep", "_raw_data", "Eurostat", paste0("d", version_year), "tour_lfs1r2_linear.csv") + +# GET THE DATA WE NEED +euro_data <- read_csv(file_path_euro) %>% + select(nace_r2, worktime, wstatus, country = geo, year = TIME_PERIOD, tourism_jobs_ct = OBS_VALUE) %>% + filter(nace_r2 != "TOTAL" & worktime == "TOTAL" & wstatus != "NRP") %>% + group_by(country, year) %>% + summarize(jobs_sum = sum(tourism_jobs_ct, na.rm = TRUE)) %>% + mutate(tourism_jobs_ct_transformed = jobs_sum * 1000) %>% + select(-jobs_sum) %>% + ungroup() + +# CONVERT EURO CODES TO NAMES +file_path_euro_codes <- file.path(dir_M, "git-annex", "globalprep", "_raw_data", "Eurostat", paste0("d", version_year), "Country_Codes_and_Names.xlsx.xls") +euro_codes <- readxl::read_xlsx(file_path_euro_codes) %>% + select(country = CODE, country_name = `COUNTRY NAME`) + +euro_data_w_names <- euro_data %>% + left_join(euro_codes, by = "country") %>% + mutate( + country_name = case_when( + country %in% c("ME") ~ "Montenegro", + country %in% c("MK") ~ "North Macedonia", + country %in% c("RS") ~ "Serbia", # add additional code equivalents if necessary + TRUE ~ country_name)) + +country_code_check <- euro_data_w_names %>% + filter(is.na(country_name)) +print(unique(country_code_check$country)) # add country names for any codes here. EA20 and EU27_2020 are normal and don't need equivalents. + +# if all is good, remove the code column and rename the name column "country" +euro_clean <- euro_data_w_names %>% + select(-country) %>% + rename(country = country_name) + +# CLEAN COUNTRY NAMES +# clean some names to match OHI region names (add more here if discovered below) +euro_clean_fix <- euro_clean %>% + mutate( + country = case_when( + country %in% c("Germany (including former GDR from 1991)") ~ "Germany", + TRUE ~ country)) + +# get EUROSTAT data to have OHI names +euro_clean_names <- name_2_rgn(df_in = euro_clean_fix, + fld_name = 'country', + flds_unique = c('year')) %>% + select(-country, -rgn_name) +# v2023 +# These data were removed for not having any match in the lookup tables: +# +# Germany (including former GDR from 1991) (added above) +# 1 +# North Macedonia (landlocked) +# 1 \ No newline at end of file diff --git a/globalprep/tr/v2024/unused_R/process_ILOSTAT.R b/globalprep/tr/v2024/unused_R/process_ILOSTAT.R new file mode 100644 index 00000000..23a2998c --- /dev/null +++ b/globalprep/tr/v2024/unused_R/process_ILOSTAT.R @@ -0,0 +1,59 @@ +# process the ILOSTAT DATA + +# READ IN +# read in the ILOSTAT data +file_path_ilo <- file.path(dir_M, "git-annex", "globalprep", "_raw_data", "ILOSTAT", paste0("d", version_year), "EMP_TEMP_SEX_OC2_NB_A-filtered-2023-07-28.csv") + +# INITIAL CLEANING +# do some initial cleaning before exploring +ilo_data <- read_csv(file_path_ilo) %>% + filter(sex.label == "Sex: Total" & (grepl("Hospitality", classif1.label))) %>% + select(ref_area.label, classif1.label, time, obs_value) %>% + mutate(obs_value = as.numeric(obs_value) * 1000) + +# CHECK TOTAL VALUE EQUALS ALL OTHER VALUES ADDED TOGETHER +# doublecheck adding together the different categories roughly equals the total value for a couple countries +ilo_data_check_af_total <- read_csv(file_path_ilo) %>% + filter(ref_area.label == "Afghanistan" & sex.label == "Sex: Total" & time == "2021" & classif1.label == "Occupation (ISCO-08), 2 digit level: Total") + +ilo_data_check_af <- read_csv(file_path_ilo) %>% + filter(ref_area.label == "Afghanistan" & sex.label == "Sex: Total" & time == "2021") %>% + drop_na(obs_value) %>% + mutate(check = sum(obs_value) - ilo_data_check_af_total$obs_value) + +ilo_data_check_af_total$obs_value - ilo_data_check_af$check[1] # difference of 6.955 + +ilo_data_check_bo_total <- read_csv(file_path_ilo) %>% + filter(ref_area.label == "Bolivia" & sex.label == "Sex: Total" & time == "2021" & classif1.label == "Occupation (ISCO-08), 2 digit level: Total") + +ilo_data_check_bo <- read_csv(file_path_ilo) %>% + filter(ref_area.label == "Bolivia" & sex.label == "Sex: Total" & time == "2021") %>% + drop_na(obs_value) %>% + mutate(check = sum(obs_value) - ilo_data_check_bo_total$obs_value) + +ilo_data_check_bo_total$obs_value - ilo_data_check_bo$check[1] # difference of 0.182 +# numbers are slightly off but not by much for both countries + +# CREATE CLEAN DATA +# get data into proper format +ilo_clean <- ilo_data %>% + select(country = ref_area.label, year = time, tourism_jobs_ct = obs_value) + +# clean some names to match OHI region names (add more here if discovered below) +ilo_clean_fix <- ilo_clean %>% + mutate( + country = case_when( + country %in% c("Côte d'Ivoire") ~ "Ivory Coast", + TRUE ~ country)) + +# get ILOSTAT data to have OHI names +ilo_clean_names <- name_2_rgn(df_in = ilo_clean_fix, + fld_name = 'country', + flds_unique = c('year')) %>% + select(-country, -rgn_name) + +# v2023 +# These data were removed for not having any match in the lookup tables: +# +# Côte d'Ivoire (added above) Eswatini (landlocked) North Macedonia landlocked) +# 1 1 1 \ No newline at end of file diff --git a/globalprep/tr/v2024/unused_R/process_OECD.R b/globalprep/tr/v2024/unused_R/process_OECD.R new file mode 100644 index 00000000..86296722 --- /dev/null +++ b/globalprep/tr/v2024/unused_R/process_OECD.R @@ -0,0 +1,28 @@ +# process OECD number employed in tourism data + +# READ IN +# read in the OECD data +file_path_oecd <- file.path(dir_M, "git-annex", "globalprep", "_raw_data", "OECD", paste0("d", version_year), "TOURISM_ENTR_EMPL_31072023210756847.csv") + +oecd_data <- read_csv(file_path_oecd) %>% + select(country = Country, year = Year, tourism_jobs_ct = Value) +# already clean after selecting, so proceed with this + +# clean some names to match OHI region names (add more here if discovered below) +oecd_clean_fix <- oecd_data %>% + mutate( + country = case_when( + country %in% c("Korea") ~ "South Korea", + TRUE ~ country)) + +# get OECD data to have OHI region names +oecd_clean_names <- name_2_rgn(df_in = oecd_clean_fix, + fld_name = 'country', + flds_unique = c('year')) %>% + select(-country, -rgn_name) + +# v2023 +# These data were removed for not having any match in the lookup tables: +# +# Korea (OECD member is South Korea, added above) +# 1 \ No newline at end of file diff --git a/globalprep/tr/v2024/unused_R/process_TTDI_emp.R b/globalprep/tr/v2024/unused_R/process_TTDI_emp.R new file mode 100644 index 00000000..07632c7a --- /dev/null +++ b/globalprep/tr/v2024/unused_R/process_TTDI_emp.R @@ -0,0 +1,25 @@ + + + +process_TTDI_emp <- function(df) { + + names(df)[1:9] <- as.character(df[1, 1:9]) + + ttdi_emp <- df %>% + filter(Title %in% c("T&T industry Share of Employment, % of total employment", + "T&T industry Employment, 1,000 jobs"), + Attribute == "Value") %>% + select(Title, Edition, Albania:Zambia) %>% + # currently Zambia is the last country column - this may need to change in the future if countries are added (e.g. Zimbabwe) + pivot_longer(cols = Albania:Zambia, names_to = "country", + values_to = "value") %>% + mutate(value = as.numeric(value)) %>% + pivot_wider(names_from = Title, values_from = value) %>% + rename("jobs_pct" = "T&T industry Share of Employment, % of total employment", + "jobs_ct" = "T&T industry Employment, 1,000 jobs", + "year" = "Edition") %>% + mutate(jobs_ct = round(jobs_ct * 1000)) + + return(ttdi_emp) + +} diff --git a/globalprep/tr/v2024/unused_R/process_UNWTO_employ.R b/globalprep/tr/v2024/unused_R/process_UNWTO_employ.R new file mode 100644 index 00000000..db0a2faf --- /dev/null +++ b/globalprep/tr/v2024/unused_R/process_UNWTO_employ.R @@ -0,0 +1,105 @@ +# process UNWTO number employed in tourism data +file_path_unwto <- file.path(dir_M, "git-annex", "globalprep", "_raw_data", "UNWTO", paste0("d", version_year), "unwto-employment-data.xlsx") +unwto_employment <- readxl::read_xlsx(file_path_unwto) + +unwto_clean <- unwto_employment[, c(4, 6, 11:(ncol(unwto_employment) - 1))] + +names(unwto_clean) <- c("country", "metric", as.character(unwto_clean[2, 3:ncol(unwto_clean)])) + +unwto_clean <- unwto_clean[3:nrow(unwto_clean), ] %>% + fill(country, .direction = "down") %>% + filter(metric == "Total") %>% + pivot_longer(cols = 3:ncol(unwto_clean), names_to = "year", + values_to = "tourism_jobs_ct") %>% + mutate(tourism_jobs_ct = na_if(tourism_jobs_ct, ".."), + country = str_to_title(country), + tourism_jobs_ct = round(as.numeric(tourism_jobs_ct) * 1000)) %>% + select(-metric) + +# clean some names to match OHI region names (add more here if discovered below) +# the ones below are not relevant anymore since name_2_rgn was updated with synonyms +# unwto_clean_fix <- unwto_clean %>% +# mutate( +# country = case_when( +# country %in% c("Antigua And Barbuda") ~ "Antigua and Barbuda", +# country %in% c("Bosnia And Herzegovina") ~ "Bosnia and Herzegovina", +# country %in% c("Congo, Democratic Republic Of The") ~ "Democratic Republic of the Congo", +# country %in% c("Cote D´Ivoire") ~ "Ivory Coast", +# country %in% c("Hong Kong, China") ~ "Hong Kong", +# country %in% c("Iran, Islamic Republic Of") ~ "Iran", +# country %in% c("Korea, Democratic People´S Republic Of") ~ "North Korea", +# country %in% c("Korea, Republic Of") ~ "South Korea", +# country %in% c("Macao, China") ~ "Macao", +# country %in% c("Micronesia, Federated States Of") ~ "Micronesia", +# country %in% c("Saint Kitts And Nevis") ~ "Saint Kitts and Nevis", +# country %in% c("Saint Vincent And The Grenadines") ~ "Saint Vincent and the Grenadines", +# country %in% c("Sao Tome And Principe") ~ "Sao Tome and Principe", +# country %in% c("Serbia And Montenegro") ~ "Montenegro", +# country %in% c("Sint Maarten (Dutch Part)") ~ "Sint Maarten", +# country %in% c("Taiwan Province Of China") ~ "Taiwan", +# country %in% c("Tanzania, United Republic Of") ~ "Tanzania", +# country %in% c("Trinidad And Tobago") ~ "Trinidad and Tobago", +# country %in% c("Turks And Caicos Islands") ~ "Turks and Caicos Islands", +# country %in% c("United States Of America") ~ "United States", +# country %in% c("Venezuela, Bolivarian Republic Of") ~ "Venezuela", +# TRUE ~ country)) + +# get UNWTO data to have OHI region names +unwto_clean_names <- name_2_rgn(df_in = unwto_clean, # change to unwto_clean_fix if you need to adjust any names + fld_name = 'country', + flds_unique = c('year')) +# v2023 (prior to updating name_2_rgn) +# These data were removed for not having any match in the lookup tables: +# +# Antigua And Barbuda (added above) Bolivia, Plurinational State Of (landlocked) +# 1 1 +# Bosnia And Herzegovina (added above) Congo, Democratic Republic Of The (added above) +# 1 1 +# Cote D´Ivoire (added above) Czech Republic (Czechia) (landlocked) +# 1 1 +# Eswatini (landlocked) Hong Kong, China (added above) +# 1 1 +# Iran, Islamic Republic Of (added above) Korea, Democratic People´S Republic Of (added above) +# 1 1 +# Korea, Republic Of (added above) Lao People´S Democratic Republic (landlocked) +# 1 1 +# Macao, China (added above) Micronesia, Federated States Of (added above) +# 1 1 +# Moldova, Republic Of (landlocked) North Macedonia (landlocked) +# 1 1 +# Saint Kitts And Nevis (added above) Saint Vincent And The Grenadines (added above) +# 1 1 +# Sao Tome And Principe (added above) Serbia And Montenegro (added above) +# 1 1 +# Sint Maarten (Dutch Part) (added above) State Of Palestine (not included) +# 1 1 +# Taiwan Province Of China (added above) Tanzania, United Republic Of (added above) +# 1 1 +# Trinidad And Tobago (added above) Turks And Caicos Islands (added above) +# 1 1 +# United States Of America (added above) Venezuela, Bolivarian Republic Of (added above) +# 1 1 +# DUPLICATES found. Consider using collapse2rgn to collapse duplicates (function in progress). +# +# # A tibble: 10 × 1 +# country +# +# 1 China +# 2 Guadeloupe +# 3 Guam +# 4 Hong Kong +# 5 Macao +# 6 Martinique +# 7 Montenegro +# 8 Northern Mariana Islands +# 9 Puerto Rico +# 10 United States Virgin Islands + +# v2023 (after updating name_2_rgn) + +# fix duplicates +unwto_dupe_fix <- unwto_clean_names %>% + group_by(rgn_id, year) %>% + summarize(sum_fix = ifelse(all(is.na(tourism_jobs_ct)), NA, sum(tourism_jobs_ct, na.rm = TRUE))) %>% + mutate(method = ifelse(!is.na(sum_fix), "UNWTO", NA)) %>% + mutate(gapfilled = NA) \ No newline at end of file diff --git a/globalprep/tr/v2024/unused_R/process_WB_laborforce.R b/globalprep/tr/v2024/unused_R/process_WB_laborforce.R new file mode 100644 index 00000000..fcf35706 --- /dev/null +++ b/globalprep/tr/v2024/unused_R/process_WB_laborforce.R @@ -0,0 +1,317 @@ +# v2023: THIS ENDED UP NOT BEING USED, BUT WAS LEFT HERE IN CASE CODE BECOMES RELEVANT IN THE FUTURE + +# Process World Bank labor force data +file_path_wb <- file.path(dir_M, "git-annex", "globalprep", "_raw_data", "WorldBank", paste0("d", version_year), "API_SL", "API_SL.TLF.TOTL.IN_DS2_en_csv_v2_5608539.csv") +wb_labor_force <- read_csv(file_path_wb, skip = 4) + +wb_clean <- wb_labor_force %>% + select(country = `Country Name`, `1960`:`2022`) + +wb_clean_long <- wb_clean %>% + pivot_longer(cols = -country, names_to = "year", + values_to = "total_labor_force") %>% + mutate(country = str_to_title(country)) + +# clean some names to match OHI region names (add more here if discovered below) +# the ones below are not relevant anymore since name_2_rgn was updated with synonyms +# wb_clean_fix <- wb_clean_long %>% +# mutate( +# country = case_when( +# country %in% c("Antigua And Barbuda") ~ "Antigua and Barbuda", +# country %in% c("Bosnia And Herzegovina") ~ "Bosnia and Herzegovina", +# country %in% c("Cote D'ivoire") ~ "Ivory Coast", +# country %in% c("Hong Kong Sar, China") ~ "Hong Kong", +# country %in% c("Macao Sar, China") ~ "Macao", +# country %in% c("Sao Tome And Principe") ~ "Sao Tome and Principe", +# country %in% c("Sint Maarten (Dutch Part)") ~ "Sint Maarten", +# country %in% c("St. Kitts And Nevis") ~ "Saint Kitts and Nevis", +# country %in% c("St. Vincent And The Grenadines") ~ "Saint Vincent and the Grenadines", +# country %in% c("Trinidad And Tobago") ~ "Trinidad and Tobago", +# country %in% c("Turks And Caicos Islands") ~ "Turks and Caicos Islands", +# country %in% c("Venezuela, Rb") ~ "Venezuela", +# country %in% c("Virgin Islands (U.s.)") ~ "Virgin Islands", +# TRUE ~ country)) + +# get UNWTO data to have OHI region names +wb_clean_names <- name_2_rgn(df_in = wb_clean_long, # change to wb_clean_fix if you need to adjust any names + fld_name = 'country', + flds_unique = c('year')) + +# v2023 (prior to updating name_2_rgn) +# These data were removed for not having any match in the lookup tables: +# +# Africa Eastern And Southern (not used) +# 1 +# Africa Western And Central (not used) +# 1 +# Antigua And Barbuda (added above) +# 1 +# Arab World (not used) +# 1 +# Bosnia And Herzegovina (added above) +# 1 +# Caribbean Small States (not used) +# 1 +# Central Europe And The Baltics (not used) +# 1 +# Channel Islands (needs to be split into the OHI regions - not done here) +# 1 +# Cote D'ivoire (added above) +# 1 +# Early-Demographic Dividend (not used) +# 1 +# East Asia & Pacific (not used) +# 1 +# East Asia & Pacific (Excluding High Income) (not used) +# 1 +# East Asia & Pacific (Ida & Ibrd Countries) (not used) +# 1 +# Eswatini (landlocked) +# 1 +# Euro Area (not used) +# 1 +# Europe & Central Asia (not used) +# 1 +# Europe & Central Asia (Excluding High Income) (not used) +# 1 +# Europe & Central Asia (Ida & Ibrd Countries) (not used) +# 1 +# European Union (not used) +# 1 +# Fragile And Conflict Affected Situations (not used) +# 1 +# Heavily Indebted Poor Countries (Hipc) (not used) +# 1 +# High Income (not used) +# 1 +# Hong Kong Sar, China (added above) +# 1 +# Ibrd Only (not used) +# 1 +# Ida & Ibrd Total (not used) +# 1 +# Ida Blend (not used) +# 1 +# Ida Only (not used) +# 1 +# Ida Total (not used) +# 1 +# Isle Of Man (not used) +# 1 +# Lao Pdr (landlocked) +# 1 +# Late-Demographic Dividend (not used) +# 1 +# Latin America & Caribbean (not used) +# 1 +# Latin America & Caribbean (Excluding High Income) (not used) +# 1 +# Latin America & The Caribbean (Ida & Ibrd Countries) (not used) +# 1 +# Least Developed Countries: Un Classification (not used) +# 1 +# Low & Middle Income (not used) +# 1 +# Low Income (not used) +# 1 +# Lower Middle Income (not used) +# 1 +# Macao Sar, China (added above) +# 1 +# Middle East & North Africa (not used) +# 1 +# Middle East & North Africa (Excluding High Income) (not used) +# 1 +# Middle East & North Africa (Ida & Ibrd Countries) (not used) +# 1 +# Middle Income (not used) +# 1 +# North America (not used) +# 1 +# North Macedonia (landlocked) +# 1 +# Not Classified (not used) +# 1 +# Oecd Members (not used) +# 1 +# Other Small States (not used) +# 1 +# Pacific Island Small States (not used) +# 1 +# Post-Demographic Dividend (not used) +# 1 +# Pre-Demographic Dividend (not used) +# 1 +# Sao Tome And Principe (added above) +# 1 +# Sint Maarten (Dutch Part) (added above) +# 1 +# Small States (not used) +# 1 +# South Asia (not used) +# 1 +# South Asia (Ida & Ibrd) (not used) +# 1 +# St. Kitts And Nevis (added above) +# 1 +# St. Martin (French Part) (added above) +# 1 +# St. Vincent And The Grenadines (added above) +# 1 +# Sub-Saharan Africa (not used) +# 1 +# Sub-Saharan Africa (Excluding High Income) (not used) +# 1 +# Sub-Saharan Africa (Ida & Ibrd Countries) (not used) +# 1 +# Trinidad And Tobago (added above) +# 1 +# Turks And Caicos Islands (added above) +# 1 +# Upper Middle Income (not used) +# 1 +# Venezuela, Rb (added above) +# 1 +# Virgin Islands (U.s.) (added above) +# 1 +# West Bank And Gaza (West Bank landlocked/not used) +# 1 + + +# DUPLICATES found. Consider using collapse2rgn to collapse duplicates (function in progress). +# +# # A tibble: 7 × 1 +# country +# +# 1 China +# 2 Guam +# 3 Hong Kong +# 4 Macao +# 5 Northern Mariana Islands +# 6 Puerto Rico +# 7 Virgin Islands + + +# v2023 (after updating name_2_rgn) +# These data were removed for not having any match in the lookup tables: +# +# africa eastern and southern +# 1 +# africa western and central +# 1 +# arab world +# 1 +# caribbean small states +# 1 +# central europe and the baltics +# 1 +# channel islands (needs to be split into the OHI regions - not done here) +# 1 +# early-demographic dividend +# 1 +# east asia & pacific +# 1 +# east asia & pacific (excluding high income) +# 1 +# east asia & pacific (ida & ibrd countries) +# 1 +# euro area +# 1 +# europe & central asia +# 1 +# europe & central asia (excluding high income) +# 1 +# europe & central asia (ida & ibrd countries) +# 1 +# european union +# 1 +# fragile and conflict affected situations +# 1 +# heavily indebted poor countries (hipc) +# 1 +# high income +# 1 +# ibrd only +# 1 +# ida & ibrd total +# 1 +# ida blend +# 1 +# ida only +# 1 +# ida total +# 1 +# isle of man +# 1 +# late-demographic dividend +# 1 +# latin america & caribbean +# 1 +# latin america & caribbean (excluding high income) +# 1 +# latin america & the caribbean (ida & ibrd countries) +# 1 +# least developed countries: un classification +# 1 +# low & middle income +# 1 +# low income +# 1 +# lower middle income +# 1 +# middle east & north africa +# 1 +# middle east & north africa (excluding high income) +# 1 +# middle east & north africa (ida & ibrd countries) +# 1 +# middle income +# 1 +# north america +# 1 +# not classified +# 1 +# oecd members +# 1 +# other small states +# 1 +# pacific island small states +# 1 +# post-demographic dividend +# 1 +# pre-demographic dividend +# 1 +# small states +# 1 +# south asia +# 1 +# south asia (ida & ibrd) +# 1 +# sub-saharan africa +# 1 +# sub-saharan africa (excluding high income) +# 1 +# sub-saharan africa (ida & ibrd countries) +# 1 +# upper middle income +# 1 + + +# DUPLICATES found. Consider using collapse2rgn to collapse duplicates (function in progress). +# +# # A tibble: 7 × 1 +# country +# +# 1 China +# 2 Guam +# 3 Hong Kong Sar, China +# 4 Macao Sar, China +# 5 Northern Mariana Islands +# 6 Puerto Rico +# 7 Virgin Islands (U.s.) + +# fix duplicates +wb_dupe_fix <- wb_clean_names %>% + group_by(rgn_id, year) %>% + summarize(sum_fix = ifelse(all(is.na(total_labor_force)), NA, sum(total_labor_force, na.rm = TRUE))) %>% + rename(total_labor_force = sum_fix) diff --git a/globalprep/tr/v2024/unused_R/process_WEF.R b/globalprep/tr/v2024/unused_R/process_WEF.R new file mode 100644 index 00000000..27624c5e --- /dev/null +++ b/globalprep/tr/v2024/unused_R/process_WEF.R @@ -0,0 +1,79 @@ +### process_WEF.R: +### Do not run stand-alone - source from main tr_data_prep.Rmd for TourismRecreation. +### +### reformat and add rgn_ids to World Economic Forum (WEF) data +### +### Provenance: +### Jun2015 Casey O'Hara - updated for 2015, removed gapfilling, set up for .csv instead of .pdf +### Mar2014 JStewartLowndes; updated from 'clean_WEF.R' by JStewart in May 2013 +### May2013 'clean_WEF.R' by JStewart +### +### Data: +### TTCI: Travel and Tourism competitiveness: +### * download .xlsx: http://www3.weforum.org/docs/TT15/WEF_TTCR_Dataset_2015.xlsx +### * note: only 2015 is represented here. +### * read report online: http://reports.weforum.org/travel-and-tourism-competitiveness-report-2015/ +### * table 1: http://reports.weforum.org/travel-and-tourism-competitiveness-report-2015/ +### index-results-the-travel-tourism-competitiveness-index-ranking-2015/ +### +### GCI: Global Competitiveness (not used in 2015 for TR goal; see data_prep_GCI.R in globalprep/WEF-Economics) +### * download .xlsx: http://www3.weforum.org/docs/GCR2014-15/GCI_Dataset_2006-07-2014-15.xlsx +### * note: contains data for each year from 2006/2007 to 2014/2015 +### * read report: http://reports.weforum.org/global-competitiveness-report-2014-2015/ +### * table 3 in this .pdf: http://reports.weforum.org/global-competitiveness-report-2014-2015/ +### wp-content/blogs.dir/54/mp/files/pages/files/tables3-7-wef-globalcompetitivenessreport-2014-15-2.pdf +### +### read in individual files +### call name_to_rgn() from ohicore + + + +##############################################################################= +### WEF TTCI formatting ---- +##############################################################################= +# read in files +ttci_raw <- read.csv(dir_wef, + skip = 3, check.names = FALSE, stringsAsFactors = FALSE) +### NOTE: check.names = FALSE because of Cote d'Ivoire has an accent circonflex over the 'o' (probably other issues in there too) + +ttci <- ttci_raw[ , names(ttci_raw) != ''] +### first row is index scores for 2015. +### After column 150, a bunch of unnamed columns that throw errors + +ttci <- ttci %>% + filter(Series == "Global Competitiveness Index") %>% + filter(Attribute == "Value") %>% + select(-(1:2), -(4:8), year = Edition) %>% + gather(country, value, -year) %>% + mutate(score = as.numeric(value)) %>% + select(year, country, score) + + +ttci <- ttci %>% + mutate(country = as.character(country)) %>% + mutate(country = ifelse(country == "Congo, Democratic Rep.", "Democratic Republic of the Congo", country)) %>% + mutate(country = ifelse(country == "Côte d'Ivoire", "Ivory Coast", country)) + + +ttci_rgn <- name_2_rgn(df_in = ttci, + fld_name='country', + flds_unique=c('country','year')) + +ttci_rgn <- ttci_rgn %>% + arrange(country, year) %>% + select(rgn_id, rgn_name, year, score) + +head(ttci_rgn, 10) +# rgn_id year score rgn_name +# 1 14 2015 4.35 Taiwan +# 2 15 2015 3.63 Philippines +# 3 16 2015 4.98 Australia +# 4 20 2015 4.37 South Korea +# 5 24 2015 3.24 Cambodia +# 6 25 2015 4.26 Thailand +# 7 31 2015 4.00 Seychelles +# 8 37 2015 3.90 Mauritius +# 9 40 2015 3.80 Sri Lanka +# 10 41 2015 2.81 Mozambique +### Save TTCI data file +write_csv(ttci_rgn, 'intermediate/wef_ttci.csv') diff --git a/globalprep/tr/v2024/unused_R/process_WTTC.R b/globalprep/tr/v2024/unused_R/process_WTTC.R new file mode 100644 index 00000000..263ceeb6 --- /dev/null +++ b/globalprep/tr/v2024/unused_R/process_WTTC.R @@ -0,0 +1,113 @@ +# process_WTTC.R +# Do not run stand-alone - source from main tr_data_prep.Rmd for TourismRecreation. +# +# Add rgn_ids for World Travel and Tourism Council (WTTC) +# Previously had been named clean_WTTC.r (by JStewart May2013). This script created by JStewartLowndes Mar2014. +# +# read in .xls files from the WTTC raw folder downloaded from www.wttc.org/research/economic-data-search-tool +# data_prep.R. will reformat so that data aren't on every other line like the .xls table +# files must be accessed to the same year (eg end year 2013, assuming all after that is projected) +# adds identifier and units columns, and then runs add_rgn_id.r. +# no georegional gapfilling -- but save as separate files +# + + +##############################################################################= +### read in and process WTTC files ---- +##############################################################################= +### Here are the files I'm working with for 2016. +### * rgn_wttc_empd_2013.csv : Direct Contribution To Employment: The number of direct jobs within travel and tourism +### Format is similar to: +# Direct contribution to employment 1988 1989 1990 1991 1992 1993 1994 1995 1996 ... +# Algeria NA NA NA NA NA NA NA NA NA ... +# Thousands of jobs 131.27000 97.014900 96.75310 96.04490 102.00300 112.08700 104.26400 110.29600 120.64600 ... +# Percentage share 2.32336 2.260370 2.26751 2.15160 2.24575 2.22479 2.02518 2.02912 2.14551 ... +# Angola NA NA NA NA NA NA NA NA NA ... +# Thousands of jobs 10.97360 16.327900 20.97170 21.39380 19.71360 30.54360 39.61110 44.13890 42.50190 ... +# Percentage share 0.65895 0.943581 1.15234 1.13635 1.00022 1.46309 1.81137 1.93826 1.79914 ... + +wttc_files <- list.files(path = file.path(dir_wttc), full.names = TRUE, pattern = glob2rx('*csv')) +# ~/github/ohiprep/globalprep/WTTC_tourism/v2015/raw/rgn_wttc_empd_2014.csv +# ~/github/ohiprep/globalprep/WTTC_tourism/v2015/raw/rgn_wttc_empt_2014.csv +# ~/github/ohiprep/globalprep/WTTC_tourism/v2015/raw/rgn_wttc_gdpt_2014.csv + +emp_file <- wttc_files[str_detect(wttc_files, 'empd')] + +### Following breaks down employment data into count and percentage, and join into +### rgn_name | year | jobs_ct | jobs_pct + + d <- read.csv(emp_file, check.names = FALSE, stringsAsFactors = FALSE) + names(d)[1] <- 'temp' + head(d) + + d <- d %>% + filter(temp != "% growth") ## appears a new variable ("% growth") was added to WTTC analysis + + data_rows <- unlist(d[2:3, 1]) ## select the names of variables that are not countries + + ## extract only country names and save as vector + rgn_name <- d %>% + filter(!temp %in% data_rows) %>% + dplyr::select(country = temp) + rgn_name[nrow(rgn_name), 1] ## note: last one is 'Source: WTTC' + rgn_name <- rgn_name[1:(nrow(rgn_name) - 1), ] + + ## Create data frame for number of jobs in each country + data_count <- cbind(rgn_name, + d %>% filter(temp == data_rows[1]) %>% + dplyr::select(-temp)) + data_count <- data_count %>% + gather(year, jobs_ct, -rgn_name) %>% + mutate(jobs_ct = round(jobs_ct * 1000), + year = as.integer(as.character(year))) + + ## Create data frame for % share of total employment in each country + data_perct <- cbind(rgn_name, + d %>% filter(temp == data_rows[2]) %>% + dplyr::select(-temp)) + data_perct <- data_perct %>% + gather(year, jobs_pct, -rgn_name) %>% + mutate(year = as.integer(as.character(year))) + + ## Combine the two data frames created above + empd <- full_join(data_count, data_perct, by = c('rgn_name', 'year')) + + +## some region complications +# Sudan and South Sudan : actually two of our regions, but will consider as Sudan here +# Côte d'Ivoire reported as Ivory Coast in OHI + +# Former Netherlands Antilles : considered 6 regions by OHI: all will get the same score (gapfilling) + +empd <- empd %>% + mutate(rgn_name = as.character(rgn_name)) %>% + mutate(rgn_name = ifelse(rgn_name == "Sudan and South Sudan", "Sudan", rgn_name)) %>% + mutate(rgn_name = ifelse(rgn_name == "Côte d'Ivoire", "Ivory Coast", rgn_name)) + +names <- data.frame(rgn_name = unique(empd$rgn_name), new_rgn_name = unique(empd$rgn_name)) %>% + filter(rgn_name != "Former Netherlands Antilles") %>% + rbind(data.frame(rgn_name = "Former Netherlands Antilles", new_rgn_name = c("Bonaire", "Curacao", "Sint Eustatius", "Saba", "Sint Maarten"))) + # Aruba is also considered the "Former Netherlands Antilles", but it is reported separately in the data + +empd <- empd %>% + left_join(names, by='rgn_name') %>% + dplyr::select(rgn_name=new_rgn_name, year, jobs_ct, jobs_pct) + + +### Prep direct and total employment data with name_to_rgn function +empd_rgn <- name_2_rgn(df_in = empd, + fld_name='rgn_name', + flds_unique=c('rgn_name','year')) + + empd_rgn <- empd_rgn %>% + group_by(rgn_id, year, rgn_name) %>% + rename(jobs_ct_orig = jobs_ct, jobs_pct_orig = jobs_pct) %>% + ### temporary rename, so summary can end up with the original column names + summarize(jobs_ct = sum(jobs_ct_orig, na.rm=TRUE), + jobs_pct = weighted.mean(jobs_pct_orig, jobs_ct_orig, na.rm = TRUE)) %>% + data.frame() + + +### write csvs to github in intermediate location. +write_csv(empd_rgn, file.path(dir_github, "intermediate/wttc_empd_rgn.csv")) + diff --git a/globalprep/tr/v2024/unused_R/process_populations.R b/globalprep/tr/v2024/unused_R/process_populations.R new file mode 100644 index 00000000..5cf92a0f --- /dev/null +++ b/globalprep/tr/v2024/unused_R/process_populations.R @@ -0,0 +1,100 @@ +# use a pre-built function that accesses an API to World Bank data to get populations +populations <- WDI( + country = "all", + indicator = "SP.POP.TOTL", + start = 2008, end = 2021) %>% # UPDATE end to latest year of arrivals data + select(country, population = SP.POP.TOTL, year) + + +# get populations by OHI region +pop_clean_names <- name_2_rgn(df_in = populations, + fld_name = 'country') %>% + select(-country) +# if channels islands gets arrivals data, would need to split that before name_2_rgn + +# fix duplicates +pop_dupe_fix <- pop_clean_names %>% + group_by(rgn_id, rgn_name, year) %>% + summarize(sum_fix = ifelse(all(is.na(population)), NA, sum(population, na.rm = TRUE))) %>% + mutate(population_method = ifelse(!is.na(sum_fix), "WDI-WB", NA)) %>% + rename(population = sum_fix) + +# add in another dataset to help gapfill some populations of regions we have arrivals and coastline data for but no population +ourworldindata_file_path <- file.path(dir_M, "git-annex", "globalprep", "_raw_data", "OurWorldinData", paste0("d", version_year), "population.csv") # may want to download latest version if available; if not, copy from previous year +gf_pops <- read_csv(ourworldindata_file_path) %>% + rename(country = Entity, year = Year, population = `Population (historical estimates)`) %>% + select(-Code) + +gf_pop_clean_names <- name_2_rgn(df_in = gf_pops, + fld_name = 'country') %>% + select(-country) +# ignoring countries that were removed in this df since it's just for gapfilling; may be relevant in future years to fix these + +# fix duplicates +gf_pop_dupe_fix <- gf_pop_clean_names %>% + group_by(rgn_id, rgn_name, year) %>% + summarize(sum_fix = ifelse(all(is.na(population)), NA, sum(population, na.rm = TRUE))) %>% + rename(population = sum_fix) + +# get all countries we have arrivals for from unwto_dupe_fix +all_arrivals_countries <- unwto_dupe_fix_downup_gf %>% + left_join(rgns_eez, by = "rgn_id") %>% # to get names back for ease of use + select(rgn_id, rgn_name) %>% + distinct() + +pop_missing_countries <- setdiff(all_arrivals_countries$rgn_id, pop_dupe_fix$rgn_id) + +pop_years <- unique(pop_dupe_fix$year) + +pop_countries_to_add <- all_arrivals_countries %>% + filter(rgn_id %in% pop_missing_countries) %>% + uncount(length(pop_years)) %>% + group_by(rgn_id, rgn_name) %>% + mutate(year = pop_years, + population = NA) + +# combine the two datasets +combined_pops <- pop_dupe_fix %>% + rbind(pop_countries_to_add) %>% + left_join(gf_pop_dupe_fix, by = c("rgn_id", "rgn_name", "year"), relationship = + "many-to-many") %>% + group_by(rgn_id, rgn_name, year, population_method) %>% + summarize(population_gf = ifelse(is.na(population.x), population.y, population.x)) %>% + mutate(population_method = ifelse(is.na(population_method) & !is.na(population_gf), "OurWorldinData", population_method)) %>% + mutate(population_gapfilled = ifelse(population_method == "OurWorldinData", "gapfilled", NA)) %>% # prepare a "gapfilled" column to indicate "gapfilled" or NA + rename(population = population_gf) %>% + ungroup() + +# this has left sint eustatius, saba, and bonaire +# statista is the main source found that separates these 3 populations from each other +# as of v2023, only goes back to 2011, so 2011 is used to gapfill 2008-2010 for these countries +# other option in the future could be weighting the 3 populations to divide up the combined value for them in another dataset +# since they didn't seem to have a consistent weighting over time, decided to proceed with statista for v2023 +statista_file_path_saba <- file.path(dir_M, "git-annex", "globalprep", "_raw_data", "Statista", paste0("d", version_year), "statistic_id706807_population-of-saba--caribbean-netherlands--2011-2023.xlsx") # may want to download latest version if available; if not, copy from previous year. link: https://www.statista.com/statistics/706807/population-of-saba-in-the-caribbean-netherlands/ +statista_file_path_bonaire <- file.path(dir_M, "git-annex", "globalprep", "_raw_data", "Statista", paste0("d", version_year), "statistic_id706799_population-of-bonaire--caribbean-netherlands--2011-2023.xlsx") # may want to download latest version if available; if not, copy from previous year. link: https://www.statista.com/statistics/706799/population-of-bonaire-in-the-caribbean-netherlands/ +statista_file_path_sint_eustatius <- file.path(dir_M, "git-annex", "globalprep", "_raw_data", "Statista", paste0("d", version_year), "statistic_id706806_population-of-sint-eustatius--caribbean-netherlands--2011-2023.xlsx") # may want to download latest version if available; if not, copy from previous year. link: https://www.statista.com/statistics/706806/population-of-sint-eustatius-in-the-caribbean-netherlands/ + +# process the data to be ready to add into the bigger dataset +source(here(paste0("globalprep/tr/v", version_year, "/R/process_statista_pop_fxn.R"))) # outputs what are specified below in df_name + +process_statista_pop_data(file_path = statista_file_path_saba, + rgn_name = "Saba", + df_name = "saba_gf") +process_statista_pop_data(file_path = statista_file_path_bonaire, + rgn_name = "Bonaire", + df_name = "bonaire_gf") +process_statista_pop_data(file_path = statista_file_path_sint_eustatius, + rgn_name = "Sint Eustatius", + df_name = "sint_eustatius_gf") + +# combine the statistsa data into one df +sab_bon_eus_fill <- rbind(saba_gf, bonaire_gf, sint_eustatius_gf) %>% + filter(year <= 2021) %>% # UPDATE to latest year of arrivals data + mutate(year = as.integer(year)) # match year type + +# fill the bigger dataset with these values +combined_pops_filled <- combined_pops %>% + rbind(sab_bon_eus_fill) %>% + drop_na(population) %>% # remove the unfilled saba, bonaire, sint eustatius + select(-rgn_name) %>% # don't need anymore since done looking into things + mutate(year = as.character(year)) # match year type again for down the line diff --git a/globalprep/tr/v2024/unused_R/process_statista_pop_fxn.R b/globalprep/tr/v2024/unused_R/process_statista_pop_fxn.R new file mode 100644 index 00000000..5bb548b0 --- /dev/null +++ b/globalprep/tr/v2024/unused_R/process_statista_pop_fxn.R @@ -0,0 +1,34 @@ +# this function processes population data for saba, sint eustatius, and bonaire -- may be applicable to other population datasets from statista +process_statista_pop_data <- function(file_path, rgn_name, df_name) { + # read in the csv needing processing + df <- read_xlsx(file_path, sheet = "Data", skip = 3) %>% + drop_na() + + # fix names + names(df) <- c("year", "population") + + # add column with country name + df_clean <- df %>% + mutate(rgn_name = rgn_name) %>% + left_join(rgns_eez, by = "rgn_name") %>% + select(rgn_id, rgn_name, year, population) + + # prep to fill in 2008-2010 with 2011 (may need to alter this for some data) + pop_missing_years <- data.frame( + year = c(2008, 2009, 2010), + population = NA, + rgn_id = as.numeric(unique(df_clean$rgn_id)), + rgn_name = rgn_name + ) + + # fill in the years with 2011 + df_year_fill_clean <- df_clean %>% + rbind(pop_missing_years, .) %>% + mutate(population_method = ifelse(is.na(population), "Statista - nearby year", "Statista")) %>% + mutate(population_gapfilled = "gapfilled") %>% + fill(population, .direction = "up") + + + + assign(df_name, df_year_fill_clean, envir = .GlobalEnv) # add to environment +} \ No newline at end of file diff --git a/globalprep/tr/v2024/unused_R/tr_data_prep_version_using_workforce.Rmd b/globalprep/tr/v2024/unused_R/tr_data_prep_version_using_workforce.Rmd new file mode 100644 index 00000000..440e004b --- /dev/null +++ b/globalprep/tr/v2024/unused_R/tr_data_prep_version_using_workforce.Rmd @@ -0,0 +1,676 @@ +--- +title: 'OHI `r format(Sys.Date(), "%Y")` - Tourism and Recreation ' +author: "*Compiled on `r date()` by `r Sys.info()['user']`*" +output: + html_document: + code_folding: show + toc: true + toc_depth: 1 + toc_float: yes + number_sections: true + theme: cerulean + highlight: haddock + includes: + in_header: '../../../workflow/templates/ohi_hdr.html' + pdf_document: + toc: true +editor_options: + chunk_output_type: console +--- + + +[REFERENCE RMD FILE](http://ohi-science.org/ohiprep_v2023/globalprep/tr/v2023/tr_data_prep.html) + + +# Summary +This document describes the steps for obtaining the data used to calculate the tourism and recreation goal for the 2023 global assessment. + +The general calculation is: +tr = Ep * Sr +and +Xtr = tr/90th quantile across regions + +* Ep = Proportion of workforce directly employed in tourism +* Sr = (S-1)/5; Sustainability of tourism + + +## The following data are used: + +* Proportion of workforce directly employed in tourism: obtained through the [UNWTO](https://www.unwto.org/tourism-statistics/key-tourism-statistics) (in the form of thousands of employees in the tourism industry). Range: 1995-2021 +* Total labor force (from World Bank, World Development Indicators database), used to calculate proportion of workforce directly employed in tourism: downloaded from [here](https://data.worldbank.org/indicator/SL.TLF.TOTL.IN). Range: 1990-2022 +* Tourism sustainability: World Economic Forum. The Travel & Tourism Development Index 2021 dataset (version 24 May 2022). 2022. [TTDI](https://www.weforum.org/reports/travel-and-tourism-development-index-2021/downloads-510eb47e12#report-nav) +* Per capita GDP: (World Bank with gaps filled using CIA data), used to gapfill missing values in Tourism sustainability + + +# Updates from previous assessment + +## Tourism sustainability +None in v2023. Copied data from v2022. + +## Tourism employment +The data for this layer has been paywalled. Because of this, we have replaced the WTTC data with UNWTO data. This change causes us to be a year behind on information relative to the old data source, but this is unavoidable. + + +**We were able to update the following data:** + +* Proportion of jobs in tourism - UNWTO data on thousands of tourism industry employees, reported until 2021 (downloaded [here](https://www.unwto.org/tourism-statistics/key-tourism-statistics) (dataset: "Number employees by tourism industry") on 07/18/2023, used in combination with the World Bank data on [total labor force](https://data.worldbank.org/indicator/SL.TLF.TOTL.IN), downloaded on 7/19/2023) + +## Initial set-up code + +```{r setup, message=FALSE, warning=FALSE, results="hide"} +# library(devtools) +# devtools::install_github("ohi-science/ohicore@dev") # dont worry about devtools +library(ohicore) +library(tidyverse) +library(stringr) +library(WDI) +library(here) +library(janitor) +library(plotly) +library(readxl) + +version_year <- "2023" +prev_ver_yr <- as.character(as.numeric(version_year) - 1) + +source(paste0("http://ohi-science.org/ohiprep_v", version_year, "/workflow/R/common.R")) +#source(here(paste0("globalprep/tr/v", version_year, "/R/tr_fxns.R"))) +``` + + +# Ep: Proportion of workforce directly employed in tourism + +We use "direct" employment data from the [United Nations World Tourism Organization (UNWTO) ](https://www.unwto.org/). Up until the current assessment, we accessed data from the [WTTC](http://www.wttc.org/), but this is no longer a viable option. This is in the form of thousands of employees in the tourism industry, which we divide by [World Bank](https://data.worldbank.org) data on total labor force for each country. There are a lot of missing values in this data that will be gapfilled by methods such as upfilling or downfilling years of data based on if the previous or later year has information and finding alternative sources of data for missing countries/countries with no data at all. + + +### Calculating *direct* contribution of tourism to employment using UNWTO number of emplpyees in the tourism industry + +The number of employees in the tourism industry are made proportions and used to calculate direct contribution of tourism to employment. This is done by dividing this data by the total labor force for the country. + + +### Source cleaned data sources + +```{r} +# source in cleaned UNWTO data for current version year (make sure to download from website and put on Mazu in the UNWTO folder first) +source(here(paste0("globalprep/tr/v", version_year, "/R/process_UNWTO.R"))) # outputs unwto_dupe_fix + +# read in cleaned tourism employee data for gapfilling (make sure to download from websites and put on Mazu in the EUROSTAT/OECD folders first) +#source(here(paste0("globalprep/tr/v", version_year, "/R/process_ILOSTAT.R"))) # outputs ilo_clean_names +source(here(paste0("globalprep/tr/v", version_year, "/R/process_EUROSTAT.R"))) # outputs euro_clean_names; check the unique() output to make sure it's all good +source(here(paste0("globalprep/tr/v", version_year, "/R/process_OECD.R"))) # outputs oecd_clean_names + +# read in cleaned total labor force data (make sure to download from website and put on Mazu in the World Bank folder first) +source(here(paste0("globalprep/tr/v", version_year, "/R/process_WB.R"))) # outputs wb_dupe_fix +``` + +### Fill some gaps in UNWTO data with other datasets + +```{r} +# combine all three tourism job data sources +# add OECD column first because numbers seem closer to what UNWTO uses +merge1 <- merge(unwto_dupe_fix, oecd_clean_names, by = c("rgn_id", "year"), all.x = TRUE) + +# use coalesce to fill missing values in UNWTO data with OECD data +merge1$merge1 <- coalesce(merge1$sum_fix, merge1$tourism_jobs_ct) + +merge1_w_source <- merge1 %>% + mutate(method = ifelse(is.na(method) & !is.na(merge1), "OECD", method)) %>% + mutate(gapfilled = ifelse(method == "OECD", "gapfilled", gapfilled)) %>% + select(-sum_fix, -tourism_jobs_ct) + +# add in a column of EUROSTAT data +merge2 <- merge(merge1_w_source, euro_clean_names, by = c("rgn_id", "year"), all.x = TRUE) + +# use coalesce to fill missing values in UNWTO data with EUROSTAT data +merge2$merge2 <- coalesce(merge2$merge1, merge2$tourism_jobs_ct_transformed) + +merge2_w_source <- merge2 %>% + mutate(method = ifelse(is.na(method) & !is.na(merge2), "EUROSTAT", method)) %>% + mutate(gapfilled = ifelse(method == "EUROSTAT", "gapfilled", gapfilled)) %>% + select(-merge1, -tourism_jobs_ct_transformed) %>% + rename(tourism_jobs_ct = merge2) + +# # IF WE USE ILOSTAT +# merge3 <- merge(merge2_w_source, ilo_clean_names, by = c("rgn_id", "year"), all.x = TRUE) +# +# merge3$merge3 <- coalesce(merge3$merge2, merge3$tourism_jobs_ct) +# +# merge3_w_source <- merge3 %>% +# mutate(source = ifelse(is.na(source) & !is.na(merge3), "ILOSTAT", source)) %>% +# select(-merge2, -tourism_jobs_ct) %>% +# rename(tourism_jobs_ct = merge3) +``` + +### Divide combined tourism job count data by total labor force (World Bank) + +```{r} +# divide the number of tourism jobs by total labor force to get proportions +tourism_props <- merge2_w_source %>% + left_join(wb_dupe_fix, by = c("rgn_id", "year")) %>% + mutate(Ep = (tourism_jobs_ct/total_labor_force)) + +# check out things so far +summary(tourism_props) + +# remove unnecessary columns after checking summary +tourism_props <- tourism_props %>% + select(-tourism_jobs_ct, -total_labor_force) +``` + +### Gapfilling using previous/next years for same region + +```{r} +# make year a factor for ordering with gapfilling +tourism_props$year <- factor(tourism_props$year, levels = unique(tourism_props$year)) + +# downfill then upfill missing values +# use 2019 if available to fill 2021, then 2020 if not, to account for COVID-19 +# check rgn_id 20, for example, for if choosing 2019 vs. 2020 worked +tourism_props_downup_gf <- tourism_props %>% + group_by(rgn_id) %>% + arrange(rgn_id, year) %>% + mutate(Ep = ifelse(year == 2021 & is.na(Ep), lag(Ep, n = 2), Ep)) %>% + fill(Ep, .direction = "downup") %>% + mutate(method = ifelse(is.na(method) & !is.na(Ep), "nearby year", method)) %>% + mutate(gapfilled = ifelse(method == "nearby year", "gapfilled", gapfilled)) + +# check out things so far +summary(tourism_props_downup_gf) +``` + +### Gapfilling using UN georegions + +```{r} +## gapfill missing data using UN georegion data: +georegions <- georegions +georegion_labels <- georegion_labels + +tourism_props_geo_gf <- tourism_props_downup_gf %>% + left_join(georegions, by = 'rgn_id') %>% + left_join(georegion_labels, by = 'rgn_id') %>% + select(-r0) # add in some GDP data here ERIKA + + +# Calculate two different gapfill columns using r2 and r1 +tourism_props_geo_gf <- tourism_props_geo_gf %>% + group_by(year, r2) %>% + mutate(Ep_pred_r2 = mean(Ep, na.rm=TRUE)) %>% + ungroup() %>% + group_by(year, r1) %>% + mutate(Ep_pred_r1 = mean(Ep, na.rm=TRUE)) %>% + ungroup() + +# first gapfill with r2, if no value available use r1; create column indicating whether value was gapfilled and if so, by what method. +tourism_props_geo_gf <- tourism_props_geo_gf %>% + mutate(Ep_all = ifelse(is.na(Ep), Ep_pred_r2, Ep)) %>% + mutate(Ep_all = ifelse(is.na(Ep_all), Ep_pred_r1, Ep_all)) %>% + mutate(gapfilled = case_when(is.na(Ep) & !is.na(Ep_all) ~ "gapfilled", + TRUE ~ gapfilled)) %>% + mutate(method = case_when(is.na(Ep) & !is.na(Ep_pred_r2) ~ "UN georegion (r2)", + is.na(Ep) & is.na(Ep_pred_r2) & !is.na(Ep_pred_r1) ~ "UN georegion (r1)", + TRUE ~ method)) +``` + +### Removing low population / uninhabited regions + +```{r} +### After gap-filling, make sure low/uninhabited regions are NA +# Create df for unpopulated/low populated regions +low_pop() +low_pop <- low_pop %>% + filter(est_population < 3000 | is.na(est_population)) %>% #filter out regions that have populations > 3000 and keep NA values + rename(rgn_label = rgn_nam) + +summary(tourism_props_geo_gf) +# v2020 371 NAs +# v2022 114 NAs +# v2023 Ep_pred_r2 = 297 NAs, Ep_pred_r1 = 0 NAs + +# make sure all the NAs are uninhabited regions +tourism_props_nas <- tourism_props_geo_gf %>% + filter(is.na(Ep_all)) %>% + select(rgn_id, year, r1_label, r2_label, rgn_label) %>% + left_join(low_pop, by = c("rgn_id", "rgn_label")) + +tourism_props_nas %>% + filter(Inhabited == 0 & !is.na(est_population)) %>% + nrow() # 0 ✓ + +max(tourism_props_nas$est_population, na.rm=TRUE) < 3000 # should be true + +# make sure all the uninhabited regions are NA (along with gapfill and method if they were gapfilled above) +tourism_props_geo_gf <- tourism_props_geo_gf %>% + mutate(Ep_all = ifelse(rgn_id %in% low_pop$rgn_id, NA, Ep_all)) %>% + mutate(gapfilled = ifelse(is.na(Ep_all), NA, gapfilled)) %>% + mutate(method = ifelse(is.na(Ep_all), NA, method)) + + +# check NAs once more +summary(tourism_props_geo_gf) +# v2019: Adding the low pop df identifies 13 additional regions that should be NA instead of gapfilled, taking the total number of NAs in the data set from 245 to 700 +# v2020: Adding the low pop df takes the total number of NAs in the data set from 371 to 832 +# v2022: Adding the low pop df takes the total number of NAs in the data set from 14 to 40 +# v2023: NAs do not change +``` + +### Write output files + +```{r} +# save gapfill info +tourism_props_gf_to_write <- tourism_props_geo_gf %>% + select(rgn_id, year, gapfilled, method) + +write_csv(tourism_props_gf_to_write, here(paste0("globalprep/tr/v", version_year, "/output/tr_jobs_pct_tourism_gf.csv"))) + +# save gap-filled data +tourism_props_to_write <- tourism_props_geo_gf %>% + select(rgn_id, year, Ep) + +write_csv(tourism_props_to_write, here(paste0("globalprep/tr/v", version_year, "/output/tr_jobs_pct_tourism.csv"))) +``` + +### Look at changes in recent years + +We would expect for tourism jobs to decrease across the board from 2019 and 2020 given the pandemic, and likely see a rebound to some extent between 2020 and 2021 — let's make sure that's reflected in our results. + +```{r} +tourism_props_compare <- tourism_props_to_write %>% + mutate(year = as.numeric(as.character(year))) %>% + filter(year >= 2019) %>% + pivot_wider(names_from = year, values_from = Ep) + +# compare 2019 and 2020 +plot(tourism_props_compare$"2019", tourism_props_compare$"2020", + xlab = "v2023 2019 Employment Proportion", ylab = "v2023 2020 Employment Proportion") +abline(0, 1) + +# compare 2020 and 2021 +plot(tourism_props_compare$"2020", tourism_props_compare$"2021", + xlab = "v2023 2020 Employment Proportion", ylab = "v2023 2021 Employment Proportion") +abline(0, 1) +``` + +Everything looks reasonable. + +### Look at changes vs. previous data source (v2023) + +```{r} +new_data <- read_csv(paste0("globalprep/tr/v", version_year, "/output/tr_jobs_pct_tourism.csv")) +old_data <- read_csv(paste0("globalprep/tr/v", prev_ver_yr, "/output/tr_jobs_pct_tourism.csv")) + +compare_common_data <- new_data %>% + left_join(old_data, by = c("rgn_id", "year")) %>% + drop_na() + +plot(compare_common_data$Ep.x, compare_common_data$Ep.y, + xlab = "v2023 Employment Proportion", ylab = "v2022 Employment Proportion") +abline(0, 1) + + + + +compare_common_data_2021 <- new_data %>% + left_join(old_data, by = c("rgn_id", "year")) %>% + drop_na() %>% + filter(year == 2021) + +plot(compare_common_data_2021$Ep.x, compare_common_data_2021$Ep.y, + xlab = "v2023 Employment Proportion", ylab = "v2022 Employment Proportion") +abline(0, 1) + +compare_common_data_2020 <- new_data %>% + left_join(old_data, by = c("rgn_id", "year")) %>% + drop_na() %>% + filter(year == 2020) + +plot(compare_common_data_2020$Ep.x, compare_common_data_2020$Ep.y, + xlab = "v2023 Employment Proportion", ylab = "v2022 Employment Proportion") +abline(0, 1) + +compare_common_data_2019 <- new_data %>% + left_join(old_data, by = c("rgn_id", "year")) %>% + drop_na() %>% + filter(year == 2019) + +plot(compare_common_data_2019$Ep.x, compare_common_data_2019$Ep.y, + xlab = "v2023 Employment Proportion", ylab = "v2022 Employment Proportion") +abline(0, 1) + +compare_common_data_2015 <- new_data %>% + left_join(old_data, by = c("rgn_id", "year")) %>% + drop_na() %>% + filter(year == 2015) + +plot(compare_common_data_2015$Ep.x, compare_common_data_2015$Ep.y, + xlab = "v2023 Employment Proportion", ylab = "v2022 Employment Proportion") +abline(0, 1) +``` + + + +# Ts: Tourism sustainability + +These data are from the World Economic Forum's "Travel and Tourism Development Index" (https://www.weforum.org/reports/travel-and-tourism-development-index-2021/downloads-510eb47e12) See mazu: _raw_data/WEF-Economics/ for more details and the raw data. + +The TTDI was formerly the TTCI which was a similar index, but unfortunately not comparable. The TTDI only extends back to 2019. + +These data are gapfilled using gdppcppp and UN georegion information (see next section for obtaining and preparing these data). + +```{r WEF processing, eval=FALSE} +# update to latest file name +ttdi_file <- "WEF_TTDI_2021_data_for_download.xlsx" + +ttdi_raw <- read_excel(paste0(dir_M, "/git-annex/globalprep/_raw_data/WEF-Economics/d", version_year, "/", ttdi_file), + skip = 2) + +# move up column names from first row while keeping the full country names as columns too +names(ttdi_raw)[1:9] <- as.character(ttdi_raw[1, 1:9]) + +# filtering for sustainability scores, selecting needed columns, and pivoting to tidy format +ttdi <- ttdi_raw %>% + filter(Title == "T&T Sustainability subindex, 1-7 (best)", + Attribute == "Score") %>% + select(year = Edition, Albania:Zambia) %>% + # currently Zambia is the last country column + pivot_longer(cols = Albania:Zambia, names_to = "country", + values_to = "score") %>% + mutate(score = as.numeric(score)) + + +# Changing names that are not recognized by ohicore +ttdi <- ttdi %>% + mutate(country = ifelse(str_detect(country, "Ivoire"), "Ivory Coast", country)) + + +ttdi_rgn <- name_2_rgn(df_in = ttdi, + fld_name='country') + +## Duplicated regions weighted mean +weight_data <- data.frame(country = c("China", "Hong Kong SAR"), + # pop values from World Bank 2021 estimates - updated v2022 + population = c(1412360000, 7413100)) + + +ttdi_rgn <- ttdi_rgn %>% + arrange(country) %>% + left_join(weight_data, by = "country") %>% + mutate(population = ifelse(is.na(population), 1, population)) %>% + group_by(rgn_id, rgn_name, year) %>% + summarize(score = weighted.mean(score, population)) %>% + select(year, rgn_id, rgn_name, score) + +# compare with old dataframe to make sure only the duplicated region scores changed + +head(ttdi_rgn, 10) + +### Save TTDI data file +write.csv(ttdi_rgn, here(paste0("globalprep/tr/v", version_year, "/intermediate/wef_ttdi.csv")), row.names = FALSE) + +``` + +## Preparing the gdppcppp data: +These data are used to gapfill missing values in tourism sustainability. Most of the data are from the World Bank, but CIA data fill some gaps (CIA data is available for only the most recent year). + +The Artisanal Opportunities goal uses gdppcppp data, so we will get the data that was processed for that goal. + + +```{r worldbank, eval=FALSE} +wb <- read.csv(here(paste0("globalprep/ao/v", version_year, "/intermediate/gdppcppp_ohi.csv"))) %>% + dplyr::select(rgn_id, year, value) + +``` + +CIA data are used to fill in missing gaps in the gdppcppp data (https://www.cia.gov/the-world-factbook/field/real-gdp-per-capita/country-comparison) + +Downloaded: 07/05/2022 + +See README on the raw folder for instructions on how to download this data. + +The following code is used to prepare these data for OHI: + +```{r cia gdp, eval=FALSE} + +cia_gdp <- read.csv(here(paste0("globalprep/tr/v", version_year, "/raw/cia_gdp_pc_ppp.csv"))) %>% + # remove dollar signs and commas and convert to numeric + mutate(value = as.numeric(gsub("[$,]", "", value))) %>% + select(name, value) %>% + rename(country = name, pcgdp_cia = value) + + ## Data reported in a lower resolution than OHI regions +splits <- data.frame(country = "Saint Helena, Ascension, and Tristan da Cunha", + country2 = c("Saint Helena", "Ascension","Tristan da Cunha")) + +cia_gdp <- cia_gdp %>% + left_join(splits, by='country') %>% + mutate(country2 = ifelse(is.na(country2), country, country2)) %>% + select(country = country2, pcgdp_cia) + +cia_gdp_rgn <- name_2_rgn(df_in = cia_gdp, + fld_name='country') + +### Duplicated regions: Collapse regions after weighting by population (regions we include as a single region) - + +population_weights <- data.frame(country = c("Virgin Islands", "Puerto Rico", + "China", "Hong Kong", "Macau", + "Guam", "Northern Mariana Islands"), + # from world bank - updated v2022 + population = c(105870, 3263584, 1412360000, + 7413100, 658391, 170184, 57910)) + +cia_gdp_rgn <- cia_gdp_rgn %>% + left_join(population_weights, by="country") %>% + mutate(population = ifelse(is.na(population), 1, population)) %>% + group_by(rgn_id) %>% + summarize(pcgdp_cia = weighted.mean(pcgdp_cia, population)) %>% + ungroup() %>% + filter(rgn_id <= 250) %>% + select(rgn_id, pcgdp_cia) + +write.csv(cia_gdp_rgn, here(paste0("globalprep/tr/v", version_year, "/intermediate/wb_rgn_cia_GDPPCPPP.csv")), row.names=FALSE) + +``` + +The following code combines the two gdp datasets and gapfills missing regions using UN georegions. + +If there is no World Bank gdppcppp data (pcgdp), the CIA data is used (pcgdp_cia). The pcgdp2 variable includes both the World Bank and CIA data (with CIA data only used if there is not World Bank data). The remaining data are estimated using UN geopolitical regions. Ideally, the mean gdppcppp value is calculated at the r2 scale (gdp_pred_r2) using regions within each class with gdppcppp data. If there were not enough regions with data at the r2 scale, the average at the r1 scale was used (gdp_pred_r1). The gdp_all variable combines all estimates using the following heirarchy: World Bank -> CIA -> estimated using mean from r2 UN geopolitical regions -> estimated using mean from r1 UN geopolitical regions. + +```{r gapfill gdp, eval=FALSE} + +### world bank gdp data +gdppcppp <- wb %>% + select(rgn_id, year, pcgdp = value) + +### cia gdp data +gdppcppp2 <- read.csv(here(paste0("globalprep/tr/v", version_year, "/intermediate/wb_rgn_cia_GDPPCPPP.csv"))) + + +### Use WB data, but if missing, use pcgdp_cia. +### combine with UN georegion data +years <- data.frame(year = min(gdppcppp$year):max(gdppcppp$year)) + +georegions <- ohicore::georegions + +regions <- georegions %>% + left_join(georegion_labels, by = 'rgn_id') + +gdp_raw <- merge(years, regions, by=NULL) %>% + left_join(gdppcppp, by = c('rgn_id', 'year')) %>% + left_join(gdppcppp2, by = c("rgn_id")) + +## quick compare to make sure the CIA and World Bank data are compatible +plot(gdp_raw$pcgdp[gdp_raw$year==2021], gdp_raw$pcgdp_cia[gdp_raw$year==2021]) +abline(0,1, col="red") +# a few minor outliers but overall looks good + +gdp_raw <- gdp_raw %>% + mutate(pcgdp2 = ifelse(is.na(pcgdp), pcgdp_cia, pcgdp)) + +## Calculating the means across different geopolitical levels (e.g. r2, r1) +gdp_raw <- gdp_raw %>% + group_by(r2, year) %>% + mutate(gdp_pred_r2 = mean(pcgdp2, na.rm=TRUE)) %>% + ungroup() %>% + group_by(r1, year) %>% + mutate(gdp_pred_r1 = mean(pcgdp2, na.rm=TRUE)) %>% + ungroup() + +gdp_raw_gf <- gdp_raw %>% + mutate(gdp_all = ifelse(is.na(pcgdp2), gdp_pred_r2, pcgdp2)) %>% + mutate(gdp_all = ifelse(is.na(gdp_all), gdp_pred_r1, gdp_all)) %>% + mutate(gapfilled = ifelse(is.na(pcgdp2) & !is.na(gdp_all), "gapfilled", NA)) %>% + mutate(method = ifelse(is.na(pcgdp2) & !is.na(gdp_pred_r2), "UN georegion (r2)", NA)) %>% + mutate(method = ifelse(is.na(pcgdp2) & is.na(gdp_pred_r2) & !is.na(gdp_pred_r1), "UN georegion (r1)", method)) + +write_csv(gdp_raw_gf, here(paste0("globalprep/tr/v", version_year, "/intermediate/gdp_raw_gf.csv"))) + +gdp_data_gf <- gdp_raw_gf %>% + select(rgn_id, year, gapfilled, method) + +write_csv(gdp_data_gf, here(paste0("globalprep/tr/v", version_year, "/intermediate/gdp_gf.csv"))) + +gdp_data <- gdp_raw_gf %>% + select(rgn_id, year, pcgdp = gdp_all) + +write_csv(gdp_data, here(paste0("globalprep/tr/v", version_year, "/intermediate/gdp.csv"))) + +``` + + +The final step is gapfilling the Sustainability data using a linear model with gdppcppp and UN geopolitical regions as predictor variables. + +```{r, eval=FALSE} + +sust <- read.csv(here(paste0("globalprep/tr/v", version_year, "/intermediate/wef_ttdi.csv")), stringsAsFactors = FALSE) + +### don't need to gapfill data without tourism data: +## Most recent tourism data is 2019. + +ep_gf <- read.csv(here(paste0("globalprep/tr/v", version_year, "/output/tr_jobs_pct_tourism.csv"))) %>% + # filter(year == 2021) %>% + select(rgn_id, Ep, year) %>% + filter(!is.na(Ep)) + +# gdp dataframe prepared above (World Bank, CIA, and gapfilled gdp data) +gdp_raw_gf <- read.csv(here(paste0("globalprep/tr/v", version_year, "/intermediate/gdp_raw_gf.csv")), stringsAsFactors = FALSE) %>% + # filter(year == 2021) %>% + select(rgn_id, r0_label, r1_label, r2_label, rgn_label, + pcgdp, pcgdp_cia, pcgdp2, gdp_all, year) + +tr_sust <- gdp_raw_gf %>% + left_join(sust, by = c("rgn_id", "year")) %>% + left_join(ep_gf, by = c("rgn_id", "year")) %>% + rename(S_score = score) %>% + filter(rgn_id != 213) + +### Add gapfill flag variable +## Reminder: +## pcgdp2: includes both the World Bank and CIA data (with CIA data only used if there is not World Bank data) +## Ep: Proportion of workforce directly employed in tourism +## S_score: tourism sustainability score + +tr_sust_gf <- tr_sust %>% + mutate(gapfilled = ifelse(is.na(S_score) & !is.na(Ep), "gapfilled", NA)) %>% + mutate(method = ifelse(is.na(S_score) & !is.na(Ep) & is.na(pcgdp2), "lm georegion + gdppcppp, with est. gdppcppp", NA)) %>% + mutate(method = ifelse(is.na(S_score) & !is.na(Ep) & !is.na(pcgdp2), "lm georegion + gdppcppp", method)) %>% + select(rgn_id, gapfilled, method, year) + +write.csv(tr_sust_gf, here(paste0("globalprep/tr/v", version_year, "/output/tr_sustainability_gf.csv")), row.names=FALSE) + +``` + + +### Gapfilling +Linear models using gdppcppp and UN geopolitical regions as predictor variables. However if there is no gdppc data we estimate the gdppc using the UN georegions and then used in the linear model to gapfill the sustainability score. + +```{r, eval=FALSE} + +### Gapfill S using r1 and/or r2 regional data and PPP-adjusted per-capita GDP +### Looked at models with a year variable, but wasn't significant and decided to exclude + +mod3 <- lm(S_score ~ as.factor(r2_label) + gdp_all, data=tr_sust, na.action = na.exclude) +summary(mod3) +anova(mod3) + +mod4 <- lm(S_score ~ as.factor(r1_label) + gdp_all, data=tr_sust, na.action = na.exclude) +summary(mod4) +anova(mod4) + +plot(predict(mod3), tr_sust$S_score) +abline(0,1) +plot(predict(mod4), tr_sust$S_score) +abline(0,1) + + +## Estimate missing data and gapfill +# Some of the r1 levels do not have data and consequently causes a fail. This chunk of code drops these levels so an NA is returned + +# Select only r2 column +new_data <- tr_sust %>% + dplyr::select(r2_label, gdp_all) + +unique(tr_sust$r2_label) + +r2_w_data <- unique(tr_sust$r2_label[!is.na(tr_sust$S_score)]) + +new_data_r2 <- new_data %>% + mutate(r2_label = ifelse(r2_label %in% r2_w_data, r2_label, NA)) + +# Predict sustainability scores using linear model 3 (using r2 data) +tr_sust <- tr_sust %>% + dplyr::mutate(S_score_pred_r2 = predict(mod3, newdata = new_data_r2)) + + +# Select only r1 column +new_data <- tr_sust %>% + dplyr::select(r1_label, gdp_all) + +unique(tr_sust$r1_label) + +r1_w_data <- unique(tr_sust$r1_label[!is.na(tr_sust$S_score)]) + +new_data_r1 <- new_data %>% + mutate(r1_label = ifelse(r1_label %in% r1_w_data, r1_label, NA)) + +# Predict sustainability scores using linear model 4 (using r1 data) +tr_sust <- tr_sust %>% + dplyr::mutate(S_score_pred_r1 = predict(mod4, newdata = new_data_r1)) + + + +## some are missing the r1 predictions, but none of these have Ep scores, so not relevant +View(filter(tr_sust, is.na(S_score_pred_r1))) + +tr_sust <- tr_sust %>% + mutate(S_score_2 = ifelse(is.na(S_score), S_score_pred_r2, S_score)) %>% + mutate(S_score_2 = ifelse(is.na(S_score_2), S_score_pred_r1, S_score_2)) %>% + filter(year %in% c(2019, 2021)) %>% + select(rgn_id, year, S_score=S_score_2) + +summary(tr_sust) + +write_csv(tr_sust, here(paste0("globalprep/tr/v", version_year, "/output/tr_sustainability.csv"))) +``` + + +## Compare with previous year of data + +```{r, eval=FALSE} +tr_sust <- read_csv(here(paste0("globalprep/tr/v", version_year, "/output/tr_sustainability.csv"))) + +prev_year <- (as.numeric(version_year) - 1) %>% + as.character() + +compare <- tr_sust %>% + pivot_wider(names_from = year, values_from = S_score) + +# current vs previous year of data +plot(compare$"2021", compare$"2019") +abline(0, 1, col="red") +# looks good + +``` + + +# Tw: Travel warnings + + - Travel warnings were deleted from the v2020 assessment. + diff --git a/globalprep/tr/v2024/unused_R/tr_fxns.R b/globalprep/tr/v2024/unused_R/tr_fxns.R new file mode 100644 index 00000000..b727e096 --- /dev/null +++ b/globalprep/tr/v2024/unused_R/tr_fxns.R @@ -0,0 +1,238 @@ +# tr_fxns.R for Tourism & Recreation - supporting scripts for data_prep.R + + +tr_prep_data <- function(tr_data_files, reload = FALSE) { + + if(any(!file.exists(tr_data_files)) | reload == TRUE) { + cat(sprintf('Raw data will be processed into: \n %s\n', dir_int)) + cat(sprintf(' %s\n', basename(tr_data_files))) + + cat('Processing data from World Bank...\n') + source(file.path(dir_git, 'R/process_WorldBank.R'), local = TRUE) + cat('Processing data from WTTC...\n') + source(file.path(dir_git, 'R/process_WTTC.R'), local = TRUE) + cat('Processing data from World Economic Forum...\n') + source(file.path(dir_git, 'R/process_WEF.R'), local = TRUE) + # clear all data from this process + #cat(sprintf('Currently within process_WEF.R - environment = %s\n', environment())) + cat('Variables to be cleared: \n') + cat(sprintf('%s', ls())) + rm(list = ls()) + + } + cat(sprintf('Raw data has been processed; files exist in: \n %s\n', dir_int)) + cat(sprintf(' %s\n', list.files(dir_int))) +} + + +tr_prep_layers <- function(tr_layers, tr_data_files, reload = FALSE) { + ### Prep data into individual layers for toolbox ---- + ##############################################################################= + ### Separate out just the model variables and save these to v201X/data directory, + ### ready for use in the toolbox. + if(any(!file.exists(tr_layers)) | reload == TRUE) { + # * tr_unemployment.csv from World Bank data + tr_unem <- read.csv(tr_data_files[['unem']], stringsAsFactors = FALSE) %>% + select(rgn_id, year, percent) + write_csv(tr_unem, tr_layers[['unem']]) + + # * tr_jobs_total.csv from World Bank total labor force + # * rgn_id, year, count (individuals) + tr_jobs_tot <- read.csv(tr_data_files[['jobs_tot']], stringsAsFactors = FALSE) %>% + select(rgn_id, year, count) + write_csv(tr_jobs_tot, tr_layers[['jobs_tot']]) + + # * tr_sustainability.csv from WEF TTCI + # tr_sust <- read.csv(tr_data_files[['sust']], stringsAsFactors = FALSE) %>% + # select(rgn_id, score) + # write_csv(tr_sust, tr_layers[['sust']]) + + # * tr_jobs_tourism.csv from WTTC direct tourism employment and + # * tr_jobs_pct_tourism.csv from WTTC direct tourism employment percentage + tr_jobs_tour <- read.csv(tr_data_files[['jobs_tour']], stringsAsFactors = FALSE) + write_csv(tr_jobs_tour %>% + select(rgn_id, year, jobs_ct), + tr_layers[['jobs_tour']]) + write_csv(tr_jobs_tour %>% + select(rgn_id, year, jobs_pct), + tr_layers[['jobs_pct_tour']]) + } + cat(sprintf('Data layers have been processed; files exist here: \n %s\n', dir_data)) + cat(sprintf(' %s\n', list.files(dir_data))) +} + + +tr_assemble_layers <- function(tr_layers) { + tr_unem <- read.csv(tr_layers[['unem']], stringsAsFactors = FALSE) + tr_sust <- read.csv(tr_layers[['sust']], stringsAsFactors = FALSE) + tr_jobs_tour <- read.csv(tr_layers[['jobs_tour']], stringsAsFactors = FALSE) + tr_jobs_pct_tour <- read.csv(tr_layers[['jobs_pct_tour']], stringsAsFactors = FALSE) + tr_jobs_tot <- read.csv(tr_layers[['jobs_tot']], stringsAsFactors = FALSE) + + rgn_names <- read.csv('../ohi-global/eez2013/layers/rgn_global.csv', stringsAsFactors = FALSE) %>% + rename(rgn_name = label) + + rgn_names <- rgn_names %>% + left_join(data.frame(rgn_id = rep(1:max(rgn_names$rgn_id), each = 25), + year = rep(c((year_max-24):year_max), max(rgn_names$rgn_id))), + by = 'rgn_id') + ### this looks stupid but it assigns a list of years to all regions, just to + ### avoid filtering them out later. Probably a way better way to do this... + + tr_data_raw <- rgn_names %>% + full_join(tr_jobs_tour %>% + rename(Ed = jobs_ct), + by = c('rgn_id', 'year')) %>% + full_join(tr_jobs_pct_tour %>% + rename(Ep = jobs_pct) %>% + mutate(Ep = Ep/100, + Ep = ifelse(Ep > 1, NA, Ep)), + by = c('rgn_id', 'year')) %>% + full_join(tr_jobs_tot %>% + rename(L = count), + by = c('rgn_id', 'year')) %>% + full_join(tr_unem %>% + rename(U = percent) %>% + mutate(U = U/100), + by = c('rgn_id', 'year')) %>% + full_join(tr_sust %>% + rename(S_score = score), + by = 'rgn_id') %>% + filter(year <= year_max) %>% + filter(!is.na(rgn_name)) + return(tr_data_raw) +} + + +gapfill_flags <- function(data) { + ### Identify the gaps in data. '_' indicates no gap; a letter indicates a gap + ### that will force an NA result. If E term used the Ep data, then U and L are no barrier; + ### mark them with a '*'. If S_score is present, then GDP gaps don't matter; mark with '*'. + data <- data %>% + mutate(ed_gap = ifelse(is.na(Ed), 'E', '_'), + u_gap = ifelse(is.na(U), ifelse(!is.na(Ep), '*', 'U'), '_'), + s_gap = ifelse(is.na(S_score), 'S', '_'), + l_gap = ifelse(is.na(L), ifelse(!is.na(Ep), '*', 'L'), '_'), + gdp_gap = ifelse(is.na(pcgdp), ifelse(is.na(S_score), 'G', '*'), '_'), + gaps = paste(ed_gap, u_gap, s_gap, l_gap, gdp_gap, sep = '')) %>% + select(-ed_gap, -u_gap, -s_gap, -l_gap, -gdp_gap) + return(data) +} + + +gdp_gapfill <- function(data) { #data <- tr_data_raw + ### Gapfill GDP figures using CIA data to sub for missing WB data for + ### current year, so that the TTCI regression can include values. + no_gdp <- data %>% filter(is.na(pcgdp) & year == year_max & is.na(S_score)) %>% arrange(rgn_name) + # missing gdp data for the following countries (2013): + # Anguilla | Argentina | Aruba | Barbados | Bermuda | British Virgin Islands + # Cayman Islands | Cuba | East Timor | French Polynesia | Guadeloupe and Martinique | Kuwait + # Myanmar | New Caledonia | North Korea | Northern Mariana Islands and Guam | Oman | R_union + # Somalia | Syria | Taiwan | United Arab Emirates + + + gdp_r2_mean <- data %>% + group_by(r2, year) %>% + summarize(gdp_r2 = mean(pcgdp, na.rm = TRUE)) + + data1 <- data %>% + left_join(gdp_r2_mean, by = c('r2', 'year')) %>% + mutate(pcgdp = ifelse(is.na(pcgdp), gdp_r2, pcgdp)) %>% + select(-gdp_r2) + +# skip this - there are others as well; this doesn't add much value. Rely on regional averages. +# # hand-fill select values: +# gdp_reun <- 23501 # from http://www.insee.fr/fr/insee_regions/reunion/themes/dossiers/ter/ter2008_resultats_economiques.pdf +# # in 2007, not PPP +# gdp_mart <- 24118 # from: http://web.archive.org/web/20080216021351/http://prod-afd.afd.zeni.fr/jahia/webdav/site/cerom/users/admin_cerom/public/Pdf/CR2006_ma.pdf +# # in 2006, real exchange rate (PPP?) +# gdp_guad <- 21780 # from: http://www.insee.fr/fr/regions/guadeloupe/default.asp?page=publications/publications.htm +# # in 2006 dollars, not PPP. +# data1 <- data1 %>% +# mutate(pcgdp = ifelse(rgn_id == 32 & year == year_max, gdp_reun, pcgdp), +# pcgdp = ifelse(rgn_id == 140 & year == year_max, (gdp_guad+gdp_mart)/2, pcgdp), +# gaps = ifelse(rgn_id %in% c(32, 140) & year == year_max, str_replace(gaps, 'G', 'h'), gaps)) + + return(data1) +} + +s_regr_r1 <- function(data, y_max = year_max) { + ### create a regression model of S as a function of PPP-adjusted per-capita GDP, and + ### with a dummy variable correlating to r1 level georegions + s1 <- data %>% filter(year == y_max) + s1_coef <- unlist(lm(S_score ~ pcgdp + r1, data = s1)['coefficients']) + + s1_mdl <- stack(s1_coef) + colnames(s1_mdl) <- c('r1_coef', 'r1') + + s1_mdl <- s1_mdl %>% + mutate(r1_int = s1_coef[1], + r1_gdp_coef = s1_coef[2], + r1 = str_replace(r1, 'coefficients.r1', '')) # strip the prefix + data <- data %>% + left_join(s1_mdl, by = 'r1') + + # process r1 level model: + dropped_rgn <- levels(as.factor(data$r1))[1] # auto figure out which region was first in the list + data <- data %>% + mutate(r1_coef = ifelse(r1 == dropped_rgn, 0, r1_coef), + r1_mdl = r1_int + r1_gdp_coef * pcgdp + r1_coef) %>% + select(-r1_coef, -r1_gdp_coef, -r1_int) + + return(data) +} + +s_regr_r2 <- function(data, y_max = year_max) { + ### create a regression model of S as a function of PPP-adjusted per-capita GDP, and + ### with a dummy variable correlating to r2 level georegions + s2 <- data %>% filter(year == y_max) + s2_coef <- unlist(lm(S_score ~ pcgdp + r2, data = s2)['coefficients']) + + s2_mdl <- stack(s2_coef) + colnames(s2_mdl) <- c('r2_coef', 'r2') + + s2_mdl <- s2_mdl %>% + mutate(r2_int = s2_coef[1], + r2_gdp_coef = s2_coef[2], + r2 = str_replace(r2, 'coefficients.r2', '')) # strip the prefix + data <- data %>% + left_join(s2_mdl, by = 'r2') + + # process r2 level model: + dropped_rgn <- levels(as.factor(data$r2))[1] # auto figure out which region was first in the list + data <- data %>% + mutate(r2_coef = ifelse(r2 == dropped_rgn, 0, r2_coef), + r2_mdl = r2_int + r2_gdp_coef * pcgdp + r2_coef) %>% + select(-r2_coef, -r2_gdp_coef, -r2_int) + + return(data) +} + +s_gapfill_r2_r1 <- function(data, y_max = year_max) { + data <- data %>% + s_regr_r2(y_max) %>% + s_regr_r1(y_max) + + data <- data %>% + mutate(s_mdl = ifelse(!is.na(r2_mdl), r2_mdl, r1_mdl), + gaps = ifelse(is.na(S_score) & (!is.na(s_mdl)), str_replace(gaps, 'S', 'g'), gaps), + S_score = ifelse(is.na(S_score), s_mdl, S_score)) %>% + select(-r1_mdl, -r2_mdl, -s_mdl) + + return(data) +} + + +tr_calc_model <- function(data_chunk) { + ### Model modified to prefer the Ep term (percent of tourism jobs from WTTC) to determine E; + ### if Ep term is not available, calculate old way: E = Ed / (L - (L * U)) + ### Model modified to normalize S_score by the maximum value, after subtracting one. + + data_chunk <- data_chunk %>% + mutate( + E = ifelse(is.na(Ep), Ed / (L - (L * U)), Ep), + S = (S_score - 1) / (7 - 1), # scale score from 1 to 7. + Xtr = E * S ) + return(data_chunk) +} + diff --git a/globalprep/tr/v2024/unused_R/unwto_employment_gapfill_model_testing.R b/globalprep/tr/v2024/unused_R/unwto_employment_gapfill_model_testing.R new file mode 100644 index 00000000..5602d044 --- /dev/null +++ b/globalprep/tr/v2024/unused_R/unwto_employment_gapfill_model_testing.R @@ -0,0 +1,83 @@ +# v2023: THE RESULTS OF THIS CAUSED A PIVOT TO OTHER DATA OPTIONS; CODE WAS LEFT HERE IN CASE IT BECOMES RELEVANT IN FUTURE EXPLORATIONS + +library(tidyverse) +library(ohicore) + +# change paths to where your data is stored; local paths left as examples +base_path <- "put anything preceding the folder and/or file name here" +file_path_receipts_dollars <- paste0(base_path, "API_ST/API_ST.INT.RCPT.CD_DS2_en_csv_v2_5734207.csv") +file_path_receipts_percent <- paste0(base_path, "API_ST-2/API_ST.INT.RCPT.XP.ZS_DS2_en_csv_v2_5736344.csv") +file_path_arrivals <- paste0(base_path, "API_ST-3/API_ST.INT.ARVL_DS2_en_csv_v2_5728898.csv") +file_path_expenditures_passenger_items <- paste0(base_path, "API_ST-4/API_ST.INT.TRNX.CD_DS2_en_csv_v2_5736348.csv") +file_path_expenditures_dollars <- paste0(base_path, "API_ST-5/API_ST.INT.XPND.CD_DS2_en_csv_v2_5736352.csv") +file_path_receipts_passenger_items <- paste0(base_path, "API_ST-6/API_ST.INT.TRNR.CD_DS2_en_csv_v2_5736347.csv") +file_path_departures <- paste0(base_path, "API_ST-7/API_ST.INT.DPRT_DS2_en_csv_v2_5734520.csv") +file_path_receipts_travel_items <- paste0(base_path, "API_ST-8/API_ST.INT.TVLR.CD_DS2_en_csv_v2_5736345.csv") +file_path_expenditures_percent <- paste0(base_path, "API_ST-9/API_ST.INT.XPND.MP.ZS_DS2_en_csv_v2_5736355.csv") + +file_path_tr_data <- paste0(base_path, "tourism_props_geo_gf.csv") + +# source in generalized WB data processing function and use on each WB dataset +source(here(paste0("globalprep/tr/v", version_year, "/R/process_WB_generalized_fxn.R"))) +process_wb_data(file_path_receipts_dollars, "receipts_dollars", "final_receipts_dollars_df") +process_wb_data(file_path_receipts_percent, "receipts_percent", "final_receipts_percent_df") +process_wb_data(file_path_arrivals, "arrivals", "final_arrivals_df") +process_wb_data(file_path_expenditures_passenger_items, "expenditures_passenger_items", "final_expenditures_passenger_items_df") +process_wb_data(file_path_expenditures_dollars, "expenditures_dollars", "final_expenditures_dollars_df") +process_wb_data(file_path_receipts_passenger_items, "receipts_passenger_items", "final_receipts_passenger_items_df") +process_wb_data(file_path_departures, "departures", "final_departures_df") +process_wb_data(file_path_receipts_travel_items, "receipts_travel_items", "final_receipts_travel_items_df") +process_wb_data(file_path_expenditures_percent, "expenditures_percent", "final_expenditures_percent_df") + +# add each dataset to the tourism data (tourism employment to total workforce at the time of this exploration) +tr_data <- read_csv(file_path_tr_data) %>% + mutate(year = as.character(year)) %>% + left_join(final_receipts_dollars_df, by = c("year", "rgn_id")) %>% + left_join(final_receipts_percent_df, by = c("year", "rgn_id")) %>% + left_join(final_arrivals_df, by = c("year", "rgn_id")) %>% + left_join(final_expenditures_passenger_items_df, by = c("year", "rgn_id")) %>% + left_join(final_expenditures_dollars_df, by = c("year", "rgn_id")) %>% + left_join(final_receipts_passenger_items_df, by = c("year", "rgn_id")) %>% + left_join(final_departures_df, by = c("year", "rgn_id")) %>% + left_join(final_receipts_travel_items_df, by = c("year", "rgn_id")) %>% + left_join(final_expenditures_percent_df, by = c("year", "rgn_id")) %>% + select(Ep, r1_label, r2_label, receipts_dollars, receipts_percent, + arrivals, expenditures_passenger_items, expenditures_dollars, + receipts_passenger_items, departures, receipts_travel_items, + expenditures_percent) + + + +# get R-squareds and AIC for all model combos + +# get all possible combinations of predictor variables: add other relevant ones here if added more data +predictors <- c("r1_label", "r2_label", "receipts_dollars", "receipts_percent", + "arrivals", "expenditures_passenger_items", "expenditures_dollars", + "receipts_passenger_items", "departures", "receipts_travel_items", + "expenditures_percent") +all_combinations <- unlist(lapply(1:length(predictors), function(n) combn(predictors, n, simplify = FALSE)), recursive = FALSE) + +# this function fits linear models and gets R-squared and AIC values +get_model_stats <- function(predictors) { + formula <- as.formula(paste("Ep ~", paste(predictors, collapse = " + "))) + model <- lm(formula, data = tr_data) + return(c(R_squared = summary(model)$r.squared, AIC = AIC(model))) +} + +# use the function on all the combos +model_stats <- sapply(all_combinations, function(combo) get_model_stats(combo)) + +# combine into a dataframe for analysis +results <- data.frame( + Combination = sapply(all_combinations, paste, collapse = " + "), + R_squared = model_stats["R_squared", ], + AIC = model_stats["AIC", ] +) + +# order the results for highest AIC and lowest R_squared (separately) +results_AIC <- arrange(results, AIC) +results_Rsq <- arrange(results, desc(R_squared)) + +# view the results +View(results_AIC) +View(results_Rsq) \ No newline at end of file