I am trying to make a yearly data frame where the input data is updated monthly. It is historic by nature and changes usually occur only in the most recent years. I thought it would be easier to just add the updated information as opposed to re-adding duplicate information over and over (The data is updated monthly for yearly estimates and goes back to 1960 for supply and demand of world crops for each country). The starting data looks like:
Corn_US_World_Model <- FAS %>%
group_by(Market_Year)%>%filter(Commodity == "Corn")%>%
select(Attribute, Country, Market_Year, Thousand_MT)
Corn_US_World_Model_test<- Corn_US_World_Model %>%
group_by(Market_Year)%>%
mutate(grouped_id = row_number())%>%
spread(Market_Year, Thousand_MT)%>%
select(-grouped_id)
After spreading I end up with a waterfall like this
What I would like is
When I filter() for a specific country I do not get a waterfall version. However, when I do it across all of the countries in the data set I do.