orangeec <- read.csv("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         
## 

Parece que hay correlacion entre aporte de economia naranja al PIB y la tasa de desempleo.

pairs(orangeec[,6:10])

library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.5.3
ggplot() +
  geom_histogram(data=orangeec,
                 aes(x=Internet.penetration...population), # queremos ver la variable PIB PER CAPITA
                 fill="red", # barritas de color azul
                 color="yellow", # y un contorno rojo
                 binwidth = 5)  + # valor en porcentaje (vamos de a 5% por barra)
  labs(x="penetración de internet como (%) de la población", 
       y="cantidad de paises",
       title="penetración de internet en paises de latam") +
  xlim(30,100) + # numeramos del 30% al 100% 
  ylim(0,4) + # ponemos en el eje Y valores del 0 al 4
  scale_x_continuous(breaks = seq(30,100,by=5)) + # le colocamos valores a cada barras (que van del 30% al 100%) cada 5%
  theme(legend.position = "none") +
  theme(panel.background = element_blank(),
        panel.grid.major = element_blank(),
        panel.grid.minor = element_blank())
## Scale for x is already present.
## Adding another scale for x, which will replace the existing scale.

library(dplyr)
## Warning: package 'dplyr' was built under R version 4.5.3
## 
## Adjuntando el paquete: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
economy <- mean(orangeec$GDP.PC)
economy
## [1] 14052.94
orangeec <- orangeec %>%
  mutate(strong_economy = ifelse(GDP.PC < economy,
                                 "Por debajo del promedio en PIB per cápita",
                                 "Sobre-Arriba promedio en PIB per cápita"))
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 economia naranja al PIB",
        title="Aporte economia naranja en PIB paises latam con alto y bajo PIB per cápita")+
            theme(panel.background = element_blank(),
                panel.grid.major = element_blank(),
                panel.grid.minor = element_blank())
## Warning: Removed 6 rows containing non-finite outside the scale range
## (`stat_boxplot()`).

El boxplot indica que los paises por encima del promedio del PIB tienen una dispersión mucho mas alta en relación a los aportes de la economía naranja al PIB del país. CUIDADO, contrastar con desviación estándar.