Introducción y objetivos

Este estudio está basado en las encuestas de usuario realizadas por la plataforma de kaggle respecto al aprendizaje mecánico y análisis de datos proporcionado por la organización . Este estudio se limita a estudiar los reportes enviados por africanos o “Afrikagglers”, y tiene como propósito comparar dichos datos con información procedente del resto del mundo.

# Importando las librerías correspondientes
library(tidyverse)
library(grid)
library(gridExtra)
library(ggforce)
library(readr)

Para la investigación se tomaran las siguientes fuentes de información:

# Procesamiento y clasificación de datos 
# Países
multipleChoice18$Q3 <- str_replace(multipleChoice18$Q3,"Iran, Islamic Republic of...","Iran")
multipleChoice18$Q3 <- str_replace(multipleChoice18$Q3,"I do not wish to disclose my location","Won't disclose")
multipleChoice18$Q3 <- str_replace(multipleChoice18$Q3,"United Kingdom of Great Britain and Northern Ireland","UK and NI")
multipleChoice18$Q3 <- str_replace(multipleChoice18$Q3,"United States of America","USA")

continents$Country <- str_replace(continents$Country,"Iran, Islamic Republic of...","Iran")
continents$Country <- str_replace(continents$Country,"I do not wish to disclose my location","Won't disclose")
continents$Country <- str_replace(continents$Country,"United Kingdom of Great Britain and Northern Ireland","UK and NI")
continents$Country <- str_replace(continents$Country,"United States of America","USA")

# Convirtiendo datos categóricos a factores
# grupos de edades
multipleChoice18$Q2 <- factor(multipleChoice18$Q2,
                              levels = c("18-21","22-24","25-29",
                                        "30-34","35-39","40-44",
                                        "45-49","50-54","55-59",
                                        "60-69","70-79","80+"), 
                           labels = c("18-21","22-24","25-29",
                                      "30-34","35-39","40-44",
                                      "45-49","50-54","55-59",
                                      "60-69","70-79","80+"))

# título académico
multipleChoice18$Q4 <- factor(multipleChoice18$Q4,
                              levels = c("Doctoral degree","Master’s degree","Bachelor’s degree","Professional degree",
                                         "No formal education past high school",
                                         "Some college/university study without earning a bachelor’s degree",
                                         "I prefer not to answer"), 
                           labels = c("PhD","Master","Bachelor","Professional",
                                         "High school","No degree","Won't disclose"))

# especialización universitaria
multipleChoice18$Q5 <- factor(multipleChoice18$Q5, 
                               levels = c("Medical or life sciences (biology, chemistry, medicine, etc.)",
                                          "Computer science (software engineering, etc.)",
                                          "Engineering (non-computer focused)",
                                          "Mathematics or statistics",
                                          "A business discipline (accounting, economics, finance, etc.)",
                                          "Environmental science or geology",
                                          "Social sciences (anthropology, psychology, sociology, etc.)",
                                          "Physics or astronomy",
                                          "Information technology, networking, or system administration",
                                          "I never declared a major",
                                          "Other",
                                          "Humanities (history, literature, philosophy, etc.)") ,
                               labels = c("Medical/life sciences", "Computer science",
                                          "Engineering", "Mathematics/statistics",
                                          "A business discipline", "Physics/astronomy",
                                          "IT/Network/Sys. admin", "No major declared",
                                          "Humanities", "Env. science", "Social sciences", "Other"))

# ¿En qué sector trabaja actualmente?
multipleChoice18$Q7 <- factor(multipleChoice18$Q7,
                              levels = c("Retail/Sales", "I am a student", 
                                         "Computers/Technology", "Accounting/Finance",
                                         "Academics/Education", 
                                         "Insurance/Risk Assessment","Other",
                                         "Energy/Mining", "Non-profit/Service",
                                         "Marketing/CRM", "Government/Public Service",
                                         "Manufacturing/Fabrication", 
                                         "Online Service/Internet-based Services",
                                         "Broadcasting/Communications",
                                         "Medical/Pharmaceutical",
                                         "Online Business/Internet-based Sales",
                                         "Military/Security/Defense",
                                         "Shipping/Transportation",
                                         "Hospitality/Entertainment/Sports"),
                              labels = c("Retail / Sales", "Student", 
                                         "Computers / Technology", "Accounting / Finance",
                                         "Academics / Education", 
                                         "Insurance / Risk Assessment","Other",
                                         "Energy / Mining", "Non-profit / Service",
                                         "Marketing / CRM", "Government / Public Service",
                                         "Manufacturing / Fabrication", 
                                         "Online Service / Internet-based Services",
                                         "Broadcasting / Communications",
                                         "Medical / Pharmaceutical",
                                         "Online Business / Internet-based Sales",
                                         "Military / Security/Defense",
                                         "Shipping / Transportation",
                                         "Hospitality / Entertainment/Sports"))

# Experiencia del puesto de trabajo
multipleChoice18$Q8 <- factor(multipleChoice18$Q8, levels = c("0-1","1-2","2-3",
                                                   "3-4","4-5","5-10",
                                                   "10-15","15-20","20-25",
                                                   "25-30","30+"))

# Compensación anual
multipleChoice18$Q9 <- factor(multipleChoice18$Q9, 
                         levels = c("I do not wish to disclose my approximate yearly compensation",
                                   "0-10,000","10-20,000","20-30,000","30-40,000",
                                   "40-50,000","50-60,000","60-70,000","70-80,000",
                                   "80-90,000","90-100,000","100-125,000",
                                   "125-150,000","150-200,000","200-250,000",
                                   "250-300,000","300-400,000", "400-500,000","500,000+"),
                         labels = c("Won't disclose",
                                   "0-10,000","10-20,000","20-30,000","30-40,000",
                                   "40-50,000","50-60,000","60-70,000","70-80,000",
                                   "80-90,000","90-100,000","100-125,000",
                                   "125-150,000","150-200,000","200-250,000",
                                   "250-300,000","300-400,000", "400-500,000","500,000+"))

# Tiempo dedicado a programar
multipleChoice18$Q23 <- factor(multipleChoice18$Q23, levels = c("0% of my time",
                                                                "1% to 25% of my time",
                                                                "25% to 49% of my time",
                                                                "50% to 74% of my time",
                                                                "75% to 99% of my time",
                                                                "100% of my time"), 
                               labels = c("0%","1% to 25%","25% to 49%",
                                          "50% to 74%","75% to 99%","100%"))
# Experiencia programando
multipleChoice18$Q24 <- factor(multipleChoice18$Q24, 
                               levels = c("I have never written code and I do not want to learn",
                                          "I have never written code but I want to learn",
                                          "< 1 year","1-2 years","3-5 years","5-10 years",
                                          "10-20 years","20-30 years","30-40 years", "40+ years") ,
                               labels = c("I don't write code and don't want to learn",
                                         "I don't write code but want to learn",
                                        "< 1 year", "1-2 years", "3-5 years", 
                                       "5-10 years", "10-20 years","20-30 years","30-40 years", "40+ years")
)

# ¿Durante cuántos años ha utilizado métodos de aprendizaje automático o mecánico?
multipleChoice18$Q25 <- factor(multipleChoice18$Q25,
                               levels = c("I have never studied machine learning and I do not plan to", 
                                          "I have never studied machine learning but plan to learn in the future",
                               "< 1 year", "1-2 years", "2-3 years", "3-4 years", "4-5 years", 
                               "5-10 years", "10-15 years", "20+ years"),
                               labels = c("Never studied, do not plan to", 
                                          "Never studied, plan to learn",
                               "< 1 year", "1-2 years", "2-3 years", "3-4 years", "4-5 years", 
                               "5-10 years", "10-15 years", "20+ years"))

# Uso del aprendizaje automático en las industrias
multipleChoice18$Q10 <- factor(multipleChoice18$Q10,
                               levels = c("I do not know",
                                          "No (we do not use ML methods)",
                                          "We are exploring ML methods (and may one day put a model into production)",
                                          
                                          "We recently started using ML methods (i.e., models in production for less than 2 years)",
                                          "We have well established ML methods (i.e., models in production for more than 2 years)",
                                          "We use ML methods for generating insights (but do not put working models into production)"),
                               labels = c("I do not know", "No", "Exploring ML methods",
                                          "Recently started", "Well established ML methods", 
                                          "For generating insights"))
# Conocimientos en ciencia de datos
multipleChoice18$Q40 <- factor(multipleChoice18$Q40, 
                            levels = c("Independent projects are equally important as academic achievements",
                                       "Independent projects are much more important than academic achievements",
                                       "Independent projects are slightly more important than academic achievements",
                                       "Independent projects are slightly less important than academic achievements",
                                       "Independent projects are much less important than academic achievements",
                                       "No opinion; I do not know"),
                            labels = c("Equally important",
                                       "Much more important",
                                       "Slightly more important",
                                       "Less important",
                                       "Much less important",
                                       "No opinion/Don't know"))


# ¿Es usted un científico de datos?
multipleChoice18$Q26 <- factor(multipleChoice18$Q26, 
                               levels = c("Definitely yes", "Probably yes", "Maybe", 
                                          "Probably not", "Definitely not"), 
                               labels = c("Definitely yes", "Probably yes", "Maybe", 
                                          "Probably not", "Definitely not"))

¿Quienes somos?

Hay un total de 57 países registrados en la encuesta. Los países con menos de 50 encuestados fueron agrupados en un grupo llamado “Other Category” debido a que individualmente resultan insignificantes para el estudio debido a su población, sin embargo, al agruparse dicha población aumenta y permite una categorización mucho más afin al análisis.

De los países encuestados, 6 de ellos son del continente Africano. En términos de numero total de participantes, representan una cantidad de 681 individuos o 2.85% del total de participantes. Aunque este valor es bajo logra ubicar al continente de África en la quinta posición respecto a los continentes con mayor número de usuarios.

newMultipleChoice %>%
  group_by(Continent) %>%
  summarise(Count = length(Continent)) %>%
  mutate(highlight_flag = ifelse((Continent == "Africa"), T, F)) %>%
  ggplot(aes(x = reorder(Continent,-Count), y = Count, fill = Continent)) +
  geom_bar(aes(fill = highlight_flag), stat = "identity", color = "grey") +
  geom_text(aes(label =as.character(Count)), 
            position = position_dodge(width = 1), 
            hjust = 0.5, vjust = -0.25, size = 3) +
  scale_fill_brewer(palette = "PuBu") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5))+
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 12),
        axis.text.y = element_text(size = 12), 
        legend.position = "none",
        legend.text = element_text(size = 11)) + 
  labs(title = "Number of respondents", 
       x = "", y = "Count", fill = "",
       caption = "África y el mundo")

La anterior corresponde a una lista con la cantidad de encuestados respecto a cada continente. Asia encabeza la lista con más de 9000 encuestados.

p1 <- df %>%
  group_by(Country,Year) %>%
  summarise(Count = length(Country)) %>%
  ggplot(aes(x = Year, y = Count, group = Country)) +
  geom_line(aes(color = Country), size = 0.5) +
  geom_point(aes(color = Country), size = 4) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        plot.subtitle = element_text(hjust = 0.5),
        axis.text = element_text(size = 12), 
        legend.position = "bottom",
        legend.title=element_blank(),
        legend.text = element_text(size = 10)) +
  labs(title = "Number of respondents",
       x = "", y = "Count", fill = "", caption = "")

p2 <- afroCountries %>% 
  group_by(Q1,Q3) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  summarise(Count = length(Q3)) %>%
  ggplot(aes(x = reorder(Q3,-Count), y = Count, fill = Q1)) +
  geom_bar(stat = "identity") +
  scale_fill_brewer(palette = "Paired") + 
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text = element_text(size = 12), 
        axis.text.x = element_text(angle = -90, hjust = 0, vjust = 0.5),
        legend.position = "top",
        legend.text = element_text(size = 10)) +
  labs(title = "Country of residence", x = "", y = "", fill = "",
       caption = "About us")

grid.arrange(p1,p2, ncol = 2)

Aumento de usuarios

La primera de estas gráficas ubicada en la parte izquierda corresponde al incremento de usuarios de kaggle en África desde 2017 hasta 2018. A simple vista se puede observar el ascenso significativo de usuarios en Nigeria, junto a la adición de nuevos países como Morocco y Tunisia.

Género

La segunda de estas gráficas ubicada a la derecha corresponde a la clasificación por género de los usuarios Africanos. Se puede observar que el número de mujeres es bastante bajo respecto a la cantidad de hombres. Esto último no es sorpresa, ya que sucede en todos los países.

multipleChoice18 %>%
  group_by(Q1,Q3) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  filter(!is.na(Q3)) %>%
  summarise(Count = n()) %>%
  spread(Q1,Count) %>%
  mutate(ratio = Female/Male) %>%
  mutate(highlight_flag = ifelse((Q3 == "Egypt" | Q3 == "Kenya" | Q3 == "Morocco" |
                                   Q3 == "Nigeria" | Q3 == "Tunisia" | Q3 == "South Africa"), T, F)) %>%
  ggplot(aes(x = reorder(Q3,-ratio), y = ratio, fill = ratio)) +
  geom_bar(aes(fill = highlight_flag), stat = "identity") +
  scale_fill_brewer(palette = "Paired") +
  theme(legend.position = "none",
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.y = element_text(size = 11),
        axis.text.x = element_text(size = 9.5, angle = -90,
                                   hjust = 0 , vjust = 0.5)) +  
  labs(title = "Female to Male ratio", 
       x = "", y = "Ratio", fill = "",
       caption = "About us")

Para procesar estos datos se recurre a un cociente, el cuál mide el porcentaje de mujeres Africanas. Se encontró que Nigeria tiene el cociente más bajo en África a pesar de tener el mayor número de encuestados. También se encontró que al compararlo con el resto de continentes África tiene el segundo lugar respecto al porcentaje de mujeres.

newMultipleChoice %>%
  group_by(Continent,Q1) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  summarise(Count = n()) %>%
  spread(Q1,Count) %>%
  mutate(ratio = Female/Male) %>%
  mutate(highlight_flag = ifelse((Continent == "Africa"), T, F)) %>%
  ggplot(aes(x = reorder(Continent,-ratio), y = ratio, fill = ratio)) +
  geom_bar(aes(fill = highlight_flag), stat = "identity", color = "grey") +
  scale_fill_brewer(palette = "PuBu") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5))+
  theme(legend.position = "none",
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.y = element_text(size = 12),
        axis.text.x = element_text(size = 12)) +  
  labs(title = "Female to Male ratio", 
       x = "", y = "Ratio", fill = "",
       caption = "Africa and the world")

Distribución de edades

Más de la mitad de los encuestados tienen entre 22 y 29 años, y no hay ningún encuestado mayor de 69 años. Los hombres tienen mayoritariamente entre 22 y 24 años, a diferencia de la distribución general por edades, en la que se sitúan mayoritariamente en el grupo de 25 a 29 años. Las mujeres están mayoritariamente en el grupo de edad de 25 a 29 años, al igual que la mayoría de las mujeres en todos los países.

Tampoco hay mujeres en algunos grupos de edad.

ggplot(data = temp, 
       aes(x = Q2, fill = Q1)) +
  geom_bar(data = filter(temp, Q1 == "Male"), aes(y = Count), stat = "identity") +
  geom_bar(data = filter(temp, Q1 == "Female"), aes(y = -1*Count), stat = "identity") +
  scale_y_continuous(breaks = seq(-50,150,50), 
                     labels = as.character(c(seq(50,0,-50), seq(50,150,50)))) + 
  scale_fill_brewer(palette = "Paired") +
  coord_flip() +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text =   element_text(size = 12),
        legend.position = "top",
        legend.text = element_text(size = 11)) + 
  labs(title = "Age distribution in Africa", 
       x = "Age group (years)", y = "Count", fill = "", 
       caption = "")

Aproximadamente el 75% de los Afrikragglers tienen una edad menor a 29 años

Formación académica

África es el único continente donde el bachillerato es la titulación más obtenida. En todos los demás continentes, el título de Máster es el más extendido, especialmente en Europa, donde el de Doctorado es también el más elevado. Si nos fijamos bien en África, el porcentaje de mujeres que obtienen un máster o un doctorado es superior al de los hombres.

p1 <- newMultipleChoice %>%
  group_by(Continent,Q4) %>%
  filter(!is.na(Q4)) %>%
  summarise(Count = length(Continent)) %>%
  mutate(pct = round(prop.table(Count)*100,2)) %>%
  ggplot(aes(x = Q4, y = pct, group = Continent)) +
  geom_line(aes(color = Continent), size = 0.5) +
  geom_point(aes(color = Continent), size = 2) +
  scale_x_discrete(labels = function(x) str_wrap(x,width = 5)) +
  scale_y_discrete(labels = function(x) str_wrap(x, width = 30))+
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text = element_text(size = 12),
        axis.text.x = element_text(angle = -90, hjust = 0, vjust = 0.5),
        legend.position = "top",
        legend.title = element_blank(),
        legend.text = element_text(size = 11)) +
  labs(title = "Educational background", 
       x = "", y = "%", fill = "",
       caption = "")

p2 <- afroCountries %>%
  group_by(Q1,Q4) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  filter(!is.na(Q4)) %>%
  summarise(Count = length(Q4)) %>%
  mutate(pct = round(prop.table(Count)*100,2)) %>%
  ggplot(aes(x = "", y = pct, fill = Q4)) +
  geom_col(width = 1) + 
  scale_fill_brewer(palette = "Set3") + 
  facet_grid(Q1~.) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text = element_text(size = 12), 
        legend.text = element_text(size = 11)) +
  labs(title = "Degree", 
       x = "", y = "", fill = "Degree",
       caption = "About us")

grid.arrange(p1,p2,ncol = 2)

Licenciatura

La licenciatura más popular de los Kagglers es Informática. Las otras dos carreras son Matemáticas/Estadística e Ingeniería.

Alrededor del 25% de los encuestados son estudiantes. A continuación, los puestos más representados son los de científico de datos, analista de datos e ingeniero de software.

newMultipleChoice %>%
  group_by(Continent,Q5) %>%
  filter(!is.na(Q5)) %>%
  summarise(Count = length(Q5)) %>%
  mutate(pct = round(prop.table(Count)*100,2)) %>%
  ggplot() + 
  geom_point(mapping = aes(x = Continent, y = reorder(Q5,pct), 
                           size = pct, color = Q5)) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  scale_x_discrete(labels = function(x) str_wrap(x,width = 5)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.y = element_text(size = 11), 
        axis.text.x = element_text(size = 12),
        legend.position = "none",
        legend.text = element_text(size = 11)) +
  labs(title = "Undergraduate major", 
       x = "", y = "", fill = "",
       caption = "Africa and the world")

En África, el porcentaje de mujeres encuestadas con formación en Informática es superior al de los hombres. Lo mismo ocurre con Matemáticas/Estadística. Así que, ¡buen trabajo, chicas!

También es mayor el porcentaje de hombres que no han declarado ninguna especialidad. Esto puede deberse a que algunos de ellos “no tienen título”.

afroCountries %>% 
  group_by(Q1,Q6) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  filter(!is.na(Q6)) %>%
  summarise(Count = length(Q6)) %>%
  mutate(pct = round(prop.table(Count)*100,2)) %>%
  ggplot(aes(x = reorder(Q6,-pct), y = pct, group = Q1)) +
  geom_point(aes(color = Q1), size = 2) + geom_line(aes(color = Q1), size = 1) +
  scale_x_discrete(labels = function(x) str_wrap(x,width = 10)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.y = element_text(size = 12), 
        axis.text.x = element_text(size = 11, angle = -90, 
                                   hjust = 0, vjust = 0.5),
        legend.position = "top",
        legend.title = element_blank(),
        legend.text = element_text(size = 11)) +
  labs(title = "Current role", x = "", y = "%", fill = "",
       caption = "About us")

Experiencia profesional

África y Asia tienen la mayor proporción de estudiantes. En Europa, Norteamérica y Sudamérica, la mayor proporción de encuestados trabaja en ciencia de datos.

newMultipleChoice %>%
  group_by(Continent,Q6) %>%
  filter(!is.na(Q6)) %>%
  summarise(Count = length(Continent)) %>%
  mutate(pct = round(prop.table(Count)*100,2)) %>%
  ggplot() + 
  geom_point(mapping = aes(x = Continent, y = reorder(Q6,pct), 
                           size = 5*pct, color = Q6)) +
  scale_x_discrete(labels = function(x) str_wrap(x,width = 8)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text = element_text(size = 12),
        axis.text.y = element_text(size = 10),
        legend.position = "none",
        legend.text = element_text(size = 11)) +
  labs(title = "Current role", 
       x = "", y = "", fill = "",
       caption = "Africa and the world")

Alrededor del 25% de los encuestados son estudiantes.A continuación, los puestos más representados son los de científico de datos, analista de datos e ingeniero de software.

afroCountries %>% 
  group_by(Q1,Q6) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  filter(!is.na(Q6)) %>%
  summarise(Count = length(Q6)) %>%
  mutate(pct = round(prop.table(Count)*100,2)) %>%
  ggplot(aes(x = reorder(Q6,-pct), y = pct, group = Q1)) +
  geom_point(aes(color = Q1), size = 2) + geom_line(aes(color = Q1), size = 1) +
  scale_x_discrete(labels = function(x) str_wrap(x,width = 10)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.y = element_text(size = 12), 
        axis.text.x = element_text(size = 11, angle = -90, 
                                   hjust = 0, vjust = 0.5),
        legend.position = "top",
        legend.title = element_blank(),
        legend.text = element_text(size = 11)) +
  labs(title = "Current role", x = "", y = "%", fill = "",
       caption = "About us")

En este gráfico se puede ver que el porcentaje de estudiantes varones es mayor que el de mujeres.También podemos ver que las mujeres sufren menos el desempleo.

La mayoría de los periodistas de datos proceden de Túnez y Nigeria. La mayoría de los científicos de datos se encuentran en Sudáfrica.

afroCountries %>%
  group_by(Q6,Q3) %>% 
  filter(!is.na(Q6)) %>%
  summarise(Count = length(Q6)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = Q6, y = Q3, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        axis.text.x = element_text(size = 12, angle = -90, hjust = 0, vjust = 0.5),
        axis.text.y = element_text(size = 12), 
        legend.text = element_text(size = 11)) + 
  labs(title = "Current role by country", 
       x = "", y = "", fill = "",
       caption = "About us")

También me gustaría investigar el origen del aumento de encuestados africanos del año pasado a este.

Supuse que todo procedía de estudiantes, ya que las mujeres que respondieron a la encuesta de 2017 eran exclusivamente estudiantes. Sin embargo, tras trazar un gráfico circular de participantes estudiantes frente a no estudiantes, parece que el porcentaje de estudiantes ha disminuido este año para ambos sexos. Ahora es inferior al de todas las demás ocupaciones combinadas.

propStud17 <- afroCountries17 %>%
  group_by(GenderSelect,StudentStatus) %>%
  filter(GenderSelect == "Female" | GenderSelect == "Male") %>%
  filter(!is.na(StudentStatus)) %>%
  summarise(Count = length(StudentStatus)) %>%
  mutate(pct = round(prop.table(Count)*100,2)) %>%
  ggplot(aes(x = "", y = pct, fill = StudentStatus)) + 
  geom_col(width = 1) +
  coord_polar("y", start = pi / 3) +
  scale_fill_brewer(palette = "Paired") +
  facet_wrap(GenderSelect~.) +
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        plot.subtitle = element_text(hjust = 0.5),
        legend.position = "top") +
  labs(title = "Proportion of students", subtitle = "2017", x = "", y = "", fill = "",
       caption = "")


propStud <- propStud18 %>%
  group_by(Q1,Q6) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  filter(!is.na(Q6)) %>%
  summarise(Count = length(Q6)) %>%
  mutate(pct = round(prop.table(Count)*100,2)) %>%
  ggplot(aes(x = "", y = pct, fill = Q6)) +
  geom_col(width = 1) +
  coord_polar("y", start = pi / 3) +
  scale_fill_brewer(palette = "Paired") +
  facet_wrap(Q1~.) +
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        plot.subtitle = element_text(hjust = 0.5),
        legend.position = "top") +
  labs(title = "Proportion of students", subtitle = "2018", x = "", y = "", fill = "",
       caption = "About us")

grid.arrange(propStud17,propStud, ncol = 2)

Esto significa una cosa: Los profesionales están adoptando la vida de la ciencia de datos.

El aumento procede esencialmente de los científicos de datos, los analistas de datos y los ingenieros de software.

# 2017
p1 <- afroCountries17 %>%
  group_by(CurrentJobTitleSelect) %>%
  filter(!is.na(CurrentJobTitleSelect)) %>%
  summarise(Count = length(CurrentJobTitleSelect)) %>%
  ggplot(aes(x = reorder(CurrentJobTitleSelect, Count), y = Count, fill = CurrentJobTitleSelect)) +
  geom_col() +
  coord_flip() + 
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        plot.subtitle = element_text(hjust = 0.5),
        axis.text.y = element_text(size = 8),
        axis.text.x = element_text(size = 11),
        legend.position = "none") +
  labs(title = "Current role", subtitle = "2017", x = "", y = "Count", fill = "",
       caption = "")

# 2018
p2 <- afroCountries %>% 
  group_by(Q6) %>%
  filter(Q6 != "Student") %>%
  filter(!is.na(Q6)) %>%
  summarise(Count = length(Q6)) %>%
  ggplot(aes(x = reorder(Q6, Count), y = Count, fill = Q6)) + 
  geom_col() +
  coord_flip()+
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        plot.subtitle = element_text(hjust = 0.5),
        axis.text.y = element_text(size = 8),
        axis.text.x = element_text(size = 11),
        legend.position = "none") +
  labs(title = "Current role", subtitle = "2018", x = "", y = "Count", fill = "",
       caption = "About us") 

grid.arrange(p1,p2, ncol = 2)

Experiencia en el puesto actual

La mayoría tiene menos de un año de experiencia, lo que no es sorprendente. Excepto en el caso de cinco puestos (consultor, director, gestor de proyectos, investigador científico y comercial), la mayoría (más del 50%) de los encuestados que trabajan en cada categoría tienen menos de tres años. Los científicos de datos, los periodistas de datos y los analistas de datos, en particular, tienen en su mayoría menos de un año de experiencia.

Dada la distribución por edades de los encuestados, esto era de esperar. La mayoría son jóvenes profesionales.

afroCountries %>%
  group_by(Q6,Q8) %>%
  filter(!is.na(Q6)) %>%
  filter(!is.na(Q8)) %>%
  summarise(Count = length(Q8)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = Q8, y = Q6, fill = Count)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), color = "white", size = 3) +
  theme(legend.position = "none", 
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11,
                                   hjust = 0, vjust = 0.5),
        axis.text.y = element_text(size = 9), 
        legend.text = element_text(size = 11)) +
  labs(title = "Experience in current role", 
       x = "Years", y = "", fill = "",
       caption = "About us")

Uso del aprendizaje automático en la industria

La mayoría de los estudiantes no conocen el aprendizaje automático en sus escuelas. Aunque la mayoría de las industrias no implementan métodos de aprendizaje automático, hay algunas que están empezando y están explorando métodos de aprendizaje automático.

afroCountries %>%
  group_by(Q6,Q10) %>%
  filter(!is.na(Q10)) %>%
  summarise(Count = length(Q10)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = Q10, y = Q6, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), 
            hjust = 0.5,vjust = 0.5, size = 3, color = "white") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11), 
        axis.text.y = element_text(size = 10),
        legend.position = "none",
        legend.text = element_text(size = 11)) + 
  labs(title = "Use of ML in industries", 
       x = "", y = "", fill = "",
       caption = "Machine learning usage")

Actividades en el trabajo

The majority analyze and understand data to influence product or business decisions. Most of them also perform each of the task at some point, some much more than the others:

  • Research assistants and scientists do more research than the others.

  • Database and data engineers build and run data infrastructures.

  • Salespersons and Data journalists do none of these tasks.

afroCountries %>% 
  select(Q6,Q11_Part_1,Q11_Part_2, Q11_Part_3,Q11_Part_4,Q11_Part_5,Q11_Part_6,Q11_Part_7)%>%
  gather(2:8, key = "questions", value = "Function")%>%
  group_by(Q6,Function)%>%
  filter(!is.na(Function))%>%
  summarise(Count = length(Function))%>%
  mutate(pct =  prop.table(Count)*100)%>%
  ggplot(aes(x = Function, y = Q6, fill = pct)) + 
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), 
            hjust = 0.5,vjust = 0.5, size = 3, color = "white") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 9),
        axis.text.y = element_text(size = 9), 
        legend.position = "none") + 
  labs(title = "Day to day function", 
       x = "", y = "", fill = "",
       caption = "Machine learning use")

Experiencia programando

¿Desde hace cuanto tiempo programas para analizar datos?

En primer lugar, no hay nadie que no escriba código que no quiera aprender, así que ¡yay! La mayoría lleva menos de 5 años codificando, especialmente las mujeres. La mayoría están empezando y tienen 1-2 años de experiencia.

p1 <- afroCountries %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  group_by(Q1,Q24) %>%
  filter(!is.na(Q24)) %>%
  summarise(Count = length(Q24)) %>%
  ggplot(aes(x = Q24, y = Count, fill = Q1)) +
  geom_col() + 
  scale_fill_brewer(palette = "Paired") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text = element_text(size = 12), 
        axis.text.x = element_text(size = 10, angle = -90,hjust = 0,vjust = 0.5),
        legend.position = "top",
        legend.text = element_text(size = 11)) + 
  labs(title = "Coding experience", 
       x = "", y = "Count", fill = "")

p2 <- afroCountries %>%
  group_by(Q3,Q24) %>%
  filter(!is.na(Q3)) %>%
  filter(!is.na(Q24)) %>%
  summarise(Count = length(Q24)) %>%
  mutate(pct = round(prop.table(Count)*100,2)) %>%
  ggplot(aes(x = Q24, y = pct, group = Q3)) +
  geom_point(aes(color = Q3), size = 1.5) + geom_line(aes(color = Q3), size = 0.5) +
  scale_fill_brewer(palette = "Set3") +
  scale_x_discrete(labels = function(x) str_wrap(x,width = 15)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.y = element_text(size = 11), 
        axis.text.x = element_text(size = 10, angle = -90,hjust = 0,vjust = 0.5),
        legend.position = "top",
        legend.title = element_blank(),
        legend.text = element_text(size = 11)) +
  labs(title = "Coding experience by country", 
       x = "", y = "%", fill = "",
       caption = "About us")

grid.arrange(p1,p2,ncol = 2)

Los ingenieros de datos tienen el mayor porcentaje de experiencia en codificación, con 5-10 años. La mayoría de los científicos de investigación tienen entre 3 y 5 años de experiencia en codificación.

afroCountries %>%
  group_by(Q6,Q24) %>%
  filter(!is.na(Q24)) %>%
  summarise(Count = length(Q24)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = Q24, y = Q6, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15)) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), color = "white", size = 3.5) + 
  theme(legend.position = "none", 
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = -90,
                                   hjust = 0, vjust = 0.5),
        axis.text.y = element_text(size = 9), 
        legend.text = element_text(size = 11)) +
  labs(title = "Coding experience", x = "", y = "",
       caption = "Coding experience")

Lenguajes de programación

Lenguajes de programación más usados

El lenguaje de programación más utilizado por los encuestados depende en gran medida de su puesto actual. Hay un claro dominio de Python, pero la mayoría de los estadísticos entre los encuestados utilizan sobre todo R. Los ingenieros de bases de datos que prefieren SQL. Tiene sentido, cada uno elige lo que mejor se adapta a su trabajo.

afroCountries %>%
  group_by(Q6,Q17) %>%
  filter(!is.na(Q17)) %>%
  summarise(Count = length(Q17)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = reorder(Q17,-pct), y = Q6, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15)) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), color = "white", size = 3) + 
  theme(legend.position = "none", 
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = 45, hjust = 1), 
        axis.text.y = element_text(size = 9), 
        legend.text = element_text(size = 11)) +
  labs(title = "Most used programming language", x = "", y = "",
       caption = "Coding experience")

Todo el mundo recomienda Python a una persona nueva que aspira a ser un científico de datos.

afroCountries %>%
  group_by(Q6,Q18) %>%
  filter(!is.na(Q18)) %>%
  summarise(Count = length(Q18)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = reorder(Q18,-pct), y = Q6, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15)) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), color = "white", size = 3) + 
  theme(legend.position = "none", 
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11), 
        axis.text.y = element_text(size = 9), 
        legend.text = element_text(size = 11)) +
  labs(title = "Recommended programming language", x = "", y = "",
       caption = "Coding experience")

Incluso quienes utilizan habitualmente otro lenguaje para analizar datos recomiendan aprender primero Python. Pero aún así, algunos usuarios fieles de R recomiendan R.

afroCountries %>%
  group_by(Q17,Q18) %>%
  filter(!is.na(Q17)) %>%
  filter(!is.na(Q18)) %>%
  summarise(Count = length(Q17)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = reorder(Q17,pct), y = Q18, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 20))+
  geom_text(aes(label = as.character(Count)), color = "white", size = 3) + 
  theme(legend.position = "none",
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text = element_text(size = 11),
        axis.text.x = element_text(angle = 35, hjust = 1),
        legend.text = element_text(size = 11)) + 
  labs(title = "Most used vs. Recommended programming languages", 
       x = "Most used", y = "Recommended",
       caption = "Coding experience")

Tiempo dedicado a programar activamente

“La práctica hace al maestro”. Los hombres dedican más tiempo a la programación que las mujeres. Parcelas anteriores han demostrado que los hombres tienen mucha más experiencia en codificación que las mujeres, así que tiene sentido. Las mujeres aún están aprendiendo. Esto también significa que cuanto más sabes escribir código, más tiempo dedicas a hacerlo.

afroCountries %>%
  group_by(Q1,Q23) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  filter(!is.na(Q23)) %>%
  summarise(Count = length(Q23)) %>%
  mutate(pct = round(prop.table(Count)*100,2)) %>%
  ggplot(aes(x = Q23, y = pct, group = Q1)) +
  geom_point(aes(color = Q1), size = 2) + geom_line(aes(color = Q1), size = 1) +
  scale_fill_brewer(palette = "Set3") +
  scale_x_discrete(labels = function(x) str_wrap(x,width = 10)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.y = element_text(size = 11), 
        axis.text.x = element_text(size = 12), 
        legend.position = "top",
        legend.title = element_blank(),
        legend.text = element_text(size = 11)) +
  labs(title = "Time spent actively coding", 
       x = "of time", y = "% of people", fill = "",
       caption = "Coding experience")

Los estudiantes, los ingenieros de software, los analistas de datos y los científicos de datos son los que más tiempo dedican a la programación, entre el 50 y el 74% de su tiempo.

afroCountries %>%
  group_by(Q6,Q23) %>%
  filter(!is.na(Q23)) %>%
  summarise(Count = length(Q23)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = Q23, y = Q6, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), color = "white", size = 3.5) + 
  theme(legend.position = "none",
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text = element_text(size = 11), 
        axis.text.y = element_text(size = 9),
        legend.text = element_text(size = 11)) + 
  labs(title = "Time spent coding", 
       x = "of time", y = "",
       caption = "Coding experience")

IDEs

La IDE más utilizada es Jupyter/Ipython. El segundo IDE preferido por los investigadores es MATLAB, mientras que los estudiantes prefieren Notepad++. Los ingenieros y analistas de datos eligen RStudio.

afroCountries %>% 
  select(Q6,30:45)%>%
  gather(2:16, key = "questions", value = "IDEs")%>%
  group_by(Q6,IDEs)%>%
  filter(!is.na(IDEs))%>%
  summarise(Count = length(IDEs))%>%
  mutate(pct =  prop.table(Count)*100)%>%
  ggplot(aes(x = reorder(IDEs,-pct), y = Q6, fill = Count)) + 
  geom_tile(stat = "identity") + 
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), 
            hjust = 0.5,vjust = 0.5, size = 3, color = "white") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15))+
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = -90,
                                   hjust = 0, vjust = 0.5),
        axis.text.y = element_text(size = 9), 
        legend.position = "none",
        legend.text = element_text(size = 11)) + 
  labs(title = "IDEs", 
       x = "", y = "", fill = "",
       caption = "Coding experience")

Cuadernos alojados

La mayoría de los encuestados no utilizan portátiles alojados. Kaggle kernels es la opción para los que sí lo hacen.

afroCountries %>% 
  select(Q6,Q14_Part_1:Q14_Part_11)%>%
  gather(2:12, key = "questions", value = "Hosted_Notebook")%>%
  group_by(Q6,Hosted_Notebook)%>%
  filter(!is.na(Hosted_Notebook))%>%
  summarise(Count = length(Hosted_Notebook))%>%
  mutate(pct =  prop.table(Count)*100)%>%
  ggplot(aes(x = reorder(Hosted_Notebook,-pct), y = Q6, fill = Count)) + 
  geom_tile(stat = "identity") + 
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), 
            hjust = 0.5,vjust = 0.5, size = 3, color = "white") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5))+
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        plot.subtitle = element_text(hjust = 0.5),
        axis.text.x = element_text(size = 11, angle = -90, hjust = 0, vjust = 0.5),
        axis.text.y = element_text(size = 9),
        legend.position = "none",
        legend.text = element_text(size = 11)) +
  labs(title = "Hosted notebook used at school or work", 
       subtitle = "(past 5 years)",
       x = "", y = "", fill = "",
       caption = "") 

Herramienta principal para analizar datos

La mayoría de los encuestados, especialmente los estudiantes y los científicos de datos, prefieren utilizar entornos de desarrollo locales/alojados cuando analizan datos.

afroCountries %>%
  group_by(Q6,Q12_MULTIPLE_CHOICE) %>%
  filter(!is.na(Q12_MULTIPLE_CHOICE)) %>%
  summarise(Count = length(Q12_MULTIPLE_CHOICE)) %>%
  ggplot(aes(x = reorder(Q12_MULTIPLE_CHOICE,-Count), y = Q6, fill = Count)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15)) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), color = "white", size = 3.5) + 
  theme(legend.position = "none",
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text = element_text(size = 11), 
        axis.text.y = element_text(size = 9),
        legend.text = element_text(size = 11)) + 
  labs(title = "Primary tools for data analysis", 
       x = "", y = "",
       caption = "Coding experience")

¿Eres un científico de datos?

Con todo el tiempo que pasan codificando para analizar datos, la mayoría de los encuestados africanos tienden a considerarse científicos de datos. Esto era de esperar, ya que una gran parte de los encuestados son científicos de datos. Sólo unas pocas mujeres no se consideran científicas de datos.

afroCountries %>%
  filter(Q1 == "Female"| Q1 == "Male") %>%
  group_by(Q1,Q26) %>%
  filter(!is.na(Q26)) %>%
  summarise(Count = length(Q26)) %>%
  ggplot(aes(x = Q26, y = Count, fill = Q1))+
  geom_col() + 
  scale_fill_brewer(palette = "Paired") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 8)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 9),
        axis.text.y = element_text(size = 12), 
        legend.position = "top",
        legend.text = element_text(size = 11)) + 
  labs(title = "Think of themself as a data scientist", 
       x = "", y = "Count", fill = "",
       caption = "Personal views")

Comparados con los demás continentes, los afrikagglers confían más en su identidad de científicos de datos: 59,89% respondieron “Sí”

newMultipleChoice %>%
  group_by(Continent,Q26) %>%
  filter(!is.na(Q26)) %>%
  summarise(Count = length(Q26)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = Q26, y = pct, group = Continent)) +
  geom_line(aes(color = Continent), size = 0.5) +
  geom_point(aes(color = Continent), size = 2) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5))+
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 12),
        axis.text.y = element_text(size = 12), 
        legend.position = "top",
        legend.title = element_blank(),
        legend.text = element_text(size = 11)) + 
  labs(title = "Think of themself as a data scientist", 
       x = "", y = "%", fill = "",
       caption = "Africa and the world")

Métodos de aprendizaje automático utilizados en el trabajo/la escuela

Los afrikagglers empezaron a utilizar métodos de aprendizaje automático hace poco. La mayoría los utiliza desde hace menos de un año.

afroCountries %>%
  group_by(Q6,Q25) %>%
  filter(!is.na(Q25)) %>%
  summarise(Count = length(Q25)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = Q25, y = Q6, fill = Count)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15)) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), color = "white", size = 3.5) + 
  theme(legend.position = "none",
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = -90, hjust = 0, vjust = 0.5), 
        axis.text.y = element_text(size = 9),
        legend.text = element_text(size = 11)) + 
  labs(title = "Usage of machine learning at work/school", 
       x = "", y = "",
       caption = "Coding experience")

Productos de aprendizaje automático

Lo mismo ocurre con los productos de aprendizaje automático. La mayoría de los encuestados no ha utilizado nunca ningún producto de aprendizaje automático. Solo unos pocos lo han utilizado, y la mayoría utiliza SAS.

afroCountries %>% 
  select(Q6,152:194)%>%
  gather(2:44, key = "questions", value = "ML_Products")%>%
  group_by(Q6,ML_Products)%>%
  filter(!is.na(ML_Products))%>%
  summarise(Count = length(ML_Products))%>%
  mutate(pct =  prop.table(Count)*100)%>% 
  top_n(5,pct) %>%
  ggplot() + 
  geom_point(mapping = aes(x = reorder(ML_Products,-Count), y = Q6, 
                           size = pct, color = ML_Products)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 8, angle = 45, hjust = 1), 
        axis.text.y = element_text(size = 8), 
        legend.position = "none",
        legend.text = element_text(size = 11)) + 
  labs(title = "Machine learning products (past 5 years)", 
       x = "", y = "", fill = "",
       caption = "Africa and the world")

Pero (des)afortunadamente, África no es la única que se encuentra en esa situación. El 25 % de los encuestados en general tampoco ha utilizado ningún producto de aprendizaje automático.

newMultipleChoice %>% 
  select(Continent,152:194)%>%
  gather(2:44, key = "questions", value = "ML_Products")%>%
  group_by(Continent,ML_Products)%>%
  filter(!is.na(ML_Products))%>%
  summarise(Count = length(ML_Products))%>%
  mutate(pct =  prop.table(Count)*100)%>% 
  top_n(5,Count) %>%
  ggplot() + 
  geom_point(mapping = aes(x = Continent, y = reorder(ML_Products,pct), 
                           size = pct, color = ML_Products)) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5))+
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 12),
        axis.text.y = element_text(size = 8), 
        legend.position = "none",
        legend.text = element_text(size = 11)) + 
  labs(title = "Machine learning products (past 5 years)", 
       x = "", y = "", fill = "",
       caption = "Africa and the world")

El uso de productos de aprendizaje automático difiere de un continente a otro.

  • Azure Machine Learning Studio, SAS y Cloudera son los productos más utilizados en África.

  • Los encuestados asiáticos prefieren Google Cloud Speech-to-text API, Google Cloud Vision API y Google Cloud Natural Language API.

  • Los de Europa utilizan Cloudera, Azure Machine Learning Studio y RapidMiner.

Marco de aprendizaje automático más utilizado

Scikit-Learn, TensorFlow y Keras son los marcos generales de aprendizaje automático, lo que concuerda con la tendencia general de todos los países.

afroCountries %>% 
  select(Q6,Q19_Part_1:Q19_Part_19)%>%
  gather(2:19, key = "questions", value = "ML_Framework")%>%
  group_by(Q6,ML_Framework)%>%
  filter(!is.na(ML_Framework))%>%
  summarise(Count = length(ML_Framework))%>%
  mutate(pct =  prop.table(Count)*100)%>%
  ggplot(aes(x = reorder(ML_Framework,-Count), y = Q6, fill = pct)) + 
  geom_tile(stat = "identity") + 
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), 
            hjust = 0.5,vjust = 0.5, size = 3, color = "white") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5))+
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 10, angle = 45, hjust = 1),
        axis.text.y = element_text(size = 10), 
        legend.position = "none",
        legend.text = element_text(size = 11)) + 
  labs(title = "Machine learning framework (past 5 years)", 
       x = "", y = "", fill = "",
       caption = "Africa and the world")

¿Considera que el aprendizaje automático es una “caja negra”?

Hay mucha más proporción de mujeres seguras de sí mismas, pero también más proporción de mujeres que consideran el aprendizaje automático como cajas negras.

afroCountries %>%
  group_by(Q1,Q48) %>% 
  filter(Q1 == "Female" | Q1 == "Male") %>%
  filter(!is.na(Q48)) %>%
  filter(!is.na(Q1)) %>%
  ggplot(aes(x = Q1, fill = Q48)) +
  geom_bar(position = "fill") +
  scale_x_discrete(labels = function(x) str_wrap(x,width = 10)) +
  scale_fill_brewer(palette = "Set3") +
  coord_flip() +
  labs(title = "Do you consider ML as 'black boxes'?", 
       x = "", y = "", fill = "", caption = "Personal views") +
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        legend.position = "bottom", 
        axis.text = element_text(size = 12),
        legend.text = element_text(size = 10)) +
  guides(fill = guide_legend(ncol = 1)) 

Métricas utilizadas para determinar el éxito

Las métricas utilizadas por las industrias africanas son las que consideran en primer lugar la precisión (con más o menos el mismo porcentaje), después vienen los ingresos y/o los objetivos empresariales. Marruecos tiene el mayor porcentaje de personas no involucradas en la organización que construyen modelos ML en su empresa.

Sudáfrica y Kenia están más orientadas a los ingresos que las demás ciudades. Esto puede explicar la mayor tasa de remuneración en estos países (véanse párrafos posteriores). El sesgo desleal sólo se tiene en cuenta ligeramente.

afroCountries %>% 
  select(Q42_Part_1:Q42_Part_5,Q3) %>%
  gather(1:5, key = "questions", value = "metrics")%>%
  group_by(metrics,Q3) %>%
  filter(!is.na(metrics)) %>%
  filter(!is.na(Q3)) %>%
  ggplot(aes(x = Q3, fill = metrics)) +
  geom_bar(position = "fill") +
  scale_x_discrete(labels = function(x) str_wrap(x,width = 15)) +
  scale_fill_brewer(palette = "Set3") +
  labs(title = "Metrics used to measure model success", 
       x = "", y = "", fill = "", caption = "Machine learning usage") +
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 12),
        axis.text.y = element_text(size = 11), 
        legend.text = element_text(size = 11), 
        legend.position = "bottom") +
  guides(fill = guide_legend(ncol = 1))

Lo mismo ocurre en todos los países/continentes.

newMultipleChoice %>% 
  select(Continent,Q42_Part_1:Q42_Part_5)%>%
  gather(2:6, key = "questions", value = "Metrics")%>%
  group_by(Continent,Metrics)%>%
  filter(!is.na(Metrics))%>%
  summarise(Count = length(Metrics))%>%
  mutate(pct =  prop.table(Count)*100)%>%
  ggplot(aes(x = Continent, y = reorder(Metrics,pct), fill = pct)) + 
  geom_tile(stat = "identity") + 
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = sprintf("%.2f%%", pct)), 
            hjust = 0.5,vjust = 0.5, size = 4, color = "white") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5))+
  scale_y_discrete(labels = function(x) str_wrap(x, width = 20))+
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 12),
        axis.text.y = element_text(size = 12), 
        legend.position = "none",
        legend.text = element_text(size = 11)) + 
  labs(title = "Metrics used by organizations", 
       x = "", y = "", fill = "",
       caption = "Africa and the world")

¿Y los datos?

Tipo de datos más utilizado

La mayoría utiliza datos numéricos, pero los científicos de datos manejan más los datos tabulares.

afroCountries %>% 
  select(Q6,Q32) %>%
  group_by(Q6,Q32) %>%
  filter(!is.na(Q32)) %>%
  summarise(Count = length(Q32)) %>%
  mutate(pct = round(prop.table(Count)*100,2)) %>%
  ggplot(aes(x = reorder(Q32,-Count), y = Q6, fill = pct)) +
  geom_tile(stat = "identity") + 
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), 
            hjust = 0.5,vjust = 0.5, size = 3, color = "white") +
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        plot.subtitle = element_text(hjust = 0.5),
        legend.position = "none", 
        axis.text.y = element_text(size = 11),
        axis.text.x = element_text(size = 12, angle = -90, hjust = 0, vjust = 0.5),
        legend.text = element_text(size = 11)) +
  labs(title = "Most used data types", 
       x = "Type of data", y = "", fill = "", 
       caption = "Data")

Dónde encontrar el conjunto de datos públicos

Las plataformas agregadoras de conjuntos de datos son las principales fuentes de datos utilizadas, seguidas de la búsqueda en Google y Github.

afroCountries %>% 
  select(Q1,266:276) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  gather(2:12, key = "questions", value = "DataSource")%>%
  group_by(Q1,DataSource) %>%
  filter(!is.na(DataSource)) %>%
  summarise(Count = length(DataSource))%>%
  ggplot(aes(x = reorder(DataSource,-Count), y = Count, fill = Q1)) + 
  geom_col() +
  scale_fill_brewer(palette = "Paired") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 20)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        axis.text = element_text(size = 12),
        axis.text.x = element_text(angle = -90, hjust = 0, vjust = 0.5),
        legend.position = "top",
        legend.text = element_text(size = 11)) +
  labs(title = "Sources used to get public datasets", 
       x = "", y = "Count", fill = "",
       caption = "Data")

Otras herramientas y servicios

Cloud computing services at work/school

A great number of the respondents have never used cloud computing services. Those who do are using Amazon Web services, Google Cloud platform or Microsoft Azure mostly.

afroCountries %>% 
  select(Q6,Q15_Part_1:Q15_Part_7)%>%
  gather(2:8, key = "questions", value = "Cloud_services")%>%
  group_by(Q6,Cloud_services)%>%
  filter(!is.na(Cloud_services))%>%
  summarise(Count = length(Cloud_services))%>%
  mutate(pct =  prop.table(Count)*100)%>%
  ggplot(aes(x = reorder(Cloud_services,-Count), y = Q6, fill = pct)) + 
  geom_tile(stat = "identity") + 
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), 
            hjust = 0.5,vjust = 0.5, size = 3, color = "white") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15))+
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        plot.subtitle = element_text(hjust = 0.5),
        axis.text.x = element_text(size = 11, angle = -90, hjust = 0, vjust = 0.5),
        axis.text.y = element_text(size = 9),
        legend.position = "none",
        legend.text = element_text(size = 11)) +
  labs(title = "Cloud computing services at work/school", 
       x = "", y = "", fill = "",
       caption = "") 

Productos de computación en nube

En general, una gran proporción de los encuestados no utiliza productos de computación en nube, especialmente los estudiantes y los analistas de datos. Google Compute Engine es el producto de computación en nube más utilizado por quienes lo usan.

afroCountries %>% 
  select(Q6,Q27_Part_1:Q27_Part_20) %>%
  gather(2:21, key = "questions", value = "cloud")%>%
  group_by(Q6,cloud)%>%
  filter(!is.na(cloud))%>%
  filter(!is.na(Q6))%>%
  summarise(Count = length(cloud))%>%
  mutate(pct = prop.table(Count)*100)%>%
  ggplot(aes(x = reorder(cloud,-Count), y = Q6, fill = pct)) + 
  geom_tile(stat = "identity") + 
  scale_fill_gradient(low = "salmon1", high = "blue") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15))+
  geom_text(aes(label = as.character(Count)), 
            hjust = 0.5,vjust = 0.5, size = 2.5, color = "white") +
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        axis.text = element_text(size = 10),
        axis.text.x = element_text(angle = -90, hjust = 0, vjust = 0.5),
        legend.position = "none",
        legend.text = element_text(size = 11)) +
  labs(title = "Cloud computing products (past 5 years)", 
       x = "", y = "", fill = "",
       caption = "Cloud computing products")

Herramientas de visualización más utilizadas

The love for Matplotlib is strong. It is followed by ggplot2 and Seaborn, but by far.

afroCountries %>% 
  select(Q1,Q22)%>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  group_by(Q1,Q22)%>%
  filter(!is.na(Q22))%>%
  summarise(Count = length(Q22))%>%
  ggplot(aes(x = reorder(Q22,-Count), y = Count, fill = Q1)) + 
  geom_col() +
  scale_fill_brewer(palette = "Paired") +
  scale_x_discrete(labels = function(x) str_wrap(x,width = 10)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        axis.text = element_text(size = 12),
        axis.text.x = element_text(angle = -90, hjust = 0, vjust = 0.5),
        legend.text = element_text(size = 11),
        legend.position = "top") +
  labs(title = "Most used vizualisation libraries", 
       x = "", y = "Count", fill = "",
       caption = "Other tools")

La elección de las bibliotecas de visualización depende, por supuesto, del lenguaje de programación utilizado. Los usuarios de R, SQL, SAS/STATA y JavaScript utilizan ggplot2. Los usuarios de Python y Java utilizan Matplotlib.

afroCountries %>% 
  select(Q17,Q22)%>%
  group_by(Q17,Q22)%>%
  filter(!is.na(Q17)) %>%
  filter(!is.na(Q22))%>%
  summarise(Count = length(Q22))%>%
  mutate(pct =  prop.table(Count)*100)%>%
  ggplot(aes(x = reorder(Q22,-Count), y = Q17, fill = pct)) + 
  geom_tile(stat = "identity") + 
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), 
            hjust = 0.5,vjust = 0.25, size = 3, color = "white") +
  scale_x_discrete(labels = function(x) str_wrap(x,width = 10)) +
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        axis.text.y = element_text(size = 9),
        axis.text.x = element_text(angle = -90, hjust = 0, vjust = 0.5),
        legend.text = element_text(size = 11),
        legend.position = "none") +
  labs(title = "Most used vizualisation library", 
       x = "", y = "Most used programming language", fill = "",
       caption = "Vizualisation libraries")

Base de datos relacional

MySQL, Microsoft SQL Server and PostgresSQL are the three most used relational database products these past five years and none of the respondents uses Ingres.

afroCountries %>% 
  select(Q1,196:223) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  gather(2:29, key = "questions", value = "RDB_Products") %>%
  group_by(Q1,RDB_Products) %>%
  filter(!is.na(RDB_Products))%>%
  filter(!is.na(Q1))%>%
  summarise(Count = length(RDB_Products))%>%
  ggplot(aes(x = reorder(RDB_Products,-Count), y = Count, fill = Q1)) +
  geom_col() + 
  scale_fill_brewer(palette = "Paired") +  
  scale_x_discrete(labels = function(x) str_wrap(x, width = 15))+
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        axis.text.x = element_text(size = 8, 
                                   angle = -90, hjust = 0, vjust = 0.5),
        legend.position = "top",
        legend.text = element_text(size = 11)) +
  labs(title = "Relational database products (past 5 years)", 
       x = "", y = "Count", fill = "",
       caption = "Relational database")

Productos de big data/analítica

Un gran número de encuestados africanos no utiliza ninguna herramienta de big data y análisis. Google BigQuery es la más utilizada por quienes usan herramientas de big data y analítica, y son pocos.

afroCountries %>% 
  select(Q1,225:249) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  gather(2:26, key = "questions", value = "BigData_Products") %>%
  group_by(Q1,BigData_Products) %>%
  filter(!is.na(BigData_Products)) %>%
  filter(!is.na(Q1)) %>%
  summarise(Count = length(BigData_Products))%>%
  ggplot(aes(x = reorder(BigData_Products,-Count), y = Count, fill = Q1)) + 
  geom_col() + 
  scale_fill_brewer(palette = "Paired") +
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        axis.text.x = element_text(size = 9, angle = -90, hjust = 0, vjust = 0.5),
        axis.text.y = element_text(size = 12),
        legend.position = "top",
        legend.text = element_text(size = 11)) +
  labs(title = "Big data and analytics tools (past 5 years)", 
       x = "", y = "Count", fill = "",
       caption = "Big data and analytics tools")

Las herramientas de big data y análisis no eran tan populares en los continentes africano y asiático. En África, en concreto, casi la mitad de los encuestados no las utilizaba nunca.

newMultipleChoice %>% 
  select(Continent,225:249) %>%
  gather(2:26, key = "questions", value = "BigData_Products") %>%
  group_by(Continent,BigData_Products) %>%
  filter(!is.na(BigData_Products)) %>%
  summarise(Count = length(BigData_Products))%>%
  mutate(pct = prop.table(Count)*100)%>%
  ggplot(aes(x = Continent, y = reorder(BigData_Products,pct), fill = pct)) + 
  geom_tile(stat = "identity") + 
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = sprintf("%.2f%%", pct)), 
            hjust = 0.5,vjust = 0.5, size = 3, color = "white") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5))+
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        axis.text = element_text(size = 11),
        legend.position = "none",
        legend.text = element_text(size = 11)) +
  labs(title = "Big data and analytics tools (past 5 years)", 
       x = "", y = "", fill = "",
       caption = "Africa and the world")

Formación continua

Porcentaje de formación actual en aprendizaje automático y ciencia de datos

Para mantenerse al día, los Afrikagglers utilizan otros medios para conocer las nuevas tendencias en aprendizaje automático y ciencia de datos.

El valor mediano del porcentaje de aprendizaje automático y ciencia de datos es ligeramente superior para los hombres encuestados en Autodidacta, Cursos en línea y Trabajo. Sin embargo, la mediana es más alta para las mujeres africanas para el aprendizaje en la Universidad. El porcentaje de mujeres con titulaciones superiores es mayor que el de los hombres en África, un mayor porcentaje de ellas también estudiaron/están estudiando informática y Matemáticas/Estadística, así que esto puede explicarlo. Dicho esto, sólo unas pocas de ellas están aprendiendo a través de las competiciones de Kaggle.

p1 <- multipleChoice18 %>%
  select(Q1,Q35_Part_1) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  ggplot(aes(x = "",y = Q35_Part_1, fill = Q1)) + 
  geom_boxplot() +
  scale_fill_brewer(palette = "Paired") +
  theme(plot.title = element_text(size = 13),
        legend.text = element_text(size = 9),
        legend.title = element_blank()) +
  labs(title = "Self-taught", x = "", y = "%")
  
p2 <- multipleChoice18 %>%
  select(Q1,Q35_Part_2) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  ggplot(aes(x = "", y = Q35_Part_2, fill = Q1)) + 
  geom_boxplot() +
  scale_fill_brewer(palette = "Paired") +
  theme(plot.title = element_text(size = 13),
        legend.text = element_text(size = 9),
        legend.title = element_blank()) +
  labs(title = "Online courses", x = "", y = "%")

p3 <- multipleChoice18 %>%
  select(Q1,Q35_Part_3) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  ggplot(aes(x = "",y = Q35_Part_3, fill = Q1)) + 
  geom_boxplot() +
  scale_fill_brewer(palette = "Paired") +
  theme(plot.title = element_text(size = 13),
        legend.text = element_text(size = 9),
        legend.title = element_blank()) +
  labs(title = "Work", x = "", y = "%")
  
p4 <- multipleChoice18 %>%
  select(Q1,Q35_Part_4) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  ggplot(aes(x = "", y = Q35_Part_4, fill = Q1)) + 
  geom_boxplot() +
  scale_fill_brewer(palette = "Paired") +
  theme(plot.title = element_text(size = 13),
        legend.text = element_text(size = 9),
        legend.title = element_blank()) +
  labs(title = "University", x = "", y = "%")

p5 <- multipleChoice18 %>%
  select(Q1,Q35_Part_5) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  ggplot(aes(x = "",y = Q35_Part_5, fill = Q1)) + 
  geom_boxplot() +
  scale_fill_brewer(palette = "Paired") +
  theme(plot.title = element_text(size = 13),
        legend.text = element_text(size = 9),
        legend.title = element_blank()) +
  labs(title = "Kaggle competitions", x = "", y = "%")
  
p6 <- multipleChoice18 %>%
  select(Q1,Q35_Part_6) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  ggplot(aes(x = "", y = Q35_Part_6, fill = Q1)) + 
  geom_boxplot() +
  scale_fill_brewer(palette = "Paired") +
  theme(plot.title = element_text(size = 13, hjust = 0.5),
        legend.text = element_text(size = 9),
        legend.title = element_blank()) +
  labs(title = "Other", x = "", y = "%")

grid.arrange(p1,p2, p3, p4, p5, p6, ncol = 3)

Plataforma en la que inició/terminó cursos de Ciencia de Datos

afroCountries %>% 
  select(Q3,Q36_Part_1:Q36_Part_13)%>%
  gather(2:14, key = "questions", value = "OnlinePlatform")%>%
  group_by(Q3,OnlinePlatform)%>%
  filter(!is.na(OnlinePlatform))%>%
  summarise(Count = length(OnlinePlatform))%>%
  mutate(pct =  prop.table(Count)*100)%>% 
  ggplot(aes(x = OnlinePlatform, y = pct, group = Q3)) +
  geom_point(aes(color = Q3), size = 2) + geom_line(aes(color = Q3), size = 0.5) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5))+
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = -90, hjust = 0, vjust = 0.5),
        axis.text.y = element_text(size = 12), 
        legend.position = "top",
        legend.title = element_blank(),
        legend.text = element_text(size = 11)) + 
  labs(title = "Platform for data science courses", 
       x = "", y = "%", fill = "",
       caption = "")

Coursera es la plataforma de aprendizaje más popular, por delante de DataCamp y Udemy.

Esta última parece ser más popular entre los usuarios masculinos (en términos de porcentaje) que entre los femeninos. Lo mismo ocurre con Kaggle Learn (5º puesto) y edX (6º puesto).

afroCountries %>% 
  select(Q1,Q36_Part_1:Q36_Part_13)%>%
  filter(Q1 == "Female"|Q1 == "Male")%>%
  gather(2:14, key = "questions", value = "OnlinePlatform")%>%
  group_by(Q1,OnlinePlatform)%>%
  filter(!is.na(OnlinePlatform))%>%
  summarise(Count = length(OnlinePlatform))%>%
  ggplot(aes(x = reorder(OnlinePlatform,-Count), y = Count, fill = Q1)) + 
  geom_col() + 
  scale_fill_brewer(palette = "Paired") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 20))+
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = -90, hjust = 0),
        axis.text.y = element_text(size = 12), 
        legend.position = "top",
        legend.text = element_text(size = 11)) + 
  labs(title = "Online platform used for learning", 
       x = "", y = "Count", fill = "",
       caption = "Online learning")

Plataforma en la que ha pasado la mayor parte del tiempo

Fuentes de medios favoritas

En general, los foros de Kaggle son las fuentes de medios favoritas para la ciencia de datos, con una proporción del 18,41% para África, la más alta de todas.

afroCountries %>% 
  select(Q1,Q38_Part_1:Q38_Part_22)%>%
  filter(Q1 == "Female"|Q1 == "Male")%>%
  gather(2:14, key = "questions", value = "OnlinePlatform")%>%
  group_by(Q1,OnlinePlatform)%>%
  filter(!is.na(OnlinePlatform))%>%
  summarise(Count = length(OnlinePlatform))%>%
  ggplot(aes(x = reorder(OnlinePlatform,-Count), y = Count, fill = Q1)) + 
  geom_col() + 
  scale_fill_brewer(palette = "Paired") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 20))+
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = -90, hjust = 0),
        axis.text.y = element_text(size = 12), 
        legend.position = "top",
        legend.text = element_text(size = 11)) + 
  labs(title = "Online platform used for learning", 
       x = "", y = "Count", fill = "",
       caption = "Online learning")

¿Qué piensan de …?

¿Qué opinan de los MOOCs/in-personal bootcamp?

Un gran número de los encuestados está a favor del aprendizaje en línea, en comparación con las instituciones tradicionales, especialmente los profesionales.

afroCountries %>%
  group_by(Q6,Q39_Part_1) %>%
  filter(!is.na(Q39_Part_1)) %>%
  summarise(Count = length(Q39_Part_1)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = reorder(Q39_Part_1,-Count), y = Q6, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), color = "white", size = 3.5) + 
  theme(legend.position = "none",
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text = element_text(size = 11), 
        axis.text.y = element_text(size = 9),
        legend.text = element_text(size = 11)) + 
  labs(title = "Online learning vs. Traditional institution", 
       x = "", y = "",
       caption = "")

Lo mismo ocurre con los campamentos de entrenamiento presenciales.

afroCountries %>%
  group_by(Q6,Q39_Part_2) %>%
  filter(!is.na(Q39_Part_2)) %>%
  summarise(Count = length(Q39_Part_2)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = reorder(Q39_Part_2,-pct), y = Q6, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = as.character(Count)), color = "white", size = 3.5) + 
  theme(legend.position = "none",
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text = element_text(size = 11), 
        axis.text.y = element_text(size = 9),
        legend.text = element_text(size = 11)) + 
  labs(title = "In-person bootcamp vs. Traditional institution", 
       x = "", y = "",
       caption = "")

Experiencia en ciencia de datos

La mayoría de los encuestados cree que los proyectos independientes son mucho más importantes que los logros académicos

afroCountries %>% 
  select(Q1,Q40) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  group_by(Q1,Q40) %>%
  filter(!is.na(Q40)) %>%
  filter(!is.na(Q1)) %>%
  summarise(Count = length(Q40))%>%
  mutate(pct = prop.table(Count)*100) %>%
  ggplot(aes(x = reorder(Q40,-pct), y = pct, fill = Q1)) + 
  geom_col() + 
  scale_fill_brewer(palette = "Paired") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 10))+
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        axis.text = element_text(size = 12),
        legend.position = "top",
        legend.text = element_text(size = 11)) +
  labs(title = "Independent projects vs. Academic achievements", 
       x = "", y = "Count", fill = "",
       caption = "Expertise in data science")

El 45,49% de los encuestados africanos considera que los proyectos independientes son mucho más importantes que los logros académicos.

newMultipleChoice %>% 
  group_by(Continent, Q40)%>%
  filter(!is.na(Q40))%>%
  summarise(Count = length(Q40))%>%
  mutate(pct = prop.table(Count)*100)%>%
  ggplot(aes(x = Continent, y = reorder(Q40,pct), fill = pct)) + 
  geom_tile(stat = "identity") + 
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = sprintf("%.2f%%", pct)), 
            hjust = 0.5,vjust = 0.25, size = 3, color = "white") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5))+
  scale_y_discrete(labels = function(x) str_wrap(x, width = 30))+
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        plot.subtitle = element_text(hjust = 0.5),
        axis.text.x = element_text(size = 11),
        axis.text.y = element_text(size = 11),
        legend.position = "none",
        legend.text = element_text(size = 11)) +
  labs(title = "Expertise in data science",
       subtitle = "Independent projects vs. academic achievements",
       x = "", y = "", fill = "",
       caption = "Africa and the world")

¡Hablemos del dinero!

afroCountries %>% 
  group_by(Q1,Q9)%>%
  filter(Q1 == "Female"|Q1 == "Male")%>%
  filter(!is.na(Q9))%>%
  summarise(Count = length(Q9))%>%
  mutate(pct = prop.table(Count)*100)%>%
  ggplot(aes(x = Q9, y = pct, group = Q1)) +
  geom_point(aes(color = Q1), size = 2) + geom_line(aes(color = Q1), size = 1) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5)) +
  
  theme(plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = -90, vjust = 0.5, hjust = 0),
        axis.text.y = element_text(size = 12), 
        legend.position = "top",
        legend.title = element_blank(),
        legend.text = element_text(size = 11)) + 
  scale_fill_brewer(palette = "Paired") +
  labs(title = "Yearly compensation", 
       x = "$", y = "%", fill = "",
       caption = "About us")

Los ingresos medios de los encuestados que se mostraron dispuestos a compartir información se sitúan en torno a 0-10.000 y 10.000-20.000 $** en todos los países. Los países mejor pagados de África son Kenia y Sudáfrica, con más de 300.000 $ para los encuestados varones.

afroCountries %>%
  group_by(Q1,Q9,Q3) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  filter(!is.na(Q9)) %>%
  summarise(Count = length(Q9)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = Q3, y = Q9, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = sprintf("%.2f%%", pct)), color = "white", size = 2) + 
  facet_grid(Q1~.) +
  coord_flip() +
  scale_y_discrete(labels = function(x) str_wrap(x, width = 35)) +
  theme(legend.position = "none", 
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = -90,  
                                   hjust = 0, vjust = 0.5),
        axis.text.y = element_text(size = 11), 
        legend.text = element_text(size = 11)) + 
  labs(title = "Yearly compensation", 
       x = "", y = "$", fill = "",
       caption = "About us")

Independientemente de la titulación, la mayoría de los encuestados ganan menos de 10.000 dólares al año en ambos sexos. A primera vista, los hombres doctores cobran mucho más que las mujeres.

afroCountries %>%
  group_by(Q1,Q9,Q4) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  filter(!is.na(Q4)) %>%
  filter(!is.na(Q9)) %>%
  summarise(Count = length(Q9)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = Q4, y = Q9, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = sprintf("%.2f%%", pct)), color = "white", size = 2) + 
  facet_grid(Q1~.) +
  coord_flip() +
  scale_y_discrete(labels = function(x) str_wrap(x, width = 35)) +
  theme(legend.position = "none", 
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = -90,  
                                   hjust = 0, vjust = 0.5),
        axis.text.y = element_text(size = 11), 
        legend.text = element_text(size = 11)) + 
  labs(title = "Yearly compensation by degree", 
       x = "", y = "$", fill = "",
       caption = "About us")

afroCountries %>%
  group_by(Q1,Q9,Q6) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  filter(!is.na(Q6)) %>%
  filter(!is.na(Q9)) %>%
  summarise(Count = length(Q9)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = Q9, y = Q6, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = sprintf("%.2f%%", pct)), color = "white", size = 2) +
  facet_grid(Q1~.) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5)) +
  scale_y_discrete(labels = function(x) str_wrap(x, width = 30)) +
  theme(legend.position = "none", 
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = -90, 
                                   hjust = 0, vjust = 0.5),
        axis.text.y = element_text(size = 7), 
        legend.text = element_text(size = 11)) +
  labs(title = "Yearly compensation vs. current role", 
       x = "$", y = "", fill = "",
       caption = "About us")

Para ganar más dinero, hay que ser científico de datos, estadístico o ingeniero de datos. Así pues, parece que el dinero está donde están los datos.

Si cruzamos estos resultados con la experiencia en el puesto actual, parece que se necesitan 1-2 años de experiencia en las mujeres para ganar 90-100’000$ como científico de datos, mientras que los hombres pueden ganar de 400’000 a más de 500’000$ con la misma experiencia.

Los años de experiencia parecen tener poca importancia en lo que respecta a cuánto gana la gente (como científico de datos en particular), pero el género sí.

afroCountries %>%
  group_by(Q1,Q9,Q8) %>%
  filter(Q1 == "Female" | Q1 == "Male") %>%
  filter(!is.na(Q8)) %>%
  filter(!is.na(Q9)) %>%
  summarise(Count = length(Q9)) %>%
  mutate(pct = round(prop.table(Count)*100,2))%>%
  ggplot(aes(x = Q9, y = Q8, fill = pct)) +
  geom_tile(size = 0.5, show.legend = TRUE) +
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = sprintf("%.2f%%", pct)), color = "white", size = 2) +
  facet_grid(Q1~.) +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5)) +
  scale_y_discrete(labels = function(x) str_wrap(x, width = 10)) +
  theme(legend.position = "none", 
        plot.title = element_text(size = 15, hjust = 0.5), 
        axis.text.x = element_text(size = 11, angle = -90, hjust = 0),
        axis.text.y = element_text(size = 11), 
        legend.text = element_text(size = 11)) +
  labs(title = "Yearly compensation by gender and experience in current role", 
       x = "$", y = "Years of experience", fill = "",
       caption = "About us")

La mayoría de los encuestados africanos cobran menos de 10.000 $. América del Norte y Oceanía tienen la mayor proporción de personas que cobran más de 100.000 $. En Europa, la mayoría se sitúa entre 0 y 60.000 $.

newMultipleChoice %>% 
  group_by(Continent, Q9)%>%
  filter(!is.na(Q9))%>%
  summarise(Count = length(Q9))%>%
  mutate(pct = prop.table(Count)*100)%>%
  ggplot(aes(x = Continent, y = Q9, fill = pct)) + 
  geom_tile(stat = "identity") + 
  scale_fill_gradient(low = "salmon1", high = "blue") +
  geom_text(aes(label = sprintf("%.2f%%", pct)), 
            hjust = 0.5,vjust = 0.25, size = 3, color = "white") +
  scale_x_discrete(labels = function(x) str_wrap(x, width = 5))+
  scale_y_discrete(labels = function(x) str_wrap(x, width = 30))+
  theme(plot.title = element_text(size = 15, hjust = 0.5),
        plot.subtitle = element_text(hjust = 0.5),
        axis.text.x = element_text(size = 11),
        axis.text.y = element_text(size = 11),
        legend.position = "none",
        legend.text = element_text(size = 11)) +
  labs(title = "Yearly compensation",
       x = "", y = "", fill = "",
       caption = "Africa and the world")

Resumen y conclusión

Es un poco difícil analizar una muestra tan pequeña, pero en general podemos decir que la Ciencia de Datos y el Aprendizaje Automático son todavía jóvenes en África. También tiene un futuro brillante, ya que cada vez más gente se está embarcando en ello. Espero que el año que viene tengamos aún más encuestados”. En general, los resultados tienden a seguir las tendencias mundiales, como el uso de Python. Pero en otros aspectos, África es diferente, como en la proporción entre hombres y mujeres.