forked from austinwpearce/SoilTestCocaCola
-
Notifications
You must be signed in to change notification settings - Fork 0
/
other_ag_datasets.R
56 lines (47 loc) · 1.46 KB
/
other_ag_datasets.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
#
head(agridat::engelstad.nitro) # QP
crop <- agridat::engelstad.nitro %>%
rename(x = nitro, y = yield) %>%
group_by(x) %>%
summarise(y = mean(y)) %>%
ungroup()
crop %>%
ggplot(aes(x, y, color = y)) +
geom_point(size = 2, alpha = 1) +
scale_color_viridis_c(option = "mako")
lin_plateau(crop, plot = TRUE)
#
head(agridat::sinclair.clover)
crop <- tibble(x = agridat::sinclair.clover$P,
y = agridat::sinclair.clover$yield) %>%
group_by(x) %>%
summarise(y = mean(y))
crop %>%
ggplot(aes(x, y, color = y)) +
geom_point(size = 2, alpha = 1) +
scale_color_viridis_c(option = "mako")
lin_plateau(crop, plot = TRUE)
#
head(agridat::lasrosas.corn)
agridat::lasrosas.corn %>%
ggplot(aes(long, lat, color = yield)) +
geom_point(size = 3, alpha = 0.5) +
facet_wrap(vars(year)) +
scale_color_viridis_c(option = "mako")
crop <- tibble(agridat::lasrosas.corn) %>%
filter(year == 1999) %>%
group_by(year, rep, nitro) %>%
summarise(y = mean(yield)) %>%
rename(x = nitro) %>%
ungroup()
crop %>%
ggplot(aes(x, y, color = y)) +
geom_point(size = 3, alpha = 0.5) +
scale_color_viridis_c(option = "mako")
lin_plateau(crop, plot = TRUE)
#
head(agridat::gartner.corn)
agridat::gartner.corn %>%
ggplot(aes(x = long, y = lat, color = mass)) +
geom_point(size = 7, alpha = 0.3) +
scale_color_viridis_c(option = "mako")