Transforming the data into long format from wide format

test %>% gather(forest_type_time,area, 3:18) -> test1
View(test1)

visualizing range of types of forest covers for all four time periods.

test1 %>% ggplot(aes(test1$CoverType, test1$area)) +
  geom_boxplot() +
  ylim(c(0,5000))+
  transition_states(
    test1$year,
    transition_length = 2,
    state_length = 1
  ) +
  enter_fade() + 
  exit_shrink() +
  ease_aes('sine-in-out')+
  labs(title = "{closest_state}")
## Warning: Removed 4 rows containing non-finite values (stat_boxplot).

Visualising type of Forest cover for all districts

test1 %>% ggplot(aes(test1$District, test1$area)) +
  geom_jitter(aes(size = test1$area, color = test1$CoverType, alpha = 0.5))+
  guides(size = FALSE, alpha = FALSE)+
  theme(axis.text.x = element_text(angle = 90))+
  transition_states(
    test1$year,
    transition_length = 2,
    state_length = 1
  ) +
  enter_fade() + 
  exit_shrink() +
  ease_aes('sine-in-out')+
  labs(title = "{closest_state}")

Summarise

Del %>% gather(CoverType, Change, 1:4) -> chnge_06_to_16

chnge_06_to_16 %>% ggplot(aes(chnge_06_to_16$District,chnge_06_to_16$Change, 
                              color = chnge_06_to_16$CoverType, alpha=0.5, size = 1))+ geom_point()+
  theme(axis.text.x = element_text(angle = 90))+
  labs(title = "Change in Forest Cover", y = "Change from 2006 to 2015-16", x= "")+
  guides(alpha=FALSE,size = FALSE, color = FALSE)