РМ2.5 (Particulate Matter2.5) гэдэг нь 2.5микрограммаас бага диаметртэй тоосонцрыг хэлнэ. Үүнийг уушгинд нэвтэрдэг тоосонцор гэдэг.Энэ тоосонцор нь их хэмжээний хорт бодис агуулахаас гадна агаарт урт хугацааны туршид тогтож хол нүүдэллэдэг учраас амьсгалын замаар дамжин уушгины агаарын солилцоонд сөрөг нөлөө үзүүлдэг бөгөөд бронхит, астма үүсгэхээс гадна зүрх судас болон цусны эргэлтийн тогтолцооны өвчний гол шалтгаан болдог.
PM10 (Particulate Matter10) нь 10 микроноос бага диаметртэй тоосонцорыг хэлнэ. Үүнийг амьсгалыг дагаж ордог тоосонцор гэж нэрлэдэг байна. Тус тоосонцор нь агаарт урт хугацааны туршид дэгдэмхий байдлаар орших чадвартай бөгөөд хүний биед амьсгалын замаар нэвтэрч өвчин үүсгэнэ. Агаарын чанарын үзүүлэлт, зэрэглэл агууламж Агаарын чанарын үзүүлэлтийг бид ихэвчлэн AQI-аар тодорхойлдог. Агаарын чанарын хэмжээсгүй индексийн тоон тодорхойлолт нь зургаан үндсэн бохирдуулах бодисын жишиг концентрацийг тооцож тогтоодог. Үүнд нарийн тоосонцор (PM2.5), амьсгалын замын тоосжилт (PM10), хүхрийн давхар исэл, азотын давхар исэл, озон, нүүрстөрөгчийн дутуу ислүүд орно.
data <- read.csv("~/Downloads/Ulaanbaatar Particulate Matter Sensor Data.csv")
attach(data)
library(ggplot2)
library(dplyr)
library(lubridate)
library(tabplot)
library(tidyquant)
library(ggthemes)
library(grid)
library(gridExtra)
library(magrittr)
library(forecast)Нийт 12 нь байршлын хувьд 2015 оноос 2018 оныг хүртэл нийт 12 хувьсагч 823,925 ширхэг хугацаан цуваан түүвэр бүхий big дата мэдээлэлд боловсруулалт хийж дараах үр дүнгүүдийг гаргалаа.
Монгол улсын 12 байршлын хувьд нийт 823,925 ширхэг хугацаан цуваан түүвэр бүхий өгөгдлийг доорх графикаар харуулав. Графикаас харахад улаанбаатар хотын хувьд PM10 агаарын бохирдол PM 2.5 агаарын бохирдолоос илүү их байгаа нь харагдаж байна.
data<-filter(data,data$value>0)
t<-data[,2:4]
tableplot(t)df <- data %>%
group_by(parameter,location) %>%
summarise(counts = n())
k<-ggplot(df,aes(y=counts, x=location))+geom_bar(stat = "identity",aes(fill=parameter),position = position_dodge(0.8))
k+coord_polar()+scale_fill_brewer(palette="Set1")+theme_bw()+theme(legend.position = "bottom")Өгөгдлийн date утгыг шинжилгээ хийхийн тулд substr, as.POSIXct функцуудийг ашилглан он сар өдөр минутыг улаанбаатарын цагын бүслүүрт шилжүүлэв.
Улаанбаатар хотын 12 байршлын pm10 болон pm 2.5-ын агаарын чанарын индексийг хугацаан цуваан графикаар дүрслэн харуулав.
ggplot(k, aes(y=value,x=date,color=parameter))+geom_line()+facet_wrap(~location,nrow = 3)+scale_y_continuous(breaks = seq(-1000,8000,by=1000)) +scale_colour_brewer(palette = "Set1")+theme_tq()+theme(legend.position="bottom")Улаанбаатар хотын 12 байршлын 3 жилийн тоон мэдээллийг ойлгомжтой харуулах үүднээс сар бүрийн хувьд агаарын бохирдлын индексийн дундаж утгыг тооцон ggseasonal функц ашиглан графикаар харуулав.
##
z<-filter(k,k$location=="Tolgoit",k$parameter=="pm25")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 8), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Tolgoit pm2.5")##
z<-filter(k,k$location=="Tolgoit",k$parameter=="pm10")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 8), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Tolgoit pm10")z<-filter(k,k$location=="Amgalan",k$parameter=="pm10")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Amgalan pm10")##
z<-filter(k,k$location=="Amgalan",k$parameter=="pm25")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Amgalan pm2.5")z<-filter(k,k$location=="Baruun 4 zam",k$parameter=="pm10")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Baruun 4 zam pm10")z<-filter(k,k$location=="Baruun 4 zam",k$parameter=="pm25")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Baruun 4 zam pm2.5")z<-filter(k,k$location=="Bayankhoshuu",k$parameter=="pm10")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2016, 5), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Bayankhoshuu pm10")grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Bayankhoshuu pm10")##
z<-filter(k,k$location=="Bayankhoshuu",k$parameter=="pm25")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2016, 5), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Bayankhoshuu pm2.5")z<-filter(k,k$location=="Bukhiin urguu",k$parameter=="pm10")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Bukhiin urguu pm10")z<-filter(k,k$location=="Bukhiin urguu",k$parameter=="pm25")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Bukhiin urguu pm2.5")z<-filter(k,k$location=="MNB",k$parameter=="pm10")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: MNB pm10")z<-filter(k,k$location=="MNB",k$parameter=="pm25")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: MNB pm2.5")z<-filter(k,k$location=="Nisekh",k$parameter=="pm10")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Nisekh pm10")z<-filter(k,k$location=="Nisekh",k$parameter=="pm25")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Nisekh pm2.5")z<-filter(k,k$location=="100 ail",k$parameter=="pm10")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: 100 ail pm10")z<-filter(k,k$location=="Misheel expo",k$parameter=="pm10")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Misheel expo pm10")z<-filter(k,k$location=="Mongol gazar",k$parameter=="pm10")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 9), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: Mongol gazar pm10")z<-filter(k,k$location=="US Diplomatic Post: Ulaanbaatar",k$parameter=="pm25")
mt<-month(z$date)
year<-format(z$date,format="%y")
nm<- aggregate( z$value ~ mt + year ,z$date, mean )
nm$mt<-month.abb[nm$mt]
year <- ts(nm$`z$value`, start=c(2015, 12), freq=12)
grid.arrange(ggseasonplot(year)+theme_tq(),ggseasonplot(year,polar = TRUE)+theme_tq(),ncol=2, top="Seasonal plot: US Diplomatic Post: Ulaanbaatar pm2.5")