U1AFINAL

EQUIPO 6: Angélica Payán Serna, Karen Gutiérrez Velásquez y Andrea Higuera Chávez

21/03/2021

Estudio sobre

Descarga de este código

xfun::embed_file("U1AFINAL.Rmd")

Download U1AFINAL.Rmd

Importación de datos

setwd("~/estadistica")
library(readxl)
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.3     v purrr   0.3.4
## v tibble  3.0.5     v dplyr   1.0.4
## v tidyr   1.1.2     v stringr 1.4.0
## v readr   1.4.0     v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(prettydoc)
library(readr)
library(DT)
library(pacman)
p_load("base64enc","htmltools","mime","xfun","prettydoc","readr","knitr","DT","dplyr","ggplot2","plotly","gganimate","gifski","scales","hpackedbubble")
PIB <- read.csv("PIBmex.csv")
CO2 <- read_excel("CO2PIB.xlsx")
VAR <- read_excel("VAR.xlsx")

COMPORTAMIENTO DEL PRODUCTO INTERNO BRUTO POR ENTIDAD FEDERATIVA 2018 (Variación porcentual anual)

datos <- read_excel("VAR.xlsx")
hpackedbubble(datos$ESTADOS, datos$ACTIVIDAD, datos$'VALOR',
              title = "COMPORTAMIENTO DEL PRODUCTO INTERNO BRUTO POR ENTIDAD FEDERATIVA 2018",
              pointFormat = "<b>{point.name}:</b> {point.y}%",
              dataLabelsFilter = 100,
              packedbubbleMinSize = "50%",
              packedbubbleMaxSize = "150%",
              theme = "sunset",
              packedbubbleZMin = 0,
              packedbubbleZmax = 1000, split = 1,
              gravitational = 0.02,
              parentNodeLimit = 1,
              dragBetweenSeries = 0,
              seriesInteraction = 0,
              width = "100%")

```