En este informe se presenta el desarrollo de tablas de frecuencia simple y agrupada, medidas de tendencia central, medidas de variabilidad, medidas de posición y diagramas de caja y bigotes con el fin organizar de una mejor manera la información y así tener una buena comprensión de los de diferentes datos en los países de América como lo son Barbados, Belice, Bermuda, Brasil, Canadá, Colombia, Costa Rica, Cuba, Dominicana, Ecuador, El Salvador, Guatemala, Haití, Honduras, Jamaica, México, Puerto Rico, Perú, Panamá, República Dominicana, Saint lucia, Saint vincent and the Grenadine, Trinidad y Tobago, Estados unidos, Islas vírgenes y Venezuela. Para realizar el siguiente informe usamos R estudio el cual es un software creado para el análisis estadístico, además de facilitar la creación de gráficos como lo son el circular, el de barras, etc. Haciendo este trabajo ponemos en práctica los conocimientos previamente adquiridos poniéndolos una situación, en este caso el deslizamiento de los suelos a causa de la lluvia en todo el mundo la cual es un evento al que nos podemos enfrentar diariamente como geólogos. Además, tenemos como objetivo principal el poder desarrollar las habilidades mediante el uso de la informática y el análisis estadístico.
Para Barbados, solo hubo un deslizamiento en el estado de Saint Joseph, siendo esta la única ciudad donde aparecen datos.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Barbados")
table(pais$state.province)
##
## Saint Joseph
## 1
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Saint Joseph | 1 | 100 | 100 | 100 | 100 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="yellow", fill="darkblue", width=0.5) +
xlab("Barbados") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para Belize, solo hay un estado para la cual se tomaron datos y esta fue Cayo, donde se reportó un deslizamiento.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Belize")
table(pais$state.province)
##
## Cayo
## 1
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Cayo | 1 | 100 | 100 | 100 | 100 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue4", fill="red", width=0.5) +
xlab("Belize") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En Bermuda, se reportaron dos deslizamientos en Hamilton city.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Bermuda")
table(pais$state.province)
##
## Hamilton city
## 2
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Hamilton city | 2 | 100 | 100 | 100 | 100 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow", width=0.5) +
xlab("Bermuda") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En el caso de Brazil, se reportaron deslizamiento en 3 estados: Pará, Amapá y Maranhão, siendo el primero donde más deslizamientos hubo (2) y en los otros solo 1.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Brazil")
table(pais$state.province)
##
## Amapá Maranhão Pará
## 1 1 2
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Pará | 2 | 50 | 50 | 50 | 50 |
| Amapá | 1 | 25 | 25 | 75 | 75 |
| Maranhão | 1 | 25 | 25 | 100 | 100 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Brazil") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para Canada se presentaron deslizamientos en 3 estados: Ontario, Quebec y Nova Scotia, para las cuales el número de deslizamientos fue de 6, 3 y 1 respectivamente.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Canada")
table(pais$state.province)
##
## Nova Scotia Ontario Quebec
## 1 6 3
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Ontario | 6 | 60 | 60 | 60 | 60 |
| Quebec | 3 | 30 | 30 | 90 | 90 |
| Nova Scotia | 1 | 10 | 10 | 100 | 100 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Canada") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En Colombia, el número de deslizamientos se rpeortó de acuerdo al departamento donde ocurrió, siendo el de mayor frecuencia Antioquia con 19 deslizamientos, y los de menor frecuencia fueron: Bolívar, Meta, Putumayo, Quindío y Sucre, que solo tuvieron 1.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Colombia")
table(pais$state.province)
##
## Antioquia Bolívar Boyacá Caldas
## 19 1 3 10
## Caquetá Cauca Córdoba Cundinamarca
## 2 5 3 7
## Huila Magdalena Meta Nariño
## 6 3 1 5
## Norte de Santander Putumayo Quindío Risaralda
## 5 1 1 4
## Santander Sucre Tolima Valle del Cauca
## 11 1 4 4
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Antioquia | 19 | 19.8 | 19.8 | 19.8 | 19.8 |
| Santander | 11 | 11.5 | 11.5 | 31.2 | 31.2 |
| Caldas | 10 | 10.4 | 10.4 | 41.7 | 41.7 |
| Cundinamarca | 7 | 7.3 | 7.3 | 49.0 | 49.0 |
| Huila | 6 | 6.2 | 6.2 | 55.2 | 55.2 |
| Cauca | 5 | 5.2 | 5.2 | 60.4 | 60.4 |
| Nariño | 5 | 5.2 | 5.2 | 65.6 | 65.6 |
| Norte de Santander | 5 | 5.2 | 5.2 | 70.8 | 70.8 |
| Risaralda | 4 | 4.2 | 4.2 | 75.0 | 75.0 |
| Tolima | 4 | 4.2 | 4.2 | 79.2 | 79.2 |
| Valle del Cauca | 4 | 4.2 | 4.2 | 83.3 | 83.3 |
| Boyacá | 3 | 3.1 | 3.1 | 86.5 | 86.5 |
| Córdoba | 3 | 3.1 | 3.1 | 89.6 | 89.6 |
| Magdalena | 3 | 3.1 | 3.1 | 92.7 | 92.7 |
| Caquetá | 2 | 2.1 | 2.1 | 94.8 | 94.8 |
| Bolívar | 1 | 1.0 | 1.0 | 95.8 | 95.8 |
| Meta | 1 | 1.0 | 1.0 | 96.9 | 96.9 |
| Putumayo | 1 | 1.0 | 1.0 | 97.9 | 97.9 |
| Quindío | 1 | 1.0 | 1.0 | 99.0 | 99.0 |
| Sucre | 1 | 1.0 | 1.0 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Colombia") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para el país de Costa Rica se presentaron datos en 7 estados donde el que tuvo mayor número de deslizamientos fue San José con 25 y el de menor fue Limón con solo 2.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Costa Rica")
table(pais$state.province)
##
## Alajuela Cartago Guanacaste Heredia Limón Puntarenas San José
## 20 6 5 8 2 9 25
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| San José | 25 | 33.3 | 33.3 | 33.3 | 33.3 |
| Alajuela | 20 | 26.7 | 26.7 | 60.0 | 60.0 |
| Puntarenas | 9 | 12.0 | 12.0 | 72.0 | 72.0 |
| Heredia | 8 | 10.7 | 10.7 | 82.7 | 82.7 |
| Cartago | 6 | 8.0 | 8.0 | 90.7 | 90.7 |
| Guanacaste | 5 | 6.7 | 6.7 | 97.3 | 97.3 |
| Limón | 2 | 2.7 | 2.7 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Costa Rica") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En CUba solo se reportaron 3 estados con deslizamientos, 1 para cada uno de ellos.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Cuba")
table(pais$state.province)
##
## Artemisa Province Guantanamo Provincia de La Habana
## 1 1 1
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Artemisa Province | 1 | 33.3 | 33.3 | 33.3 | 33.3 |
| Guantanamo | 1 | 33.3 | 33.3 | 66.7 | 66.7 |
| Provincia de La Habana | 1 | 33.3 | 33.3 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Cuba") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En República Dominicanahubo 7 estados son deslizamientos, siendo Santiago el que más tuvo (4), y Hato Mayor, San Cristobal y santo Domingo con solo 1.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Dominican Republic")
table(pais$state.province)
##
## Distrito Nacional Hato Mayor La Vega Puerto Plata
## 3 1 2 3
## San Cristóbal Santiago Santo Domingo
## 1 4 1
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Santiago | 4 | 26.7 | 26.7 | 26.7 | 26.7 |
| Distrito Nacional | 3 | 20.0 | 20.0 | 46.7 | 46.7 |
| Puerto Plata | 3 | 20.0 | 20.0 | 66.7 | 66.7 |
| La Vega | 2 | 13.3 | 13.3 | 80.0 | 80.0 |
| Hato Mayor | 1 | 6.7 | 6.7 | 86.7 | 86.7 |
| San Cristóbal | 1 | 6.7 | 6.7 | 93.3 | 93.3 |
| Santo Domingo | 1 | 6.7 | 6.7 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Domician Republic") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para el país de Dominica se presentaron 7 estados con deslizamientos donde el de mayor número de deslizamientos reportados fue Saint Paul con 4 y Saint Patrick con 4, el resto tuvo solamente 1.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Dominica")
table(pais$state.province)
##
## Saint Andrew Saint George Saint John Saint Joseph Saint Mark
## 1 1 1 1 1
## Saint Patrick Saint Paul
## 4 5
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Saint Paul | 5 | 35.7 | 35.7 | 35.7 | 35.7 |
| Saint Patrick | 4 | 28.6 | 28.6 | 64.3 | 64.3 |
| Saint Andrew | 1 | 7.1 | 7.1 | 71.4 | 71.4 |
| Saint George | 1 | 7.1 | 7.1 | 78.6 | 78.6 |
| Saint John | 1 | 7.1 | 7.1 | 85.7 | 85.7 |
| Saint Joseph | 1 | 7.1 | 7.1 | 92.9 | 92.9 |
| Saint Mark | 1 | 7.1 | 7.1 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Dominica") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para el caso de Ecuador se muestran datos en 14 estados, el doble de los anteriores, donde el de mayor frecuencia de deslizamientos fue Pichincha con 9.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Ecuador")
table(pais$state.province)
##
## Azuay Carchi
## 2 2
## Cotopaxi Esmeraldas
## 1 2
## Guayas Loja
## 1 4
## Manabi Morona-Santiago
## 2 1
## Napo Pichincha
## 1 9
## Santo Domingo de los Tsáchilas Sucumbios
## 1 1
## Tungurahua Zamora-Chinchipe
## 1 2
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Pichincha | 9 | 30.0 | 30.0 | 30.0 | 30.0 |
| Loja | 4 | 13.3 | 13.3 | 43.3 | 43.3 |
| Azuay | 2 | 6.7 | 6.7 | 50.0 | 50.0 |
| Carchi | 2 | 6.7 | 6.7 | 56.7 | 56.7 |
| Esmeraldas | 2 | 6.7 | 6.7 | 63.3 | 63.3 |
| Manabi | 2 | 6.7 | 6.7 | 70.0 | 70.0 |
| Zamora-Chinchipe | 2 | 6.7 | 6.7 | 76.7 | 76.7 |
| Cotopaxi | 1 | 3.3 | 3.3 | 80.0 | 80.0 |
| Guayas | 1 | 3.3 | 3.3 | 83.3 | 83.3 |
| Morona-Santiago | 1 | 3.3 | 3.3 | 86.7 | 86.7 |
| Napo | 1 | 3.3 | 3.3 | 90.0 | 90.0 |
| Santo Domingo de los Tsáchilas | 1 | 3.3 | 3.3 | 93.3 | 93.3 |
| Sucumbios | 1 | 3.3 | 3.3 | 96.7 | 96.7 |
| Tungurahua | 1 | 3.3 | 3.3 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Ecuador") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En El Salvador se presentaron datos en 9 estados donde el de mayor número de deslizamientos fue La Libertad con 9, y los de menor número fueron Cabañas y La Paz con 1 deslizamiento reportado.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "El Salvador")
table(pais$state.province)
##
## Ahuachapán Cabañas La Libertad La Paz San Miguel San Salvador
## 2 1 5 1 3 2
## San Vicente Santa Ana Sonsonate
## 3 2 3
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| La Libertad | 5 | 22.7 | 22.7 | 22.7 | 22.7 |
| San Miguel | 3 | 13.6 | 13.6 | 36.4 | 36.4 |
| San Vicente | 3 | 13.6 | 13.6 | 50.0 | 50.0 |
| Sonsonate | 3 | 13.6 | 13.6 | 63.6 | 63.6 |
| Ahuachapán | 2 | 9.1 | 9.1 | 72.7 | 72.7 |
| San Salvador | 2 | 9.1 | 9.1 | 81.8 | 81.8 |
| Santa Ana | 2 | 9.1 | 9.1 | 90.9 | 90.9 |
| Cabañas | 1 | 4.5 | 4.5 | 95.5 | 95.5 |
| La Paz | 1 | 4.5 | 4.5 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("El Salvador") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para Guatmela, el número de estados con deslizamientos aumentó, siendo 18, y teniendo un número máximo de eventos en el estado de Guatemala con 31 deslizamientos registrados.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Guatemala")
table(pais$state.province)
##
## Alta Verapaz Baja Verapaz Chimaltenango Chiquimula Escuintla
## 3 1 4 1 3
## Guatemala Huehuetenango Izabal Jutiapa Quetzaltenango
## 31 5 2 1 3
## Quiché Sacatepéquez San Marcos Santa Rosa Sololá
## 7 3 2 1 9
## Suchitepeque Totonicapán Zacapa
## 1 1 1
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Guatemala | 31 | 39.2 | 39.2 | 39.2 | 39.2 |
| Sololá | 9 | 11.4 | 11.4 | 50.6 | 50.6 |
| Quiché | 7 | 8.9 | 8.9 | 59.5 | 59.5 |
| Huehuetenango | 5 | 6.3 | 6.3 | 65.8 | 65.8 |
| Chimaltenango | 4 | 5.1 | 5.1 | 70.9 | 70.9 |
| Alta Verapaz | 3 | 3.8 | 3.8 | 74.7 | 74.7 |
| Escuintla | 3 | 3.8 | 3.8 | 78.5 | 78.5 |
| Quetzaltenango | 3 | 3.8 | 3.8 | 82.3 | 82.3 |
| Sacatepéquez | 3 | 3.8 | 3.8 | 86.1 | 86.1 |
| Izabal | 2 | 2.5 | 2.5 | 88.6 | 88.6 |
| San Marcos | 2 | 2.5 | 2.5 | 91.1 | 91.1 |
| Baja Verapaz | 1 | 1.3 | 1.3 | 92.4 | 92.4 |
| Chiquimula | 1 | 1.3 | 1.3 | 93.7 | 93.7 |
| Jutiapa | 1 | 1.3 | 1.3 | 94.9 | 94.9 |
| Santa Rosa | 1 | 1.3 | 1.3 | 96.2 | 96.2 |
| Suchitepeque | 1 | 1.3 | 1.3 | 97.5 | 97.5 |
| Totonicapán | 1 | 1.3 | 1.3 | 98.7 | 98.7 |
| Zacapa | 1 | 1.3 | 1.3 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Guatemala") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para Haití solo se ven 5 estados en los que se presentaron 10 deslizamientos para Quest, 4 en Nord, 3 en Artibonite, 2 en Sud-Est y solo 1 en Centre.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Haiti")
table(pais$state.province)
##
## Artibonite Centre Nord Ouest Sud-Est
## 3 1 4 10 2
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Ouest | 10 | 50 | 50 | 50 | 50 |
| Nord | 4 | 20 | 20 | 70 | 70 |
| Artibonite | 3 | 15 | 15 | 85 | 85 |
| Sud-Est | 2 | 10 | 10 | 95 | 95 |
| Centre | 1 | 5 | 5 | 100 | 100 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Haiti") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En Honduras se reportaron 11 estados con deslizamientos, siendo el de mayor frecuencia de estos sucesos, el estado de Francisco Morazán, y los de meor frecuencia: Colón, El Paraíso y La Paz.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Honduras")
table(pais$state.province)
##
## Choluteca Colón Comayagua Copán
## 3 1 4 5
## Cortés El Paraíso Francisco Morazán La Paz
## 2 1 15 1
## Ocotepeque Santa Bárbara Yoro
## 2 2 2
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Francisco Morazán | 15 | 39.5 | 39.5 | 39.5 | 39.5 |
| Copán | 5 | 13.2 | 13.2 | 52.6 | 52.6 |
| Comayagua | 4 | 10.5 | 10.5 | 63.2 | 63.2 |
| Choluteca | 3 | 7.9 | 7.9 | 71.1 | 71.1 |
| Cortés | 2 | 5.3 | 5.3 | 76.3 | 76.3 |
| Ocotepeque | 2 | 5.3 | 5.3 | 81.6 | 81.6 |
| Santa Bárbara | 2 | 5.3 | 5.3 | 86.8 | 86.8 |
| Yoro | 2 | 5.3 | 5.3 | 92.1 | 92.1 |
| Colón | 1 | 2.6 | 2.6 | 94.7 | 94.7 |
| El Paraíso | 1 | 2.6 | 2.6 | 97.4 | 97.4 |
| La Paz | 1 | 2.6 | 2.6 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Honduras") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para el caso de jamaica se reportaron 8 estados con deslizamientos, siendo Portland donde más se presentaron (8), y St. Elizabeth donde menos se presentaron (1).
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Jamaica")
table(pais$state.province)
##
## Clarendon Portland Saint Andrew Saint Ann Saint Catherine
## 2 12 5 3 3
## Saint Mary Saint Thomas St. Elizabeth
## 3 4 1
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Portland | 12 | 36.4 | 36.4 | 36.4 | 36.4 |
| Saint Andrew | 5 | 15.2 | 15.2 | 51.5 | 51.5 |
| Saint Thomas | 4 | 12.1 | 12.1 | 63.6 | 63.6 |
| Saint Ann | 3 | 9.1 | 9.1 | 72.7 | 72.7 |
| Saint Catherine | 3 | 9.1 | 9.1 | 81.8 | 81.8 |
| Saint Mary | 3 | 9.1 | 9.1 | 90.9 | 90.9 |
| Clarendon | 2 | 6.1 | 6.1 | 97.0 | 97.0 |
| St. Elizabeth | 1 | 3.0 | 3.0 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Jamaica") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En México, 19 estados tuvieron deslizamientos según los datos reportados, siendo Chiapas el de mayor número con 10, y Colima el de menor con solo 1 al igual que otros como Sinaloa o Nuevo León.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Mexico")
table(pais$state.province)
##
## Baja California Baja California Sur Chiapas
## 4 1 10
## Chihuahua Colima Guerrero
## 1 1 8
## Hidalgo Jalisco México
## 2 1 4
## Michoacán Nayarit Nuevo León
## 4 2 1
## Oaxaca Puebla Sinaloa
## 9 4 1
## Tabasco The Federal District Veracruz
## 6 3 2
## Veracruz-Llave
## 9
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Chiapas | 10 | 13.7 | 13.7 | 13.7 | 13.7 |
| Oaxaca | 9 | 12.3 | 12.3 | 26.0 | 26.0 |
| Veracruz-Llave | 9 | 12.3 | 12.3 | 38.4 | 38.4 |
| Guerrero | 8 | 11.0 | 11.0 | 49.3 | 49.3 |
| Tabasco | 6 | 8.2 | 8.2 | 57.5 | 57.5 |
| Baja California | 4 | 5.5 | 5.5 | 63.0 | 63.0 |
| México | 4 | 5.5 | 5.5 | 68.5 | 68.5 |
| Michoacán | 4 | 5.5 | 5.5 | 74.0 | 74.0 |
| Puebla | 4 | 5.5 | 5.5 | 79.5 | 79.5 |
| The Federal District | 3 | 4.1 | 4.1 | 83.6 | 83.6 |
| Hidalgo | 2 | 2.7 | 2.7 | 86.3 | 86.3 |
| Nayarit | 2 | 2.7 | 2.7 | 89.0 | 89.0 |
| Veracruz | 2 | 2.7 | 2.7 | 91.8 | 91.8 |
| Baja California Sur | 1 | 1.4 | 1.4 | 93.2 | 93.2 |
| Chihuahua | 1 | 1.4 | 1.4 | 94.5 | 94.5 |
| Colima | 1 | 1.4 | 1.4 | 95.9 | 95.9 |
| Jalisco | 1 | 1.4 | 1.4 | 97.3 | 97.3 |
| Nuevo León | 1 | 1.4 | 1.4 | 98.6 | 98.6 |
| Sinaloa | 1 | 1.4 | 1.4 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Mexico") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En Nicaragua hubo 9 estados donde se obtuvieron datos de deslizamientos, de los cuales el que mayor tuvo fue Chontales con 14 y los que menos tuvieron fueron Atlántico Norte y Río San Juan con 1.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Nicaragua")
table(pais$state.province)
##
## Atlántico Norte Chontales Jinotega Madriz Managua
## 1 14 3 2 3
## Masaya Ogun State Río San Juan Rivas
## 2 3 1 2
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Chontales | 14 | 45.2 | 45.2 | 45.2 | 45.2 |
| Jinotega | 3 | 9.7 | 9.7 | 54.8 | 54.8 |
| Managua | 3 | 9.7 | 9.7 | 64.5 | 64.5 |
| Ogun State | 3 | 9.7 | 9.7 | 74.2 | 74.2 |
| Madriz | 2 | 6.5 | 6.5 | 80.6 | 80.6 |
| Masaya | 2 | 6.5 | 6.5 | 87.1 | 87.1 |
| Rivas | 2 | 6.5 | 6.5 | 93.5 | 93.5 |
| Atlántico Norte | 1 | 3.2 | 3.2 | 96.8 | 96.8 |
| Río San Juan | 1 | 3.2 | 3.2 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Nicaragua") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para Puerto rico hubo 6 estados con deslizamientos, estando Ponce con 2 y el resto como Agua, Orocovis, etc. con solamente 1.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Puerto Rico")
table(pais$state.province)
##
## Aguada Orocovis Ponce San Juan Vega Alta Villalba
## 1 1 2 1 1 1
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Ponce | 2 | 28.6 | 28.6 | 28.6 | 28.6 |
| Aguada | 1 | 14.3 | 14.3 | 42.9 | 42.9 |
| Orocovis | 1 | 14.3 | 14.3 | 57.1 | 57.1 |
| San Juan | 1 | 14.3 | 14.3 | 71.4 | 71.4 |
| Vega Alta | 1 | 14.3 | 14.3 | 85.7 | 85.7 |
| Villalba | 1 | 14.3 | 14.3 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Puerto Rico") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para Perú hubo 4 estados con deslizamientos reportados, Ancash con 5, Huanuco con 4, San Martín con 3 y La Libertad con 2.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Peru")
table(pais$state.province)
##
## Ancash Huanuco La Libertad San Martín
## 5 4 2 3
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Ancash | 5 | 35.7 | 35.7 | 35.7 | 35.7 |
| Huanuco | 4 | 28.6 | 28.6 | 64.3 | 64.3 |
| San Martín | 3 | 21.4 | 21.4 | 85.7 | 85.7 |
| La Libertad | 2 | 14.3 | 14.3 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Peru") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En panamá solo se reportó un deslizamiento en el estado de Los Santos.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Panama")
table(pais$state.province)
##
## Bocas del Toro Chiriquí Coclé Colón Los Santos
## 7 9 1 11 1
## Panamá
## 11
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Colón | 11 | 27.5 | 27.5 | 27.5 | 27.5 |
| Panamá | 11 | 27.5 | 27.5 | 55.0 | 55.0 |
| Chiriquí | 9 | 22.5 | 22.5 | 77.5 | 77.5 |
| Bocas del Toro | 7 | 17.5 | 17.5 | 95.0 | 95.0 |
| Coclé | 1 | 2.5 | 2.5 | 97.5 | 97.5 |
| Los Santos | 1 | 2.5 | 2.5 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Panama") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En Saint Vincent and the Grenadines también se reportó un deslizamiento solo en un estado: Charlotte.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Saint Vincent and the Grenadines")
table(pais$state.province)
##
## Charlotte
## 4
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Charlotte | 4 | 100 | 100 | 100 | 100 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow", width=0.5) +
xlab("Saint Vincent and the Grenadines") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En Santa Lucía se portaron 5 estados con 8 deslizamientos en total: Soufriére (4), Dennery (1), Laborie (1), Praslin (1) y Vieux-Fort (1).
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Saint Lucia")
table(pais$state.province)
##
## Dennery Laborie Praslin Soufrière Vieux-Fort
## 1 1 1 4 1
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Soufrière | 4 | 50.0 | 50.0 | 50.0 | 50.0 |
| Dennery | 1 | 12.5 | 12.5 | 62.5 | 62.5 |
| Laborie | 1 | 12.5 | 12.5 | 75.0 | 75.0 |
| Praslin | 1 | 12.5 | 12.5 | 87.5 | 87.5 |
| Vieux-Fort | 1 | 12.5 | 12.5 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Saint Lucia") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para Trinidad y Tobago hubo 15 estados donde se reportaron deslizamientos, siendo Diego Martín donde más se presentaron (16).
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Trinidad and Tobago")
table(pais$state.province)
##
## Borough of Arima City of Port of Spain
## 1 1 5
## City of San Fernando Couva-Tabaquite-Talparo Diego Martin
## 2 3 16
## Eastern Tobago Penal/Debe Point Fortin
## 10 2 1
## Princes Town San Juan/Laventille Sangre Grande
## 1 2 7
## Siparia Tobago Tunapuna/Piarco
## 1 7 4
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Diego Martin | 16 | 25.4 | 25.4 | 25.4 | 25.4 |
| Eastern Tobago | 10 | 15.9 | 15.9 | 41.3 | 41.3 |
| Sangre Grande | 7 | 11.1 | 11.1 | 52.4 | 52.4 |
| Tobago | 7 | 11.1 | 11.1 | 63.5 | 63.5 |
| City of Port of Spain | 5 | 7.9 | 7.9 | 71.4 | 71.4 |
| Tunapuna/Piarco | 4 | 6.3 | 6.3 | 77.8 | 77.8 |
| Couva-Tabaquite-Talparo | 3 | 4.8 | 4.8 | 82.5 | 82.5 |
| City of San Fernando | 2 | 3.2 | 3.2 | 85.7 | 85.7 |
| Penal/Debe | 2 | 3.2 | 3.2 | 88.9 | 88.9 |
| San Juan/Laventille | 2 | 3.2 | 3.2 | 92.1 | 92.1 |
| 1 | 1.6 | 1.6 | 93.7 | 93.7 | |
| Borough of Arima | 1 | 1.6 | 1.6 | 95.2 | 95.2 |
| Point Fortin | 1 | 1.6 | 1.6 | 96.8 | 96.8 |
| Princes Town | 1 | 1.6 | 1.6 | 98.4 | 98.4 |
| Siparia | 1 | 1.6 | 1.6 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Trinidad and Tobago") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
En U.S Virgin Islands solo se reportaron dos estados con deslizamientos: Saint Croix Island y Saint John Island ambos con 1.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "U.S. Virgin Islands")
table(pais$state.province)
##
## Saint Croix Island Saint John Island
## 1 1
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Saint Croix Island | 1 | 50 | 50 | 50 | 50 |
| Saint John Island | 1 | 50 | 50 | 100 | 100 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("U.S. Virgin Islands") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para el caso de Estados Unidos, que fue el país con más estados (42) con deslizamientos, hubo 124 de ellos en kentucky y 108 en colorado siendo los de mayor número, y Michigan, Montana y Oregon con solo 1, los de menor número.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "United States")
table(pais$state.province)
##
## Alabama Arizona Arkansas California Colorado
## 9 16 6 57 108
## Connecticut Florida Georgia Idaho Illinois
## 6 2 11 37 9
## Indiana Iowa Kansas Kentucky Maine
## 5 11 2 124 2
## Maryland Massachusetts Michigan Minnesota Mississippi
## 8 10 1 23 2
## Missouri Montana Nevada New Hampshire New Jersey
## 9 1 7 7 11
## New Mexico New York North Carolina Ohio Oklahoma
## 11 31 52 61 4
## Oregon Pennsylvania South Carolina South Dakota Tennessee
## 1 97 2 2 39
## Texas Utah Vermont Virginia West Virginia
## 4 65 7 16 80
## Wisconsin Wyoming
## 13 17
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Kentucky | 124 | 12.6 | 12.6 | 12.6 | 12.6 |
| Colorado | 108 | 11.0 | 11.0 | 23.5 | 23.5 |
| Pennsylvania | 97 | 9.8 | 9.8 | 33.4 | 33.4 |
| West Virginia | 80 | 8.1 | 8.1 | 41.5 | 41.5 |
| Utah | 65 | 6.6 | 6.6 | 48.1 | 48.1 |
| Ohio | 61 | 6.2 | 6.2 | 54.3 | 54.3 |
| California | 57 | 5.8 | 5.8 | 60.0 | 60.0 |
| North Carolina | 52 | 5.3 | 5.3 | 65.3 | 65.3 |
| Tennessee | 39 | 4.0 | 4.0 | 69.3 | 69.3 |
| Idaho | 37 | 3.8 | 3.8 | 73.0 | 73.0 |
| New York | 31 | 3.1 | 3.1 | 76.2 | 76.2 |
| Minnesota | 23 | 2.3 | 2.3 | 78.5 | 78.5 |
| Wyoming | 17 | 1.7 | 1.7 | 80.2 | 80.2 |
| Arizona | 16 | 1.6 | 1.6 | 81.8 | 81.8 |
| Virginia | 16 | 1.6 | 1.6 | 83.5 | 83.5 |
| Wisconsin | 13 | 1.3 | 1.3 | 84.8 | 84.8 |
| Georgia | 11 | 1.1 | 1.1 | 85.9 | 85.9 |
| Iowa | 11 | 1.1 | 1.1 | 87.0 | 87.0 |
| New Jersey | 11 | 1.1 | 1.1 | 88.1 | 88.1 |
| New Mexico | 11 | 1.1 | 1.1 | 89.2 | 89.2 |
| Massachusetts | 10 | 1.0 | 1.0 | 90.3 | 90.3 |
| Alabama | 9 | 0.9 | 0.9 | 91.2 | 91.2 |
| Illinois | 9 | 0.9 | 0.9 | 92.1 | 92.1 |
| Missouri | 9 | 0.9 | 0.9 | 93.0 | 93.0 |
| Maryland | 8 | 0.8 | 0.8 | 93.8 | 93.8 |
| Nevada | 7 | 0.7 | 0.7 | 94.5 | 94.5 |
| New Hampshire | 7 | 0.7 | 0.7 | 95.2 | 95.2 |
| Vermont | 7 | 0.7 | 0.7 | 95.9 | 95.9 |
| Arkansas | 6 | 0.6 | 0.6 | 96.6 | 96.6 |
| Connecticut | 6 | 0.6 | 0.6 | 97.2 | 97.2 |
| Indiana | 5 | 0.5 | 0.5 | 97.7 | 97.7 |
| Oklahoma | 4 | 0.4 | 0.4 | 98.1 | 98.1 |
| Texas | 4 | 0.4 | 0.4 | 98.5 | 98.5 |
| Florida | 2 | 0.2 | 0.2 | 98.7 | 98.7 |
| Kansas | 2 | 0.2 | 0.2 | 98.9 | 98.9 |
| Maine | 2 | 0.2 | 0.2 | 99.1 | 99.1 |
| Mississippi | 2 | 0.2 | 0.2 | 99.3 | 99.3 |
| South Carolina | 2 | 0.2 | 0.2 | 99.5 | 99.5 |
| South Dakota | 2 | 0.2 | 0.2 | 99.7 | 99.7 |
| Michigan | 1 | 0.1 | 0.1 | 99.8 | 99.8 |
| Montana | 1 | 0.1 | 0.1 | 99.9 | 99.9 |
| Oregon | 1 | 0.1 | 0.1 | 100.0 | 100.0 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("United States") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Para Venezuela solo se reportaron 5 estados, Distrito Federal con 12 deslizamientos, Miranda con 4, Vargas con 2, y Aragua y Falcón con 1.
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, country_name == "Venezuela")
table(pais$state.province)
##
## Aragua Distrito Federal Falcón Miranda
## 1 12 1 4
## Vargas
## 2
Capital <- c(pais$state.province)
library(questionr)
table <- questionr::freq(Capital, cum = TRUE, sort = "dec", total = FALSE)
knitr::kable(table)
| n | % | val% | %cum | val%cum | |
|---|---|---|---|---|---|
| Distrito Federal | 12 | 60 | 60 | 60 | 60 |
| Miranda | 4 | 20 | 20 | 80 | 80 |
| Vargas | 2 | 10 | 10 | 90 | 90 |
| Aragua | 1 | 5 | 5 | 95 | 95 |
| Falcón | 1 | 5 | 5 | 100 | 100 |
x <- row.names(table)
y <- table$n
names <- x[1:(length(x)-1)]
freqs <- y[1:(length(y)-1)]
df <- data.frame(x = table, y = table$n)
library(ggplot2)
ggplot(data=df, aes(x=x, y=y)) +
geom_bar(stat="identity", color="blue", fill="yellow") +
xlab("Venezuela") +
ylab("Frecuencia") +
theme(axis.text.x = element_text(angle = 90))
Estas fueron las 5 ciudades (con su respectivo país) donde ocurrieron la mayor parte de eventos geológicos asociados con los deslizamientos. Siendo el primero Estados Unidos con 124 deslizamientos en el estado de Kentucky y el quinto Guatemala con 20 deslizamientos en la ciudad de Alajuela. En el caso de Colombia, este posee una cifra cercana 19 eventos geológicos en el departamento de Antioquia.
df <- data.frame(Ciudad_pais =
c("Kentucky/US","Colorado/US","City of Guatemala/GT","San josé/CR","Alajuela/CR"),
Numero_de_eventos =
c(124,108,31,25,20))
knitr::kable(df)
| Ciudad_pais | Numero_de_eventos |
|---|---|
| Kentucky/US | 124 |
| Colorado/US | 108 |
| City of Guatemala/GT | 31 |
| San josé/CR | 25 |
| Alajuela/CR | 20 |
df$Ciudad_pais = factor(df$Ciudad_pais, levels=c("Kentucky/US","Colorado/US","City of Guatemala/GT","San josé/CR","Alajuela/CR"))
levels(df$Ciudad_pais)
## [1] "Kentucky/US" "Colorado/US" "City of Guatemala/GT"
## [4] "San josé/CR" "Alajuela/CR"
library(ggplot2)
ggplot(data=df, aes(x=Ciudad_pais, y=Numero_de_eventos)) + geom_bar(stat="identity") +
theme(axis.text.x = element_text(angle = 90))
library(ggplot2)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
data <- data.frame(group = c("Kentucky/US","Colorado/US","City of Guatemala/GT","San josé/CR","Alajuela/CR"),
value = c(40,35,10,8,7))
library(ggplot2)
library(dplyr)
data <- data %>%
arrange(desc(group)) %>%
mutate(prop = value / sum(data$value) *100) %>%
mutate(ypos = cumsum(prop)- 0.5*prop )
require(scales)
## Loading required package: scales
ggplot(data, aes(x="", y = prop, fill=group)) +
geom_bar(stat="identity", width=1, color="white") +
coord_polar("y", start=0) +
theme_void() +
theme(legend.position="none") +
geom_text(aes(y = ypos, label = percent(value/100)), color = "white", size=6, angle = 90) +
scale_fill_brewer(palette="Set1")
A continuación mostraremos una serie de tiempo para estos 5 estados con su respectivo país donde hubieron la mayor cantidad de eventos, y al mismo tiempo se mostrará que en algunos días se presentaron varios eventos simultaneos.
library(readr)
##
## Attaching package: 'readr'
## The following object is masked from 'package:scales':
##
## col_factor
library(knitr)
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, state.province == "Kentucky")
write.csv(x = pais, file = "pais.csv")
data2 <- read.csv("pais.csv")
library(ggplot2)
library(dplyr)
ggplot(data2, aes(x = date, y = distance )) +
geom_line(color="#69b3a2", size = 1)+
geom_point()+
theme(axis.text.x = element_text(angle = 90))
library(readr)
library(knitr)
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, state.province == "Colorado")
write.csv(x = pais, file = "pais.csv")
data2 <- read.csv("pais.csv")
library(ggplot2)
library(dplyr)
ggplot(data2, aes(x = date, y = distance )) +
geom_line(color="#69b3a2", size = 1)+
geom_point()+
theme(axis.text.x = element_text(angle = 90))
library(readr)
library(knitr)
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, state.province == "Guatemala")
write.csv(x = pais, file = "pais.csv")
data2 <- read.csv("pais.csv")
library(ggplot2)
library(dplyr)
ggplot(data2, aes(x = date, y = distance )) +
geom_line(color="#69b3a2", size = 1)+
geom_point()+
theme(axis.text.x = element_text(angle = 90))
library(readr)
library(knitr)
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, state.province == "San José")
write.csv(x = pais, file = "pais.csv")
data2 <- read.csv("pais.csv")
library(ggplot2)
library(dplyr)
ggplot(data2, aes(x = date, y = distance )) +
geom_line(color="#69b3a2", size = 1)+
geom_point()+
theme(axis.text.x = element_text(angle = 90))
library(readr)
library(knitr)
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
pais <- subset(df, state.province == "Alajuela")
write.csv(x = pais, file = "pais.csv")
data2 <- read.csv("pais.csv")
library(ggplot2)
library(dplyr)
ggplot(data2, aes(x = date, y = distance )) +
geom_line(color="#69b3a2", size = 1)+
geom_point()+
theme(axis.text.x = element_text(angle = 90))
## geom_path: Each group consists of only one observation. Do you need to adjust
## the group aesthetic?
library(knitr)
library(readr)
df <- read.csv("https://raw.githubusercontent.com/lihkir/AnalisisEstadisticoUN/main/Data/catalog.csv")
knitr::kable(head(df))
| id | date | time | continent_code | country_name | country_code | state.province | population | city.town | distance | location_description | latitude | longitude | geolocation | hazard_type | landslide_type | landslide_size | trigger | storm_name | injuries | fatalities | source_name | source_link |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 34 | 3/2/07 | Night | NA | United States | US | Virginia | 16000 | Cherry Hill | 3.40765 | Unknown | 38.6009 | -77.2682 | (38.600900000000003, -77.268199999999993) | Landslide | Landslide | Small | Rain | NA | NA | NBC 4 news | http://www.nbc4.com/news/11186871/detail.html | |
| 42 | 3/22/07 | NA | United States | US | Ohio | 17288 | New Philadelphia | 3.33522 | 40.5175 | -81.4305 | (40.517499999999998, -81.430499999999995) | Landslide | Landslide | Small | Rain | NA | NA | Canton Rep.com | http://www.cantonrep.com/index.php?ID=345054&Category=9&subCategoryID=0 | |||
| 56 | 4/6/07 | NA | United States | US | Pennsylvania | 15930 | Wilkinsburg | 2.91977 | Urban area | 40.4377 | -79.9160 | (40.4377, -79.915999999999997) | Landslide | Landslide | Small | Rain | NA | NA | The Pittsburgh Channel.com | https://web.archive.org/web/20080423132842/http://www.thepittsburghchannel.com/news/11846833/detail.html | ||
| 59 | 4/14/07 | NA | Canada | CA | Quebec | 42786 | Châteauguay | 2.98682 | Above river | 45.3226 | -73.7771 | (45.322600000000001, -73.777100000000004) | Landslide | Riverbank collapse | Small | Rain | NA | NA | Le Soleil | http://www.hebdos.net/lsc/edition162007/articles.asp?article_id=166976 | ||
| 61 | 4/15/07 | NA | United States | US | Kentucky | 6903 | Pikeville | 5.66542 | Below road | 37.4325 | -82.4931 | (37.432499999999997, -82.493099999999998) | Landslide | Landslide | Small | Downpour | NA | 0 | Matthew Crawford (KGS) | |||
| 64 | 4/20/07 | NA | United States | US | Kentucky | 6903 | Pikeville | 0.23715 | 37.4814 | -82.5186 | (37.481400000000001, -82.518600000000006) | Landslide | Landslide | Small | Rain | NA | NA | Applalachain news-express | http://www.news-expressky.com/articles/2007/04/19/top_story/01mudslide.txt |
En las zonas donde se han registrado los deslizamientos, el valor promedio de la población es 2509 habitantes. Mientras que los deslizamientos de tierra tienen una longitud de 8,46 kilometros promedio.
library(dplyr)
colnames(df)[7] <- "state"
pais <- subset(df, country_name == "United States")
knitr::kable(head(pais))
| id | date | time | continent_code | country_name | country_code | state | population | city.town | distance | location_description | latitude | longitude | geolocation | hazard_type | landslide_type | landslide_size | trigger | storm_name | injuries | fatalities | source_name | source_link | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 34 | 3/2/07 | Night | NA | United States | US | Virginia | 16000 | Cherry Hill | 3.40765 | Unknown | 38.6009 | -77.2682 | (38.600900000000003, -77.268199999999993) | Landslide | Landslide | Small | Rain | NA | NA | NBC 4 news | http://www.nbc4.com/news/11186871/detail.html | |
| 2 | 42 | 3/22/07 | NA | United States | US | Ohio | 17288 | New Philadelphia | 3.33522 | 40.5175 | -81.4305 | (40.517499999999998, -81.430499999999995) | Landslide | Landslide | Small | Rain | NA | NA | Canton Rep.com | http://www.cantonrep.com/index.php?ID=345054&Category=9&subCategoryID=0 | |||
| 3 | 56 | 4/6/07 | NA | United States | US | Pennsylvania | 15930 | Wilkinsburg | 2.91977 | Urban area | 40.4377 | -79.9160 | (40.4377, -79.915999999999997) | Landslide | Landslide | Small | Rain | NA | NA | The Pittsburgh Channel.com | https://web.archive.org/web/20080423132842/http://www.thepittsburghchannel.com/news/11846833/detail.html | ||
| 5 | 61 | 4/15/07 | NA | United States | US | Kentucky | 6903 | Pikeville | 5.66542 | Below road | 37.4325 | -82.4931 | (37.432499999999997, -82.493099999999998) | Landslide | Landslide | Small | Downpour | NA | 0 | Matthew Crawford (KGS) | |||
| 6 | 64 | 4/20/07 | NA | United States | US | Kentucky | 6903 | Pikeville | 0.23715 | 37.4814 | -82.5186 | (37.481400000000001, -82.518600000000006) | Landslide | Landslide | Small | Rain | NA | NA | Applalachain news-express | http://www.news-expressky.com/articles/2007/04/19/top_story/01mudslide.txt | |||
| 7 | 67 | 4/24/07 | NA | United States | US | South Dakota | 2540 | Dakota Dunes | 2.48033 | 42.4941 | -96.4576 | (42.494100000000003, -96.457599999999999) | Landslide | Landslide | Small | Rain | NA | NA | Sioux City Journnal | http://www.siouxcityjournal.com/articles/2007/04/25/news/top/02a92f1defdd220f862572c800126dfc.txt |
library(dplyr)
library(pastecs)
##
## Attaching package: 'pastecs'
## The following objects are masked from 'package:dplyr':
##
## first, last
stat.desc(pais$population)
## nbr.val nbr.null nbr.na min max range
## 9.860000e+02 0.000000e+00 0.000000e+00 8.100000e+01 1.526006e+06 1.525925e+06
## sum median mean SE.mean CI.mean.0.95 var
## 2.474413e+07 4.144500e+03 2.509547e+04 2.840471e+03 5.574069e+03 7.955317e+09
## std.dev coef.var
## 8.919258e+04 3.554131e+00
stat.desc(pais$distance)
## nbr.val nbr.null nbr.na min max range
## 985.0000000 0.0000000 1.0000000 0.0017800 74.4609700 74.4591900
## sum median mean SE.mean CI.mean.0.95 var
## 8334.9682600 5.0815200 8.4618967 0.3178238 0.6236904 99.4968078
## std.dev coef.var
## 9.9748087 1.1787911
En este gráfico, resalta la canitidad de datos atípicos respecto a la distancia que pueden alcanzar los deslizamientos de tierra, llegando incluso a distancias mayores a los 70 kilometros.
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ tibble 3.1.3 ✓ stringr 1.4.0
## ✓ tidyr 1.1.3 ✓ forcats 0.5.1
## ✓ purrr 0.3.4
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x readr::col_factor() masks scales::col_factor()
## x purrr::discard() masks scales::discard()
## x tidyr::extract() masks pastecs::extract()
## x dplyr::filter() masks stats::filter()
## x pastecs::first() masks dplyr::first()
## x dplyr::lag() masks stats::lag()
## x pastecs::last() masks dplyr::last()
library(hrbrthemes)
## NOTE: Either Arial Narrow or Roboto Condensed fonts are required to use these themes.
## Please use hrbrthemes::import_roboto_condensed() to install Roboto Condensed and
## if Arial Narrow is not on your system, please see https://bit.ly/arialnarrow
library(viridis)
## Loading required package: viridisLite
##
## Attaching package: 'viridis'
## The following object is masked from 'package:scales':
##
## viridis_pal
data<-pais$distance
caja <- data.frame(data)
caja %>% ggplot(aes(x = "", y = data)) +
geom_boxplot(color="black", fill="blue", alpha=0.5) +
theme_ipsum() +
theme(legend.position="none", plot.title = element_text(size=11)) +
ggtitle("Basic boxplot") +
coord_flip() +
xlab("") +
ylab("")
## Warning: Removed 1 rows containing non-finite values (stat_boxplot).
En Canada, el tamaño máximo de la población donde ha ocurrido un deslizamiento resgistrado en esta base de datos es 812129. Por otro lado, el mayor deslizamiento tuvo una longitud de 2.74 kilometros.
library(dplyr)
pais <- subset(df, country_name == "Canada")
knitr::kable(head(pais))
| id | date | time | continent_code | country_name | country_code | state | population | city.town | distance | location_description | latitude | longitude | geolocation | hazard_type | landslide_type | landslide_size | trigger | storm_name | injuries | fatalities | source_name | source_link | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4 | 59 | 4/14/07 | NA | Canada | CA | Quebec | 42786 | Châteauguay | 2.98682 | Above river | 45.3226 | -73.7771 | (45.322600000000001, -73.777100000000004) | Landslide | Riverbank collapse | Small | Rain | NA | NA | Le Soleil | http://www.hebdos.net/lsc/edition162007/articles.asp?article_id=166976 | ||
| 14 | 119 | 7/8/07 | NA | Canada | CA | Ontario | 812129 | Ottawa | 1.74759 | 45.4257 | -75.6896 | (45.425699999999999, -75.689599999999999) | Landslide | Landslide | Small | Unknown | NA | NA | http://www.cfra.com/headlines/index.asp?cat=1&nid=50672 | ||||
| 379 | 2085 | 7/16/10 | 6:00:00 | NA | Canada | CA | Ontario | 33232 | Ancaster | 5.11510 | Above road | 43.2453 | -79.9367 | (43.2453, -79.936700000000002) | Landslide | Mudslide | Medium | Downpour | NA | 0 | Hamilton Spectator | http://www.thespec.com/news-story/2163626-mudslide-causes-four-vehicle-crash-on-highway-403/ | |
| 451 | 2490 | 9/23/10 | 23:00:00 | NA | Canada | CA | Quebec | 17016 | Saint-Lazare | 3.16544 | 45.3717 | -74.1359 | (45.371699999999997, -74.135900000000007) | Landslide | Landslide | Medium | Downpour | NA | 0 | http://www.torontosun.com/news/canada/2010/09/24/15463551.html | |||
| 929 | 4710 | 1/13/13 | NA | Canada | CA | Ontario | 115760 | Guelph | 12.17933 | 43.6187 | -80.1432 | (43.618699999999997, -80.143199999999993) | Landslide | Mudslide | Medium | Rain | NA | NA | www.lfpress.com | http://www.lfpress.com/2013/01/14/ministry-of-the-environment-investigating-mudslide-in-rockwood-near-guelph | |||
| 1320 | 6404 | 11/28/14 | 8:30 | NA | Canada | CA | Ontario | 519949 | Hamilton | 4.79449 | Above road | 43.2804 | -79.8919 | (43.2804, -79.891900000000007) | Landslide | Landslide | Small | Unknown | 0 | 0 | Hamilton Spectator | http://www.thespec.com/news-story/5161560--landslide-closes-lanes-of-toronto-bound-hwy-403-at-york-blvd-/ |
library(dplyr)
library(pastecs)
stat.desc(pais$population)
## nbr.val nbr.null nbr.na min max range
## 1.000000e+01 0.000000e+00 0.000000e+00 2.052000e+03 8.121290e+05 8.100770e+05
## sum median mean SE.mean CI.mean.0.95 var
## 2.089303e+06 3.800900e+04 2.089303e+05 9.314769e+04 2.107147e+05 8.676492e+10
## std.dev coef.var
## 2.945588e+05 1.409843e+00
stat.desc(pais$distance)
## nbr.val nbr.null nbr.na min max range
## 10.0000000 0.0000000 0.0000000 1.7475900 12.1793300 10.4317400
## sum median mean SE.mean CI.mean.0.95 var
## 49.7996700 3.7521400 4.9799670 1.2151153 2.7487818 14.7650519
## std.dev coef.var
## 3.8425320 0.7715979
En general, los valores de distancia de los desplazamientos en Canada son uniformes, con solo dos eventos atípicos.
library(tidyverse)
library(hrbrthemes)
library(viridis)
data<-pais$distance
caja <- data.frame(data)
caja %>% ggplot(aes(x = "", y = data)) +
geom_boxplot(color="black", fill="blue", alpha=0.5) +
theme_ipsum() +
theme(legend.position="none", plot.title = element_text(size=11)) +
ggtitle("Basic boxplot") +
coord_flip() +
xlab("") +
ylab("")
##Costa Rica
La diferencia entre las mayores poblaciones y menores poblaciones donde ha ocurrido algún deslizamiento en Costa Rica es 335007 habitantes. Mientras que el rango para la distancia de los delizamientos es 22.07 kilometros.
library(dplyr)
pais <- subset(df, country_name == "Costa Rica")
knitr::kable(head(pais))
| id | date | time | continent_code | country_name | country_code | state | population | city.town | distance | location_description | latitude | longitude | geolocation | hazard_type | landslide_type | landslide_size | trigger | storm_name | injuries | fatalities | source_name | source_link | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 38 | 249 | 9/9/07 | NA | Costa Rica | CR | Heredia | 21947 | Heredia | 0.26208 | 10.0000 | -84.1167 | (10, -84.116699999999994) | Landslide | Landslide | Medium | Rain | NA | NA | ticotimes.net | http://www.ticotimes.net/dailyarchive/2007_09/0911072.htm | |||
| 44 | 299 | 10/9/07 | NA | Costa Rica | CR | San José | 3072 | San Ignacio | 4.57763 | 9.7789 | -84.1250 | (9.7789000000000001, -84.125) | Landslide | Complex | Medium | Rain | NA | 4 | ticotimes.net | http://www.ticotimes.net/dailyarchive/2007_10/1010071.htm | |||
| 45 | 301 | 10/11/07 | NA | Costa Rica | CR | Alajuela | 7014 | Atenas | 3.08459 | 9.9869 | -84.4070 | (9.9869000000000003, -84.406999999999996) | Landslide | Mudslide | Large | Rain | NA | 14 | Agence France-Presse, afp.google.com | http://afp.google.com/article/ALeqM5hu6a8oyAM1ycq9nU_6Zyj_l7F0AA | |||
| 46 | 302 | 10/11/07 | NA | Costa Rica | CR | San José | 26669 | 9.56251 | 10.0214 | -83.9451 | (10.0214, -83.945099999999996) | Landslide | Landslide | Large | Rain | NA | 10 | International Herald | http://www.iht.com/articles/ap/2007/10/12/america/LA-GEN-Costa-Rica-Mudslide.php | ||||
| 51 | 323 | 10/24/07 | NA | Costa Rica | CR | Puntarenas | 6540 | Miramar | 3.82425 | Mine construction | 10.0715 | -84.7575 | (10.0715, -84.757499999999993) | Landslide | Mudslide | Medium | Downpour | NA | NA | Reuters - AlertNet.org | http://www.reuters.com/article/companyNewsAndPR/idUSN2435152820071025 | ||
| 102 | 556 | 5/29/08 | NA | Costa Rica | CR | Guanacaste | 4108 | Bagaces | 17.65521 | 10.4024 | -85.3555 | (10.4024, -85.355500000000006) | Landslide | Landslide | Medium | Tropical cyclone | Tropical Storm Alma | NA | NA | http://www.reliefweb.int/rw/RWB.NSF/db900SID/ASAZ-7FHCHL?OpenDocument |
library(dplyr)
library(pastecs)
stat.desc(pais$population)
## nbr.val nbr.null nbr.na min max range
## 7.500000e+01 4.000000e+00 0.000000e+00 0.000000e+00 3.350070e+05 3.350070e+05
## sum median mean SE.mean CI.mean.0.95 var
## 1.127522e+06 6.784000e+03 1.503363e+04 4.498709e+03 8.963873e+03 1.517878e+09
## std.dev coef.var
## 3.895996e+04 2.591521e+00
stat.desc(pais$distance)
## nbr.val nbr.null nbr.na min max range
## 75.0000000 0.0000000 0.0000000 0.2525400 22.3236800 22.0711400
## sum median mean SE.mean CI.mean.0.95 var
## 646.1411800 8.2137200 8.6152157 0.6924979 1.3798322 35.9665004
## std.dev coef.var
## 5.9972077 0.6961181
En el gráfico de caja para Costa Rica, es posible distinguir fácilmente que el valor de la mediana es 8,2 aproximandamente, y que los valores a la izquierda de esta medida, son más dispersos a comparación de los valores hacia la derecha.
library(tidyverse)
library(hrbrthemes)
library(viridis)
data<-pais$distance
caja <- data.frame(data)
caja %>% ggplot(aes(x = "", y = data)) +
geom_boxplot(color="black", fill="green", alpha=0.5) +
theme_ipsum() +
theme(legend.position="none", plot.title = element_text(size=11)) +
ggtitle("Basic boxplot") +
coord_flip() +
xlab("") +
ylab("")
La longitud mínina de un deslizamiento de tierra en Jamaica ha sido 0.21 kilometros; y la menor cantidad de personas afectadas por un deslizamiento es 1088 personas.
library(dplyr)
pais <- subset(df, country_name == "Jamaica")
knitr::kable(head(pais))
| id | date | time | continent_code | country_name | country_code | state | population | city.town | distance | location_description | latitude | longitude | geolocation | hazard_type | landslide_type | landslide_size | trigger | storm_name | injuries | fatalities | source_name | source_link | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 18 | 174 | 8/11/07 | NA | Jamaica | JM | Portland | 14400 | Port Antonio | 7.79027 | 18.1258 | -76.5082 | (18.125800000000002, -76.508200000000002) | Landslide | Landslide | Medium | Rain | NA | NA | Jamaica Gleaner | http://www.jamaica-gleaner.com/gleaner/20070812/lead/lead2.html | |||
| 48 | 304 | 10/12/07 | NA | Jamaica | JM | St. Elizabeth | 1371 | Maggotty | 4.57363 | 18.1257 | -77.7405 | (18.125699999999998, -77.740499999999997) | Landslide | Complex | Medium | Rain | NA | NA | RadioJamaica | http://www.radiojamaica.com/content/view/2039/26/ | |||
| 50 | 314 | 10/17/07 | NA | Jamaica | JM | Saint Thomas | 2382 | Bath | 0.21825 | 17.9500 | -76.3500 | (17.95, -76.349999999999994) | Landslide | Mudslide | Medium | Rain | NA | NA | RadioJamaica | http://www.radiojamaica.com/content/view/2193/26/ | |||
| 54 | 339 | 10/31/07 | NA | Jamaica | JM | Saint Thomas | 2634 | Easington | 6.51940 | 17.9384 | -76.6479 | (17.938400000000001, -76.647900000000007) | Landslide | Landslide | Medium | Tropical cyclone | Tropical Storm Noel | NA | 1 | RadioJamaica | http://www.radiojamaica.com/content/view/2583/26/ | ||
| 55 | 340 | 10/31/07 | NA | Jamaica | JM | Saint Catherine | 4085 | Riversdale | 5.46381 | 18.2152 | -76.9659 | (18.215199999999999, -76.965900000000005) | Landslide | Complex | Medium | Rain | NA | NA | RadioJamaica | http://www.radiojamaica.com/content/view/2933/26/ | |||
| 56 | 341 | 10/31/07 | NA | Jamaica | JM | Saint Andrew | 1088 | Gordon Town | 0.96514 | 18.0370 | -76.7088 | (18.036999999999999, -76.708799999999997) | Landslide | Landslide | Medium | Tropical cyclone | Tropical Storm Noel | NA | NA | Jamaica Observer | http://www.jamaicaobserver.com/news/html/20071101T010000-0500_128916_OBS_DEADLY_RAIN.asp |
library(dplyr)
library(pastecs)
stat.desc(pais$population)
## nbr.val nbr.null nbr.na min max range
## 3.300000e+01 0.000000e+00 0.000000e+00 1.088000e+03 4.475500e+04 4.366700e+04
## sum median mean SE.mean CI.mean.0.95 var
## 2.342270e+05 2.757000e+03 7.097788e+03 1.474547e+03 3.003553e+03 7.175151e+07
## std.dev coef.var
## 8.470626e+03 1.193418e+00
stat.desc(pais$distance)
## nbr.val nbr.null nbr.na min max range
## 33.0000000 0.0000000 0.0000000 0.2182500 10.8446700 10.6264200
## sum median mean SE.mean CI.mean.0.95 var
## 147.1557200 4.4694200 4.4592642 0.5248336 1.0690510 9.0898595
## std.dev coef.var
## 3.0149394 0.6761069
El cuarto percentil con base en la distancia de los deslizamientos, tiene valores dispersos acorde a los demás percentiles; además, no han habído valores atípicos de los deslizamientos en Jamaica.
library(tidyverse)
library(hrbrthemes)
library(viridis)
data<-pais$distance
caja <- data.frame(data)
caja %>% ggplot(aes(x = "", y = data)) +
geom_boxplot(color="black", fill="blue", alpha=0.5) +
theme_ipsum() +
theme(legend.position="none", plot.title = element_text(size=11)) +
ggtitle("Basic boxplot") +
coord_flip() +
xlab("") +
ylab("")
En promedio poblacional en zonas con deslizamientos en Colombia es 222180 personas; mientras que el promedio de la distancia de dichos deslizamientos es 7.62 kilometros.
library(dplyr)
pais <- subset(df, country_name == "Colombia")
knitr::kable(head(pais))
| id | date | time | continent_code | country_name | country_code | state | population | city.town | distance | location_description | latitude | longitude | geolocation | hazard_type | landslide_type | landslide_size | trigger | storm_name | injuries | fatalities | source_name | source_link | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 8 | 77 | 5/21/07 | SA | Colombia | CO | Risaralda | 440118 | Pereira | 0.62022 | 4.8081 | -75.6941 | (4.8080999999999996, -75.694100000000006) | Landslide | Mudslide | Large | Rain | NA | 13 | Reuters - AlertNet.org | http://www.reuters.com/news/video/videoStory?videoId=53594&feedType=RSS&rpc=23 | |||
| 49 | 307 | 10/13/07 | SA | Colombia | CO | Cauca | 9985 | Suárez | 8.46579 | 2.9437 | -76.7719 | (2.9437000000000002, -76.771900000000002) | Landslide | Mudslide | Large | Continuous rain | NA | 24 | Reuters - AlertNet.org | http://www.reuters.com/article/newsOne/idUSN1329387220071013 | |||
| 70 | 397 | 12/19/07 | SA | Colombia | CO | Tolima | 4892 | Ambalema | 6.96130 | 4.8470 | -74.7631 | (4.8470000000000004, -74.763099999999994) | Landslide | Landslide | Large | Rain | NA | NA | Indiamuslims.info | http://www.indiamuslims.info/news/2007/dec/20/eight_people_rescued_colombian_landslide.html | |||
| 103 | 562 | 5/31/08 | SA | Colombia | CO | Antioquia | 1999979 | Medellín | 5.12170 | 6.2746 | -75.6039 | (6.2746000000000004, -75.603899999999996) | Landslide | Complex | Large | Downpour | NA | 27 | http://english.people.com.cn/90001/90777/90852/6422291.html | ||||
| 110 | 605 | 6/24/08 | SA | Colombia | CO | Norte de Santander | 1502 | Hacarí | 0.38844 | 8.3200 | -73.1500 | (8.32, -73.150000000000006) | Landslide | Landslide | Medium | Downpour | NA | 10 | http://news.xinhuanet.com/english/2008-06/25/content_8434589.htm | ||||
| 117 | 644 | 7/14/08 | SA | Colombia | CO | Cundinamarca | 1374 | Quetame | 8.58891 | 4.4100 | -73.8600 | (4.41, -73.86) | Landslide | Landslide | Medium | Downpour | NA | 4 | http://news.xinhuanet.com/english/2008-07/15/content_8548107.htm |
library(dplyr)
library(pastecs)
stat.desc(pais$population)
## nbr.val nbr.null nbr.na min max range
## 9.600000e+01 0.000000e+00 0.000000e+00 1.091000e+03 2.392877e+06 2.391786e+06
## sum median mean SE.mean CI.mean.0.95 var
## 2.132931e+07 9.940500e+03 2.221804e+05 5.633984e+04 1.118487e+05 3.047210e+11
## std.dev coef.var
## 5.520154e+05 2.484538e+00
stat.desc(pais$distance)
## nbr.val nbr.null nbr.na min max range
## 96.0000000 0.0000000 0.0000000 0.0000300 51.8412500 51.8412200
## sum median mean SE.mean CI.mean.0.95 var
## 731.9660900 5.0115650 7.6246468 0.8623174 1.7119165 71.3847624
## std.dev coef.var
## 8.4489504 1.1081104
Para Colombia, hay seis datos atípicos sobre la magnitud de los deslizamientos, todos hacia valores mayores al último cuartil (hacia la derecha), y de distancias no tan uniformes.
library(tidyverse)
library(hrbrthemes)
library(viridis)
data<-pais$distance
caja <- data.frame(data)
caja %>% ggplot(aes(x = "", y = data)) +
geom_boxplot(color="black", fill="Red", alpha=0.5) +
theme_ipsum() +
theme(legend.position="none", plot.title = element_text(size=11)) +
ggtitle("Basic boxplot") +
coord_flip() +
xlab("") +
ylab("")
En Ecuador, el tamaño máximo de la población donde ha ocurrido un deslizamiento resgistrado en esta base de datos es 1399814 personas. Por otro lado, el mayor deslizamiento tuvo una longitud de 50.21 kilometros.
library(dplyr)
pais <- subset(df, country_name == "Ecuador")
knitr::kable(head(pais))
| id | date | time | continent_code | country_name | country_code | state | population | city.town | distance | location_description | latitude | longitude | geolocation | hazard_type | landslide_type | landslide_size | trigger | storm_name | injuries | fatalities | source_name | source_link | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 9 | 105 | 6/27/07 | SA | Ecuador | EC | Zamora-Chinchipe | 15276 | Zamora | 0.47714 | -4.0650 | -78.9510 | (-4.0650000000000004, -78.950999999999993) | Landslide | Landslide | Medium | Downpour | NA | NA | Red Cross - Field reports | https://www-secure.ifrc.org/dmis/prepare/view_report.asp?ReportID=2908 | |||
| 10 | 106 | 6/27/07 | SA | Ecuador | EC | Loja | 117796 | Loja | 0.35649 | -3.9900 | -79.2050 | (-3.99, -79.204999999999998) | Landslide | Landslide | Medium | Downpour | NA | NA | Red Cross - Field reports | https://www-secure.ifrc.org/dmis/prepare/view_report.asp?ReportID=2908 | |||
| 11 | 107 | 6/27/07 | SA | Ecuador | EC | Pichincha | 5114 | Sangolquí | 33.94603 | -0.3560 | -78.1480 | (-0.35599999999999998, -78.147999999999996) | Landslide | Landslide | Medium | Downpour | NA | NA | Red Cross - Field reports | https://www-secure.ifrc.org/dmis/prepare/view_report.asp?ReportID=2908 | |||
| 78 | 468 | 2/28/08 | SA | Ecuador | EC | Napo | 7309 | Archidona | 50.21741 | -0.4635 | -77.8928 | (-0.46350000000000002, -77.892799999999994) | Landslide | Landslide | Medium | Rain | NA | 7 | http://english.aljazeera.net/NR/exeres/868843D7-B211-4DE5-AFBE-31C29CF79C5A.htm | ||||
| 87 | 489 | 4/1/08 | SA | Ecuador | EC | Pichincha | 1399814 | Quito | 1.56942 | -0.2196 | -78.5347 | (-0.21959999999999999, -78.534700000000001) | Landslide | Landslide | Medium | Rain | NA | NA | http://www.plenglish.com/Article.asp?ID=%7B39BA85A0-5900-4A4A-A329-818B3FC61EA1%7D&language=EN | ||||
| 218 | 1186 | 12/28/09 | Night | SA | Ecuador | EC | Santo Domingo de los Tsáchilas | 200421 | Santo Domingo de los Colorados | 1.16036 | Unknown | -0.3152 | -78.9724 | (-0.31519999999999998, -78.972399999999993) | Landslide | Mudslide | Medium | Downpour | 5 | 3 | Latin American Herald Tribune | http://www.laht.com/article.asp?ArticleId=327938&CategoryId=14089 |
library(dplyr)
library(pastecs)
stat.desc(pais$population)
## nbr.val nbr.null nbr.na min max range
## 3.000000e+01 1.000000e+00 0.000000e+00 0.000000e+00 1.399814e+06 1.399814e+06
## sum median mean SE.mean CI.mean.0.95 var
## 8.599781e+06 2.574200e+04 2.866594e+05 9.355366e+04 1.913387e+05 2.625686e+11
## std.dev coef.var
## 5.124145e+05 1.787538e+00
stat.desc(pais$distance)
## nbr.val nbr.null nbr.na min max range
## 30.0000000 0.0000000 0.0000000 0.3564900 50.2174100 49.8609200
## sum median mean SE.mean CI.mean.0.95 var
## 515.4786400 14.7777150 17.1826213 2.6348903 5.3889557 208.2794055
## std.dev coef.var
## 14.4318885 0.8399119
Para las longitudes de los deslizamientos en Ecuador no son tan dispersos, con una mediana de 14.77 kilometros; y cuartiles no tan dispersos, a excepción del último.
library(tidyverse)
library(hrbrthemes)
library(viridis)
data<-pais$distance
caja <- data.frame(data)
caja %>% ggplot(aes(x = "", y = data)) +
geom_boxplot(color="black", fill="red", alpha=0.5) +
theme_ipsum() +
theme(legend.position="none", plot.title = element_text(size=11)) +
ggtitle("Basic boxplot") +
coord_flip() +
xlab("") +
ylab("")
En conclusión, se pudo analizar el deslizamiento de suelos en cada uno de estos países de América y se crearon gráficas a partir del software R estudio en el que se logró hacer el análisis por medio de las mismas y diversas tablas con el fin de poder organizar de una mejor manera la información y fuera más clara. Se logró el objetivo del informe el cual pone en práctica los conocimientos como lo son el diagrama de caja y bigotes, tablas de frecuencia simples y agrupadas, conceptos como media, mediana, moda y rango. Además, del desarrollo de habilidades fundamentales para nuestra vida profesional.