orangeec <- read.csv("/home/jesusdfm/R/orangeec.csv")
summary(orangeec)
## Country GDP.PC GDP.US.bill GDP.Growth..
## Length:17 Min. : 5600 Min. : 13.7 Min. :0.800
## Class :character 1st Qu.: 8300 1st Qu.: 37.1 1st Qu.:2.000
## Mode :character Median :13300 Median : 75.7 Median :2.800
## Mean :14053 Mean : 188693.0 Mean :2.959
## 3rd Qu.:19900 3rd Qu.: 309.2 3rd Qu.:4.200
## Max. :25400 Max. :2055000.0 Max. :5.400
##
## Services...GDP Creat.Ind...GDP Inflation Unemployment
## Min. :50.00 Min. :1.000 Min. : 0.400 Min. : 2.300
## 1st Qu.:56.90 1st Qu.:2.000 1st Qu.: 1.600 1st Qu.: 5.500
## Median :62.20 Median :2.600 Median : 3.400 Median : 6.700
## Mean :62.64 Mean :3.291 Mean : 4.365 Mean : 6.794
## 3rd Qu.:64.90 3rd Qu.:3.950 3rd Qu.: 4.300 3rd Qu.: 8.100
## Max. :82.00 Max. :7.400 Max. :25.700 Max. :11.800
## NA's :6
## X..pop.below.poverty.line Internet.penetration...population Median.age
## Min. : 4.20 Min. :38.20 Min. :22.10
## 1st Qu.:21.70 1st Qu.:57.70 1st Qu.:25.70
## Median :25.70 Median :69.70 Median :28.20
## Mean :27.65 Mean :68.42 Mean :28.28
## 3rd Qu.:32.70 3rd Qu.:79.90 3rd Qu.:31.30
## Max. :59.30 Max. :93.10 Max. :35.00
##
## X..pop.25.54 Education.invest...GDP
## Min. :34.12 Min. :2.800
## 1st Qu.:39.23 1st Qu.:4.400
## Median :40.19 Median :5.000
## Mean :39.88 Mean :5.082
## 3rd Qu.:41.08 3rd Qu.:5.900
## Max. :44.03 Max. :7.400
##
pairs(orangeec[,6:10])
# Observación: Parece que existe correlación entre el aporte de la economía naranja al PIB y la tasa de desempleo.
economy <- mean(orangeec$GDP.PC)
orangeec <- orangeec %>%
mutate(Strong_economy = ifelse(GDP.PC < economy,
"Por debajo del promedio PIB per cápita",
"Por encima del promedio PIB per cápita"))
orangeec
## Country GDP.PC GDP.US.bill GDP.Growth.. Services...GDP Creat.Ind...GDP
## 1 Argentina 20900 637.7 2.9 60.9 3.8
## 2 Belize 8300 1854.0 0.8 62.2 NA
## 3 Bolivia 7500 37.1 4.2 50.0 NA
## 4 Brazil 15600 2055000.0 1.0 72.8 2.6
## 5 Chile 24500 277.0 1.5 64.3 2.2
## 6 Colombia 14500 309.2 1.8 61.4 3.3
## 7 Costa Rica 16900 58.1 3.2 73.5 2.0
## 8 Ecuador 11500 102.3 2.7 56.9 2.0
## 9 El Salvador 8900 28.0 2.4 64.9 NA
## 10 Guatemala 8100 75.7 2.8 63.2 NA
## 11 Honduras 5600 22.9 4.8 57.8 NA
## 12 Mexico 19900 1149000.0 2.0 64.0 7.4
## 13 Nicaragua 5800 13.7 4.9 50.8 NA
## 14 Panama 25400 61.8 5.4 82.0 6.3
## 15 Paraguay 9800 29.6 4.3 54.5 4.1
## 16 Peru 13300 215.2 2.5 56.8 1.5
## 17 Uruguay 22400 58.4 3.1 68.8 1.0
## Inflation Unemployment X..pop.below.poverty.line
## 1 25.7 8.1 25.7
## 2 1.1 10.1 41.0
## 3 2.8 4.0 38.6
## 4 3.4 11.8 4.2
## 5 2.2 7.0 14.4
## 6 4.3 10.5 28.0
## 7 1.6 8.1 21.7
## 8 0.4 4.6 21.5
## 9 1.0 7.0 32.7
## 10 4.4 2.3 59.3
## 11 3.9 5.9 29.6
## 12 6.0 3.6 46.2
## 13 3.9 6.5 29.6
## 14 0.9 5.5 23.0
## 15 3.6 6.5 22.2
## 16 2.8 6.7 22.7
## 17 6.2 7.3 9.7
## Internet.penetration...population Median.age X..pop.25.54
## 1 93.1 31.7 39.38
## 2 52.3 22.7 36.62
## 3 78.6 24.3 37.48
## 4 70.7 32.0 43.86
## 5 77.5 34.4 43.08
## 6 63.2 30.0 41.91
## 7 86.7 31.3 44.03
## 8 79.9 27.7 39.59
## 9 57.7 27.1 39.23
## 10 42.1 22.1 34.12
## 11 38.2 23.0 36.63
## 12 65.0 28.3 40.81
## 13 43.0 25.7 40.24
## 14 69.7 29.2 40.35
## 15 89.6 28.2 41.08
## 16 67.6 28.0 40.19
## 17 88.2 35.0 39.34
## Education.invest...GDP Strong_economy
## 1 5.9 Por encima del promedio PIB per cápita
## 2 7.4 Por debajo del promedio PIB per cápita
## 3 7.3 Por debajo del promedio PIB per cápita
## 4 5.9 Por encima del promedio PIB per cápita
## 5 4.9 Por encima del promedio PIB per cápita
## 6 4.5 Por encima del promedio PIB per cápita
## 7 7.1 Por encima del promedio PIB per cápita
## 8 5.0 Por debajo del promedio PIB per cápita
## 9 3.5 Por debajo del promedio PIB per cápita
## 10 2.8 Por debajo del promedio PIB per cápita
## 11 5.9 Por debajo del promedio PIB per cápita
## 12 5.3 Por encima del promedio PIB per cápita
## 13 4.5 Por debajo del promedio PIB per cápita
## 14 3.2 Por encima del promedio PIB per cápita
## 15 5.0 Por debajo del promedio PIB per cápita
## 16 3.8 Por debajo del promedio PIB per cápita
## 17 4.4 Por encima del promedio PIB per cápita
ggplot(data = orangeec, aes(x = Internet.penetration...population)) +
geom_histogram(
fill = "red",
color = "yellow",
binwidth = 5
) +
labs(
x = "Penetración de Internet (%) Población",
y = "Cantidad de países",
title = "Penetración de Internet en Países LATAM"
) +
theme(
legend.position = "none",
panel.background = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank()
)
ggplot(orangeec, aes(x = Internet.penetration...population, y = Creat.Ind...GDP)) +
geom_point(aes(color = "steelblue", size = GDP.Growth..)) +
labs(
x = "Penetración Internet",
y = "Aporte de economía naranja al PIB",
title = "Aporte economía naranja en PIB países LATAM con alto y bajo PIB per cápita"
) +
theme(
legend.position = "none",
panel.background = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank()
)
ggplot(orangeec, aes(x = Strong_economy, y = Creat.Ind...GDP, fill = Strong_economy)) +
geom_boxplot(alpha = 0.4) +
labs(
x = "Tipo de país",
y = "Aporte economía naranja al PIB",
title = "Aporte economía naranja en PIB países LATAM con alto y bajo PIB per cápita"
) +
theme(
legend.position = "none",
panel.background = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank()
)
Interpretación del Boxplot:
El boxplot indica que los países con un PIB per cápita por encima del promedio tienen una dispersión mucho más alta en cuanto a los aportes de la economía naranja al PIB del país, lo que sugiere una mayor variabilidad en el impacto de esta economía en esos países.