'How can I plot time series data?

My df dataset is like this. I want to plot the yield of sugarcane, coconut and rice in time. I filter the data by rice,sugarcane and coconut. My code is this: enter image description here

data <- df %>% 
  filter(Crop == "Sugarcane" | Crop == "Rice" | Crop == "Coconut" )

Also, at the end, how can I plot the data like this one in time? Can you help me please? enter image description here

Kaggle link: https://www.kaggle.com/datasets/chinmaynagesh/crop-yield-per-state-and-rainfall-data-of-india?resource=download

To add Yield calculation, code is this:

yieldCalculation <- function(production, area) {
  yield <- production/area
  print(yield)
}

df <- df %>% mutate(Yield = yieldCalculation(Production, Area))


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source