November 2018
Beginner to intermediate
354 pages
6h 59m
English
Now, we will build our model using all the data we have computed. We want to make a DataFrame of the elevation value, slope value, and an indicator variable indicating whether the location is unsafe or safe. First, load the elevation data corresponding to the safe zone:
dem_safe = read.csv("F:/Hands-on Geospatial Analysis Using R and QGIS/Chapter 10/Data/dem_safe.csv")str(dem_safe)# Remove id columndem_safe$id = NULLstr(dem_safe)
By investigating the output, we can be sure that we have, in fact, removed the ID column from dem_safe.
Now, load the slope data corresponding to the safe zone and remove the ID column as previously mentioned:
slope_safe = read.csv("F:/Hands-on Geospatial Analysis Using R and QGIS/Chapter 10/Data/slope_safe.csv") ...Read now
Unlock full access