ABSTRACT

This chapter details how to create choropleth maps depicting the results of the 2016 Spanish general elections. The section 13.2 describes how to define a SpatialPolygonsDataFrame combining the data from a data.frame and the spatial information of the administrative boundaries from a shapefile1.