knitr::opts_chunk$set( collapse = TRUE, comment = "#>", message=FALSE, warning = FALSE )
library(cwdata) library(dplyr) library(ggplot2)
c
Potatoes is the crop whiich is produced maximum in the year 2017
key_crop_yields %>% group_by(year,crop) %>% summarise(tonnes_per_hectare = sum(tonnes_per_hectare,na.rm = TRUE)) %>% ggplot(aes(x = year, y = tonnes_per_hectare, color = crop)) + geom_line()+ labs( x = "Crops", y = "Tonnes Per Hectare", title = "Global Crop production" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.