November 2018
Beginner to intermediate
354 pages
6h 59m
English
We can plot quantitative values using the choropleth() of the GISTools package. We can generate a choropleth using the following commands:
# plot quantitative datalibrary(GISTools)choropleth(map_bd, as.numeric(map_bd$value2))
We can also write a title and design this map further, but we will do these things in upcoming chapters. This gives us a nice little map:

Using spplot(), we can also plot qualitative data. First, we need to convert this qualitative attribute or column of SpatialPolygonsDataFrame to a factor variable and use a suitable color range. We have a shapefile of Dhaka's divisions, ...
Read now
Unlock full access