Skip to content

Instantly share code, notes, and snippets.

@mmajogn
Created February 27, 2015 05:57
Show Gist options
  • Save mmajogn/43a16333edab48c501c5 to your computer and use it in GitHub Desktop.
Save mmajogn/43a16333edab48c501c5 to your computer and use it in GitHub Desktop.
#Temperatura que se siente#
par(mfrow=c(2,4))
data%>% filter(season==1) %>% select(atemp,cnt) %>%plot(ylab="Demanda", xlab="Feeling Temperature", main="Primavera")
data%>% filter(season==1) %>% select(atemp,cnt) %>% max()
data %>% filter(cnt == max(cnt)) %>% select(atemp)
points(0.505046,7836,col="red")
text(0.3,7836,"Demanda mas alta")
#cnt:7836, atemp:0.505046#
data%>% filter(season==2) %>% select(atemp,cnt) %>% plot(ylab="Demanda", xlab="Feeling Temperature", main="Verano")
data%>% filter(season==2) %>% select(atemp,cnt) %>% max()
data %>% filter(cnt == max(cnt)) %>% select(atemp)
points(0.570067,8362,col="red")
text(0.45,8362,"Demanda mas alta")
#cnt:8362, atemp:0.570067#
data%>% filter(season==3) %>% select(atemp,cnt) %>% plot(ylab="Demanda", xlab="Feeling Temperature", main="Otono")
data%>% filter(season==3) %>% select(atemp,cnt) %>% max()
data %>% filter(cnt == max(cnt)) %>% select(atemp)
points(0.585867,8714,col="red")
text(0.45,8714,"Demanda mas alta")
#cnt:8714, atemp:0.585867#
data%>% filter(season==4) %>% select(atemp,cnt) %>% plot(ylab="Demanda", xlab="Feeling Temperature", main="Invierno")
data%>% filter(season==4) %>% select(atemp,cnt) %>% max()
data %>% filter(cnt == max(cnt)) %>% select(atemp)
points(0.530296,8555,col="red")
text(0.45,8555,"Demanda mas alta")
# cnt: 8555, atemp: 0.530296#
#Humedad en el ambiente#
data%>% filter(season==1) %>% select(hum,cnt) %>%plot(ylab="Demanda", xlab="Normalized humidity", main="Primavera")
data%>% filter(season==1) %>% select(hum,cnt) %>% max()
data %>% filter(cnt == max(cnt)) %>% select(hum)
points(0.755833,7836,col="red")
text(0.75,7500,"Demanda mas alta")
# cnt:7836, hum:0.755833#
data%>% filter(season==2) %>% select(hum,cnt) %>%plot(ylab="Demanda", xlab="Normalized humidity", main="Verano")
data%>% filter(season==2) %>% select(hum,cnt) %>% max()
data %>% filter(cnt == max(cnt)) %>% select(hum)
points(0.694167,8362,col="red")
text(0.65,8000,"Demanda mas alta")
# cnt:8362, hum:0.694167#
data%>% filter(season==3) %>% select(hum,cnt) %>%plot(ylab="Demanda", xlab="Normalized humidity", main="Otono")
data%>% filter(season==3) %>% select(hum,cnt) %>% max()
data %>% filter(cnt == max(cnt)) %>% select(hum)
points(0.501667,8714,col="red")
text(0.65,8600,"Demanda mas alta")
# cnt:8714 , hum: 0.501667#
data%>% filter(season==4) %>% select(hum,cnt) %>% plot(ylab="Demanda", xlab="Normalized humidity", main="Invierno")
data%>% filter(season==4) %>% select (hum, cnt) %>% max()
data %>% filter(cnt == max(cnt)) %>% select(hum)
points(0.542917,8555,col="red")
text(0.7,8714,"Demanda mas alta")
# cnt:8555, hum:0.542917#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment