Land Use Change in r

# Load Library.
library(ggplot2)
library(ggrepel)

# Read data.
setwd("/home/willpecc/Escritorio")
land = read.table("change_land.txt", header = T,sep = "")
View(land)

# Type of Data.
lapply(land, class)

land$newdate <- as.Date(strptime(land$Fecha, "%d/%m/%Y"))

###### Show Figure.########
plot1 <- ggplot(data = land, aes(x = newdate, y = Area_has))+
                geom_point() + geom_line() + facet_wrap(facets =  vars(uso_suelo))
                 
# add label
plot2 <- new + geom_label_repel(aes(label = Area_has),
                                 box.padding   = 0.35, 
                                 point.padding = 0.5,
                                 segment.color = 'grey50') + theme_bw()
# Save plot
ggsave("plot_land.png", plot = plot2)

Popular posts from this blog

How to fill gaps in SLC-Off Landsat 7 ETM+ Images with QGIS?