Interactive and static plots of the number of farms.
country_farms %>%
group_by(Country) %>%
mutate(Farms = round(Farms, 2),
Year = paste(Year, "12", "31", sep="-")) %>%
e_charts(x = Year) %>%
e_river(serie = Farms, legend=FALSE) %>%
e_tooltip(trigger = "axis") %>%
e_title(text = "Number of farms, per country",
subtext = "(in millions of farms). Source: Our World in Data",
sublink = "https://ourworldindata.org/farm-size#how-many-farms-are-there",
left = "center") %>%
e_theme("roma")
country_farms %>%
ggplot(aes(x = Year, y = Farms,
fill = Country)) +
geom_area() +
colorspace::scale_fill_discrete_divergingx(palette = "roma", nmax =7) +
theme_classic() +
theme(legend.position = "bottom") +
labs( y = "in millions of Farms",
fill = NULL)
These plots do not accurately depict the data that was in the data set I chose as they were not the type of graph that would display this data properly. If I were to do this project again I would have chosen a different data set.