-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.Rmd
238 lines (206 loc) · 7.98 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
---
title: "Cost Conversion Tool"
description: |
A tool designed for the international [useR!2021 conference](https://user2021.r-project.org/participation/registration-details/) that uses Purchasing Power Parity to adjust conference fees according to attendee country of residence
date: September 21, 2021
author:
- name: Silvia Canelón
url: https://silvia.rbind.io
affiliation: University of Pennsylvania
citation_url: https://spcanelon.github.io/useR2021-cost-conversion-tool
site:
distill::distill_website:
toc: true
toc_depth: 2
---
```{r setup, message=FALSE, warning=FALSE, include=FALSE}
# Learn more about creating websites with Distill at:
# https://rstudio.github.io/distill/website.html
# Learn more about publishing to GitHub Pages at:
# https://rstudio.github.io/distill/publish_website.html#github-pages
# loading packages----
pkgs = c("tidyverse", "janitor", "gt", "DT", "here", "glue")
pacman::p_load(char = pkgs, install = FALSE, update = FALSE)
# setting options----
knitr::opts_chunk$set(echo = FALSE, fig.retina = 3,
warning=FALSE, message=FALSE,
results = "hide", cache=TRUE)
options(scipen=999)
```
```{r 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"))
# May 6 2021: making exception for India given dramatic pandemic circumstances
classification_trim <-
classification_trim %>%
mutate(
income_group = case_when(
economy_name == "India" ~ "Low income",
TRUE ~ as.character(income_group)
)
)
```
```{r summary}
# produces summary and shows it a gt() table
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_ppp_summary %>% gt()
```
```{r early-bird-fees, results="hide"}
# 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) %>%
mutate(industry = industry*conversion_factor, # adjusts by the 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))
# creating gt() HTML table
cost_conversion_early_bird %>%
gt() %>%
tab_header(
title = md("Early Bird Conference Fees"),
subtitle = md("Cost Conversions by Global Income Group (US$)")
) %>%
cols_label(
income_group = "Global Income Group",
conversion_factor = "Conversion Factor",
industry = "Industry",
academia = "Academia",
student = "Student"
) %>%
fmt_currency(
columns = vars(industry, academia, student),
currency = "USD",
decimals = 0
) %>%
cols_align(
align = c("left"),
columns = c("income_group")
) %>%
cols_align(
align = c("right"),
columns = c(-"income_group")
)
```
```{r regular-fees, results = "hide"}
# 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) %>%
mutate(industry = industry*conversion_factor, # adjusts by the 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))
# creating gt() HTML table
cost_conversion_regular %>%
gt() %>%
tab_header(
title = md("Regular Conference Fees"),
subtitle = md("Cost Conversions by Global Income Group (US$)")
) %>%
cols_label(
income_group = "Global Income Group",
conversion_factor = "Conversion Factor",
industry = "Industry",
academia = "Academia",
student = "Student"
) %>%
fmt_currency(
columns = vars(industry, academia, student),
currency = "USD",
decimals = 0
) %>%
cols_align(
align = c("left"),
columns = c("income_group")
) %>%
cols_align(
align = c("right"),
columns = c(-"income_group")
)
```
Conference fees are adapted to the country you reside in. The cost conversion was done according to Gross Domestic Product (GDP) adjusted by Purchasing Power Parity (PPP) provided by the World Bank. We want conference attendees from different parts of the world to be able to participate in useR! and believe that this is a fair approach. It also reflects the fact that the share of attendees from "High income" countries is higher and thus the price per person is different. The categories are listed in the table below.
You can read more about purchasing power parities, price level indexes, and PPP-based expenditures in the May 2020 World Bank post [New results from the International Comparison Program shed light on the size of the global economy.](https://blogs.worldbank.org/opendata/new-results-international-comparison-program-shed-light-size-global-economy?token=b6827c8c6191327b728245ab1a2d8d84) and with the resources listed in the [About](about.html) page.
----
The Global Income Groups listed in the fee tables below were obtained using data from the 2017 International Comparison Program (ICP) which you can read more about in the report [Purchasing Power Parities and the Size of World Economies: Results from the 2017 International Comparison Program](https://openknowledge.worldbank.org/bitstream/handle/10986/33623/9781464815300.pdf). The conversion factors were calculated using PPP-based GDP per capita for each Global Income Group using data from the [ICP 2017 World Bank Database](https://databank.worldbank.org/source/icp-2017).
**Note:** Fees for "Low income" countries have intentionally been *waived* by useR!, reflected by a fee of `$0`.<br>
---
# Early Bird Fees
```{r, ref.label="early-bird-fees", results="show"}
```
<br>
Use the table below to search for your country and attendee status (i.e. Industry, Academia, Student). You can use the search bar, or filter according to a specific column.
```{r early-bird-chart, results = "show"}
# 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 = 10
),
colnames = c('Country/Economy', 'Region',
'Global Income Group',
'Industry', 'Academia', 'Student')) %>%
DT::formatCurrency(
c("industry", "academia", "student"),
digits = 0
)
```
---
# Regular Fees
```{r, ref.label="regular-fees", results = "show"}
```
<br>
Use the table below to search for your country and attendee status (i.e. Industry, Academia, Student). You can use the search bar, or filter according to a specific column.
```{r regular-chart, results = "show"}
# 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 = 10
),
colnames = c('Country/Economy', 'Region',
'Global Income Group',
'Industry', 'Academia', 'Student')) %>%
DT::formatCurrency(
c("industry", "academia", "student"),
digits = 0
)
```