dados = read_csv(
here::here("data/participation-per-country.csv"),
col_types = cols(
.default = col_double(),
site = col_character(),
country = col_character(),
geo = col_character(),
four_regions = col_character(),
eight_regions = col_character(),
six_regions = col_character(),
`World bank income group 2017` = col_character()
)
) %>%
filter(usuarios > 200)
glimpse(dados)
## Observations: 121
## Variables: 21
## $ site <chr> "StackOverflow", "StackOverflow",…
## $ country <chr> "Argentina", "Australia", "Austri…
## $ PDI <dbl> 49, 36, 11, 80, 65, 69, 70, 39, 6…
## $ IDV <dbl> 46, 90, 55, 20, 75, 38, 30, 80, 2…
## $ MAS <dbl> 56, 61, 79, 55, 54, 49, 40, 52, 2…
## $ UAI <dbl> 86, 51, 70, 60, 94, 76, 85, 48, 8…
## $ usuarios <dbl> 2798, 12313, 2518, 2558, 4275, 10…
## $ responderam_prop <dbl> 0.5357398, 0.6133355, 0.6310564, …
## $ perguntaram_prop <dbl> 0.5210865, 0.5897832, 0.5933280, …
## $ editaram_prop <dbl> 0.09256612, 0.14699911, 0.1493248…
## $ comentaram_prop <dbl> 0.25339528, 0.33395598, 0.3502780…
## $ GNI <dbl> NA, 59570, 48160, 840, 44990, 116…
## $ Internet <dbl> 51.0, 79.5, 79.8, 5.0, 78.0, 45.0…
## $ EPI <dbl> 59.02, NA, 63.21, NA, 61.21, 49.9…
## $ geo <chr> "arg", "aus", "aut", "bgd", "bel"…
## $ four_regions <chr> "americas", "asia", "europe", "as…
## $ eight_regions <chr> "america_south", "east_asia_pacif…
## $ six_regions <chr> "america", "east_asia_pacific", "…
## $ Latitude <dbl> -34.00000, -25.00000, 47.33333, 2…
## $ Longitude <dbl> -64.00000, 135.00000, 13.33333, 9…
## $ `World bank income group 2017` <chr> "Upper middle income", "High inco…
dados %>%
ggplot(aes(x = IDV, y = responderam_prop)) +
geom_point()

dados %>%
ggplot(aes(x = IDV, y = responderam_prop, color = site)) +
geom_point()

dados %>%
ggplot(aes(
x = IDV,
y = responderam_prop,
color = site,
size = log10(usuarios)
)) +
geom_point(alpha = .6)

dados %>%
ggplot(aes(
size = IDV,
y = responderam_prop,
color = site,
x = log10(usuarios)
)) +
geom_point(alpha = .6)

dados %>%
ggplot(aes(
x = IDV,
y = responderam_prop,
color = Internet,
size = log10(usuarios)
)) +
geom_point(alpha = .6) +
facet_grid(site ~ ., scales = "free_y")

dados %>%
ggplot(aes(
x = IDV,
y = responderam_prop,
size = Internet,
color = log10(usuarios)
)) +
geom_point(alpha = .6) +
facet_grid(site ~ ., scales = "free_y")
## Warning: Removed 3 rows containing missing values (geom_point).

so = dados %>%
filter(site == "StackOverflow") %>%
sample_n(20)
so %>%
ggplot(aes(
x = country,
color = responderam_prop,
y = ""
)) +
geom_point(size = 4) +
coord_flip()

so %>%
ggplot(aes(
x = country,
size = responderam_prop,
y = ""
)) +
geom_point(alpha = .3) +
coord_flip()

so %>%
ggplot(aes(
x = country,
y = "",
size = responderam_prop,
color = six_regions
)) +
geom_point() +
coord_flip()

so %>%
ggplot(aes(
x = country,
y = responderam_prop,
color = six_regions
)) +
geom_point(size = 3) +
coord_flip()
