-
Notifications
You must be signed in to change notification settings - Fork 0
/
Stationsgruppen.R
65 lines (56 loc) · 2.67 KB
/
Stationsgruppen.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
library(tidyverse)
library(lubridate)
load("BW_stations_NO2_tbl.RData")
BW_stations_NO2_tbl %>% head()
# Teillisten erstellen
station_names <- c("Alb","Brn","Can","Egg","Frei","Friedri","Heid","Heil","Kar",
"Lbg_4","Lbg_Friedr","Man","Nck","Odw","Rt_","Rtl","Sws")
rurallist <- c ("Sws","Alb","Odw")
traficlist <- c("Nck","Lbg_Friedr","Rtl")
urbanlist <- c ("Brn","Can","Egg","Frei","Friedri","Heid","Heil","Kar","Lbg_4","Man","Rt_")
# Randwerte Odw eliminieren
BW_stations_NO2_tbl %>% filter(name == "Odw") %>% head()
BW_rural_NO2_tbl <- BW_stations_NO2_tbl %>% filter (name %in% rurallist)
BW_trafic_NO2_tbl <-BW_stations_NO2_tbl %>% filter (name %in% traficlist)
BW_urban_NO2_tbl <- BW_stations_NO2_tbl %>% filter (name %in% urbanlist)
#================================================================
save(BW_stations_NO2_tbl, file = "BW_station_NO2.RData")
save(BW_rural_NO2_tbl, file = "rural_NO2.RData")
save(BW_trafic_NO2_tbl, file = "trafic_NO2.RData")
save(BW_urban_NO2_tbl, file = "urban_NO2_tbl")
# Test- overview
ggplot(BW_stations_NO2_tbl%>% filter (datetime > ymd("2014-01-01")), aes ( x = datetime, y = NO2))+
geom_smooth(method = "lm",aes(color = name))+
geom_smooth(method = "auto",aes(col =name))+
ggtitle ( "NO2 Trends 17 Stationen
2014 bis 2020",
subtitle = "Mittelwerte und Regression")+
labs(x ="", y= "NO2[ug/m3]")
ggplot(BW_rural_NO2_tbl%>% filter(datetime > ymd("2001-02-01")), aes ( x = datetime, y = NO2))+
geom_smooth(method = "lm",aes(color = name))+
geom_smooth(method = "auto",aes(col =name))+
ggtitle ( "NO2 Trends laendl Hintergrund
2001/4 bis 2020",
subtitle = "Mittelwerte und Regression")+
labs(x ="", y= "NO2[μg/m3]")
ggplot(BW_trafic_NO2_tbl, aes ( x = datetime, y = NO2))+
geom_smooth(method = "lm",aes(color = name))+
geom_smooth(method = "auto",aes(col =name))+
ggtitle ( "NO2 Trends verkehrsnah",
subtitle = "Mittelwerte und Regression")+
labs(x ="", y= "NO2[μg/m3]")
ggplot(BW_urban_NO2_tbl, aes ( x = datetime, y = NO2))+
geom_smooth(method = "lm",aes(color = name))+
geom_smooth(method = "auto",aes(col =name))+
ggtitle ( "NO2 Trends staedt. Hintergrund",
subtitle = "Mittelwerte und Regression")+
labs(x ="", y= "NO2[μg/m3]")
BW_urban_NO2_tbl%>% filter (name != "Heid") %>% filter(name != "Lbg_4")%>%
ggplot( aes ( x = datetime, y = NO2))+
geom_smooth(method = "lm",aes(color = name))+
#geom_smooth(method = "auto",aes(col =name))+
ggtitle ( "NO2 Trends staedt. Hintergrund
Mittelwerte und Regression",
subtitle = " Bernhausen,Bad Cannstatt,Eggenstein,
Freiburg, Friedrichshafen,Heilbronn,Reutlingen")+
labs(x ="", y= "NO2[μg/m3]")