Introducción
.
Antecedentes
.
Teoría
¿Qué es la calidad del aire?
¿Para qué sirve medir la calidad del aire?
\[ \begin{array}{l|l|l|c} \text{Categoría}& \text{Intervalo} & \text{Mensaje}& \text{Significado} \\ \hline BUENA & \text{0-50} & \text{Sin riesgo} & \text{La cantidad de aire es satisfactoria y existe poco o ningún riesgo para la salud.}\\ \hline REGULAR & \text{51-100} & \text{Aceptable} & \text{La calidad de aire es aceptable, sin embargo, en el caso de algunos contaminantes, las personas que son inusualmente sensibles, pueden presentar síntomas moderados} \\ \hline MALA & \text{101-150} & \text{Dañina para la salud de los grupos sensibles} & \text{Quienes pertenecen a los grupos sensibles pueden experimentar efectos en la salud}\\ \hline MUY MALA & \text{151-200} & \text{Dañina a la salud} & \text{Todos pueden experimentar efectos en la salud; quienes pertenecen a los grupos sensibles pueden experimentar efectos graves en la salud}\\ \hline EXTREMADAMENTE MALA & \text{>200} & \text{Muy dañina a la salud} & \text{Representa una condición de emergencia. Toda la población tiene probabilidades de ser aafectada}\\ \hline \end{array} \]
¿Qué es la troposfera?
¿Cuáles son los principales contaminantes del aire?
• Óxidos de azufre (SOx) • Óxidos de nitrógeno (NOx) • Monóxido de Carbono • Dióxido de Carbono • Gas metano (CH4) • Hidrocarburos
¿Qué es la movilidad urbana?
Datos
Librerías y paquetes
setwd("~/EAMJ1130/u1a13") #Directorio de trabajo
library(pacman)
p_load("base64enc", "htmltools", "mime", "xfun", "prettydoc","readr", "knitr","DT","dplyr", "ggplot2","plotly", "gganimate","gifski","scales")library(prettydoc) #para formato de documentos
library(readr) #para leer datos
library(DT)
library(readxl)
datos <- read_excel("Aire.xlsx") #importar datos- Importación de datos
library(prettydoc) #formato de documentos
library(readr) #leer datos
library(DT)
library(readxl)
periodo <- read_excel("periodo.xlsx")
View(periodo)
class(periodo)## [1] "tbl_df" "tbl" "data.frame"
head(periodo)## # A tibble: 6 x 3
## Fecha Temperatura Humedad
## <chr> <chr> <chr>
## 1 2021-03-10 00 18,47 32,84
## 2 2021-03-10 01 17,64 35,7
## 3 2021-03-10 02 17,17 32,96
## 4 2021-03-10 03 14,93 31,28
## 5 2021-03-10 04 13,54 35,92
## 6 2021-03-10 05 12,89 36,77
Visualizar datos
Tabla
datatable(periodo)##Tabla
datatable(datos)Figura : Periodo de Temperatura en el aire (Hermosillo, 2020).
library(readxl)
library(scales)
periodo <- read_excel("periodo.xlsx")
Pest <- ggplot(data = periodo) +
geom_line(aes(Fecha, Temperatura, colour="Temperatura"), color= "mediumorchid4") +
xlab("Fechas") +
ylab("Temperatura") +
ggtitle("Periodo 2021-03-12 a 2021-03-16") +
theme_linedraw()
geom_point## function (mapping = NULL, data = NULL, stat = "identity", position = "identity",
## ..., na.rm = FALSE, show.legend = NA, inherit.aes = TRUE)
## {
## layer(data = data, mapping = mapping, stat = stat, geom = GeomPoint,
## position = position, show.legend = show.legend, inherit.aes = inherit.aes,
## params = list(na.rm = na.rm, ...))
## }
## <bytecode: 0x00000000126a7f48>
## <environment: namespace:ggplot2>
scale_y_continuous(labels = comma)## <ScaleContinuousPosition>
## Range:
## Limits: 0 -- 1
ggplotly(Pest)Figura : Concentración de ozono (O3) en el aire (Hermosillo, 2020).
library(readxl)
library(scales)
Aire <- read_excel("Aire.xlsx")
Pest <- ggplot(data = Aire) +
geom_line(aes(Fecha, O3, colour="O3"), color= "mediumorchid4") +
xlab("Fecha") +
ylab("Concentración de O3 (ppm)") +
ggtitle("Concentración de Ozono en Hermosillo 2020") +
theme_linedraw()
geom_point## function (mapping = NULL, data = NULL, stat = "identity", position = "identity",
## ..., na.rm = FALSE, show.legend = NA, inherit.aes = TRUE)
## {
## layer(data = data, mapping = mapping, stat = stat, geom = GeomPoint,
## position = position, show.legend = show.legend, inherit.aes = inherit.aes,
## params = list(na.rm = na.rm, ...))
## }
## <bytecode: 0x00000000126a7f48>
## <environment: namespace:ggplot2>
scale_y_continuous(labels = comma)## <ScaleContinuousPosition>
## Range:
## Limits: 0 -- 1
ggplotly(Pest)periodo <- read.csv("~/EAMJ1130/u1a13/periodo.csv")
View(periodo)setwd("~/EAMJ1130/u1a13") #Directorio de trabajo
library(pacman) #Para importar la biblioteca "pacman"
p_load("base64enc", "htmltools", "mime", "xfun", "prettydoc","readr", "knitr","DT","dplyr", "ggplot2","plotly", "gganimate","gifski","scales")Conclusión
.