library(readr)
completedata <- read_csv("C:/Users/Taiyyab Ali/Desktop/R language/completedata.csv")
## Parsed with column specification:
## cols(
## .default = col_double(),
## Date = col_character(),
## dummy = col_integer(),
## timevar = col_integer()
## )
## See spec(...) for full column specifications.
View(completedata)
plot.ts(completedata$CO2conc, col = 28, xlab ="Time 2001-2017" ,ylab ="Carbon Monoxide conc. in ppm")

plot.ts(completedata$NO2conc, col = 51, xlab ="Time 2001-2017" ,ylab ="Nitrogendioxide conc. in ppb")

plot.ts(completedata$Noconc, col = 84, xlab ="Time 2001-2017" ,ylab ="Nitric oxide conc. in ppb")

plot.ts(completedata$PM10conc, col = 18, xlab ="Time 2001-2017" ,ylab ="PM10 Particulates")

plot.ts(completedata$PM2.5conc, col = 35, xlab ="Time 2001-2017" ,ylab ="PM2.5 Particulates")

plot.ts(completedata$O3conc, col = 28, xlab ="Time 2001-2017" ,ylab ="Ozone conc. in ppb")

plot.ts(completedata$SO2conc, col = 27, xlab ="Time 2001-2017" ,ylab ="Sulphur dioxide conc. in ppb")

plot.ts(completedata$Raincm, col = 132, xlab ="Time 2001-2017" ,ylab ="Rainfall in mm")

plot.ts(completedata$Pressure, col = 132, xlab ="Time 2001-2017" ,ylab ="Barometric pressure")

plot.ts(completedata$Humid, col = 131, xlab ="Time 2001-2017" ,ylab ="Relative Humidity")

plot.ts(completedata$Solarrad, col = "orange", xlab ="Time 2001-2017" ,ylab ="Solar radiation")

plot.ts(completedata$Temp0C, col = "red", xlab ="Time 2001-2017" ,ylab ="Temperature in degree celsius")

plot.ts(completedata$Windspeed, col = "blue", xlab ="Time 2001-2017" ,ylab ="Windspeed in m/s")

plot.ts(completedata$Winddirct, col = "blue", xlab ="Time 2001-2017" ,ylab ="Winddirection in 360 degree scale")

library(corrgram)
corrgram(completedata[ ,c(2:16)],order = TRUE,upper.panel = panel.pie, lower.panel = panel.shade,text.panel = panel.txt, main= "corrgram plot of Pollutant conc. with relative to each other",diag.panel = panel.minmax)

library(psych)
describe(completedata[ ,c(2:15)])[ ,c(2,3,4,5,8,9)]
## n mean sd median min max
## CO2conc 6209 0.28 0.22 0.22 0.00 2.47
## NO2conc 6209 26.33 8.18 25.47 6.75 74.04
## Noconc 6209 34.62 24.83 28.21 4.15 290.21
## PM10conc 6209 25.52 11.43 22.58 4.97 96.78
## PM2.5conc 5147 16.16 10.62 12.68 2.25 92.90
## O3conc 6209 17.16 8.41 17.29 0.21 59.00
## SO2conc 6209 1.48 1.07 1.19 -0.09 10.42
## Raincm 6157 0.08 0.36 0.00 0.00 9.20
## Pressure 6201 1010.95 11.37 1012.00 837.67 1039.12
## Humid 6187 74.78 9.87 75.50 43.50 100.00
## Solarrad 6085 83.48 63.91 67.50 1.75 300.50
## Temp0C 6206 12.17 5.72 12.18 -3.11 28.75
## Windspeed 6209 1.46 0.73 1.33 0.17 5.03
## Winddirct 6209 193.45 68.12 209.30 18.29 336.10