November 2018
Beginner to intermediate
354 pages
6h 59m
English
We can map quantitative and qualitative values in a much easier way using the tmap package. For a simple choropleth map, we can just use the qtm() function and inside it, there are two arguments. The first one is the shapefile and the second one is the numeric column we want to use for making a choropleth map. First, we need to install and load it before we proceed further:
# Using tmapinstall.packages("tmap")library(tmap)
We will be using BGD_adm3_data_re.shp and will use the value1 column for mapping. Let's load this dataset and check the structure of the attribute table associated with this shapefile:
# load the mapmap_bd = readOGR("F:/Hands-on-Geospatial-Analysis-Using-R-and-QGIS/Chapter02/Data","BGD_adm3_data_re") ...Read now
Unlock full access