Conference Fees

Creating a cost conversion table using an example of conference fees.

# loading packages----
pkgs = c("tidyverse", "here", "glue", "gt", "DT")
pacman::p_load(char = pkgs, install = FALSE, update = FALSE)

# setting options----
knitr::opts_chunk$set(echo = TRUE, fig.retina = 3, 
                      warning=FALSE, message=FALSE)
options(scipen=999)

Data import

# importing data
gdp_ppp_full <-
  read_rds(here("data-processed",
                "economy-classification-w-GDP.Rds"))

classification_trim <-
  read_rds(here("data-processed",
                "economy-classification.Rds"))

Summarizing GDP (PPP-adjusted) per income group

# produces summary
gdp_ppp_summary <-
gdp_ppp_full %>%
  na.omit(PPP_GDPCap) %>%
  group_by(income_group) %>%
  summarize(
    avg_GDP = mean(PPP_GDPCap), 
    sd_GDP = sd(PPP_GDPCap)) %>%
  mutate(norm_avg_GDP = avg_GDP/max(avg_GDP)) %>%
  arrange(desc(avg_GDP)) %>%
  mutate_if(is.numeric, round, 2)
GDP and Conversion Factor
Global Income Group Avg. GDP St. Dev. GDP Conversion Factor
High income $46,098 $21,617 1.00
Upper middle income $15,487 $4,900 0.34
Lower middle income $6,276 $3,107 0.14
Low income $1,740 $809 0.04

Adding conference fees

Early bird fees

# cost conversion
cost_conversion_early_bird <-
  gdp_ppp_summary %>%
  select(-(avg_GDP:sd_GDP)) %>%
  rename("conversion_factor"="norm_avg_GDP") %>%
  mutate(industry = 75,
         academia = 50,
         student = 25) %>%
  # adjusts by the conversion factor
  mutate(industry = industry*conversion_factor, 
         academia = academia*conversion_factor,
         student = student*conversion_factor) %>%
  mutate(industry = ifelse(income_group == "Low income",
                           0, industry),
         academia = ifelse(income_group == "Low income",
                           0, academia),
         student = ifelse(income_group == "Low income",
                           0, student))
Early Bird Conference Fees
Cost Conversions by Global Income Group (US$)
Global Income Group Conversion Factor Industry Academia Student
High income 1.00 $75 $50 $25
Upper middle income 0.34 $26 $17 $8
Lower middle income 0.14 $11 $7 $4
Low income 0.04 $0 $0 $0

Regular fees

# cost conversion
cost_conversion_regular <-
  gdp_ppp_summary %>%
  select(-(avg_GDP:sd_GDP)) %>%
  rename("conversion_factor"="norm_avg_GDP") %>%
  mutate(industry = 100,
         academia = 75,
         student = 50) %>%
  # adjusts by the conversion factor
  mutate(industry = industry*conversion_factor, 
         academia = academia*conversion_factor,
         student = student*conversion_factor) %>%
  mutate(industry = ifelse(income_group == "Low income",
                           0, industry),
         academia = ifelse(income_group == "Low income",
                           0, academia),
         student = ifelse(income_group == "Low income",
                           0, student))
Regular Conference Fees
Cost Conversions by Global Income Group (US$)
Global Income Group Conversion Factor Industry Academia Student
High income 1.00 $100 $75 $50
Upper middle income 0.34 $34 $26 $17
Lower middle income 0.14 $14 $11 $7
Low income 0.04 $0 $0 $0

Cost conversion charts

Early bird fees

Prices listed are in USD

# creating DT table
classification_trim %>%
  left_join(cost_conversion_early_bird) %>%
  mutate_at(vars(conversion_factor:student), factor) %>%
  select(-conversion_factor, -economy_code) %>%
  DT::datatable(
    filter = 'top',
    options = list(
      pageLength = 5),
    colnames = c('Country/Economy', 'Region', 
                 'Global Income Group',
                 'Industry', 'Academia', 'Student')) %>%
  DT::formatCurrency(c("industry", "academia", "student"),
                     digits = 0)

Regular fees

# creating DT table
classification_trim %>%
  left_join(cost_conversion_regular) %>%
  mutate_at(vars(conversion_factor:student), factor) %>%
  select(-conversion_factor, -economy_code) %>%
  DT::datatable(
    filter = 'top',
    options = list(
      pageLength = 5),
    colnames = c('Country/Economy', 'Region', 
                 'Global Income Group',
                 'Industry', 'Academia', 'Student')) %>%
  DT::formatCurrency(c("industry", "academia", "student"),
                     digits = 0)

Corrections

If you see mistakes or want to suggest changes, please create an issue on the source repository.

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY-SA 4.0. Source code is available at https://github.com/spcanelon/useR2021-cost-conversion-tool, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".