Skip to content

Instantly share code, notes, and snippets.

@MJacobs1985
Last active February 21, 2022 13:37
Show Gist options
  • Select an option

  • Save MJacobs1985/d847f6398bb881df1316d82ece051817 to your computer and use it in GitHub Desktop.

Select an option

Save MJacobs1985/d847f6398bb881df1316d82ece051817 to your computer and use it in GitHub Desktop.
ggplot(day, aes(x=date_interval))+
geom_point(aes(y=egg_count/animals_actual, colour=as.factor(location_identification)))+
theme_bw()+ theme(legend.position="none")
ggplot(day, aes(x=date_interval))+
geom_point(aes(y=(egg_count*average_weight_eggs)/1000000,
colour=as.factor(location_identification)))+
theme_bw()+ theme(legend.position="none")
ggplot(day, aes(x=date_interval))+
geom_point(aes(y=feed_provided_cum), col="orange")+
geom_point(aes(y=water_provided_cum), col="blue")+
theme_bw()+
facet_wrap(~location_identification)
ggplot(day, aes(x=date_interval))+
geom_point(aes(y=feed_provided), col="orange")+
geom_point(aes(y=water_provided), col="blue")+
theme_bw()+
facet_wrap(~location_identification)
ggplot(day, aes(x=date_interval))+
geom_point(aes(y=pa_neg_act), col="orange")+
theme_bw()+
facet_wrap(~location_identification)
ggplot(day, aes(x=date_interval))+
geom_point(aes(y=t_min_out), col="blue")+
geom_point(aes(y=t_max_out), col="red")+
geom_point(aes(y=t_act_out), col="yellow")+
theme_bw()+
facet_wrap(~location_identification)
ggplot(day, aes(x=date_interval))+
geom_point(aes(y=rh_act_in), col="blue")+
theme_bw()+
facet_wrap(~location_identification)
ggplot(day, aes(x=date_interval))+
geom_point(aes(y=eggs_first_quality_cum), col="orange")+
theme_bw()+
facet_wrap(~location_identification)
ggplot(day, aes(x=date_interval))+
geom_point(aes(y=feed_provided), col="orange")+
geom_point(aes(y=water_provided), col="blue")+
theme_bw()+
facet_wrap(~location_identification)
g1<-ggplot(newdf, aes(x = date_interval_day)) +
geom_line(aes(y = Leg_perc_dag), col="red") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Leg percentage dag")
g2<-ggplot(newdf, aes(x = date_interval_day)) +
geom_line(aes(y = Eieren), col="red") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eieren")
g3<-ggplot(newdf, aes(x = date_interval_day)) +
geom_line(aes(y = Hennen), col="red") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Hennen")
grid.arrange(g1,g2,g3,
ncol=1)
g1<-ggplot(newdf, aes(x = date_interval_day)) +
geom_line(aes(y = Leg_perc_dag), col="red") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eimassa dag")
g2<-ggplot(newdf, aes(x = date_interval_day)) +
geom_line(aes(y = Eimassa_dag), col="red") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eimassa dag")
g3<-ggplot(newdf, aes(x = date_interval_week)) +
geom_line(aes(y = Week_Eimassa), col="red") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eimassa week")
g4<-ggplot(newdf, aes(x = date_interval_week)) +
geom_line(aes(y = Eimassa_cum), col="red") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eigmassa cumulatief")
grid.arrange(g1,g2,
g3,g4,
ncol=1)
g1<-ggplot(newdf, aes(x = date_interval_week)) +
geom_line(aes(y = Totaal_ei_cum), col="blue") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eiggewicht week absoluut")
g2<-ggplot(newdf, aes(x = date_interval_week)) +
geom_line(aes(y = Totaal_ei_kg_cum), col="seagreen") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eiggewicht week gemiddeld incrementeel")
g3<-ggplot(newdf, aes(x = date_interval_week)) +
geom_line(aes(y = Uitval_hennen_cum), col="orange") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eiggewicht week gemiddeld totaal")
grid.arrange(g1,g2,g3,ncol=1)
g1<-ggplot(newdf, aes(x = date_interval_day)) +
geom_line(aes(y = Eiggewicht_dag), col="red") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eiggewicht dag")
g2<-ggplot(newdf, aes(x = date_interval_week)) +
geom_line(aes(y = Eiggewicht_week_abs), col="blue") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eiggewicht week absoluut")
g3<-ggplot(newdf, aes(x = date_interval_week)) +
geom_line(aes(y = Eiggewicht_week_gem_incr), col="seagreen") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eiggewicht week gemiddeld incrementeel")
g4<-ggplot(newdf, aes(x = date_interval_week)) +
geom_line(aes(y = Eiggewicht_week_gem_totaal), col="orange") +
facet_wrap(~location_identification, scales="free") +
theme_bw()+
labs(x="Dag", y="Eiggewicht week gemiddeld totaal")
grid.arrange(g1,g2,g3,g4,ncol=1)
g1<-ggplot(newdf, aes(x = date_interval_day)) +
geom_line( aes(y = Totaal_ei_week_tel), col="red")+
facet_wrap(~location_identification, scales="free") +
theme_bw()
g2<-ggplot(newdf, aes(x = date_interval_day)) +
geom_line( aes(y = Totaal_twee_ei_week_tel), col="blue") +
facet_wrap(~location_identification, scales="free") +
theme_bw()
g3<-ggplot(newdf, aes(x = date_interval_day)) +
geom_line( aes(y = Totaal_twee_ei_week_perc), col="seagreen") +
facet_wrap(~location_identification, scales="free") +
theme_bw()
grid.arrange(g1,g2,g3,ncol=1)
g1<-ggplot(newdf, aes(x = date_interval_day)) +
geom_line(aes(y = log(Eiggewicht_dag)), col="red") +
facet_wrap(~location_identification) +
theme_bw()
g2<-ggplot(day, aes(x = date_interval_day)) +
geom_line(aes(y = log(average_weight_eggs)), col="red") +
facet_wrap(~location_identification) +
theme_bw()
grid.arrange(g1,g2,ncol=1)
newdf %>%
group_by(location_identification, date_interval_day) %>%
summarise_by_time(date_interval_day,
.by = "day",
Leg_perc_dag = Leg_perc_dag,
Leg_perc_week = max(Leg_perc_week))%>%
ggplot(., aes(x = date_interval_day)) +
geom_line(aes(y = Leg_perc_dag), col="red") +
geom_point(aes(y = Leg_perc_week), col="blue") +
facet_wrap(~location_identification) +
theme_bw()
ggplot(day, aes(x = date_interval)) +
geom_line(aes(y = log(average_weight))) +
geom_line(aes(y = log(water_provided))) +
geom_line(aes(y = log(feed_provided))) +
geom_line(aes(y = log(egg_count))) +
facet_wrap(~location_identification) +
theme_bw()
ggplot(hour, aes(x = date_interval)) +
geom_line(aes(y = log(average_weight))) +
geom_line(aes(y = log(water_provided))) +
geom_line(aes(y = log(feed_provided))) +
geom_line(aes(y = log(egg_count))) +
facet_wrap(~lcn_id) +
theme_bw()
ggplot(day, aes(x = date_interval)) +
geom_line(aes(y = t_min_in)) +
geom_line(aes(y = t_max_in)) +
geom_line(aes(y = t_min_out)) +
geom_line(aes(y = t_max_out)) +
facet_wrap(~lcn_id) +
theme_bw()
ggplot(hour, aes(x = date_interval)) +
geom_line(aes(y = t_min_in)) +
geom_line(aes(y = t_max_in)) +
geom_line(aes(y = t_min_out)) +
geom_line(aes(y = t_max_out)) +
facet_wrap(~lcn_id) +
ylim(-10, 35) +
theme_bw()
ggplot(day, aes(x = date_interval)) +
geom_point(aes(y = egg_count, col = as.factor(location_identification))) +
facet_wrap(~location_identification) +
theme_bw()
ggplot(day, aes(x = date_interval)) +
geom_point(aes(y = egg_cum, col = as.factor(location_identification))) +
facet_wrap(~location_identification) +
theme_bw()
g1 <- ggplot(day, aes(x = date_interval)) +
geom_point(aes(y = average_weight_eggs)) +
facet_wrap(~lcn_id) +
theme_bw()
g2 <- ggplot(day, aes(x = date_interval)) +
geom_point(aes(y = eggs_first_quality)) +
geom_point(aes(y = eggs_second_quality)) +
facet_wrap(~lcn_id) +
theme_bw()
grid.arrange(g1, g2)
ggplot(day)+
geom_density(aes(x=egg_count/animals_actual,
colour=as.factor(location_identification)))+
theme_bw()+ theme(legend.position="none")
ggplot(day)+
geom_point(aes(x=egg_count, y=animals_actual,
colour=as.factor(location_identification),
size=feed_provided), alpha=0.5)+
theme_bw()+
facet_wrap(~location_identification, scales="free")+
theme(legend.position="none")
ggplot(day)+
geom_point(aes(x=egg_count, y=animals_actual,
colour=as.factor(location_identification),
size=average_weight_eggs), alpha=0.5)+
theme_bw()+
facet_wrap(~location_identification, scales="free")+
theme(legend.position="none")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment