Joining geometries with tabular data
In this section, we are going to join an attribute table of a spatial vector layer with plain tabular data (as opposed to joining with the attribute table of another layer based on spatial location). In spatial analysis practice, we often have, at hand, a spatial layer and supplementary tabular data as separate objects, while we would like to work with them in combination. For instance, in the present example, USA Census data regarding county population sizes (a CSV file) will be linked to the county
layer defining county geometries, in order to calculate county population densities. To do the latter, we need to know both the population size (from the census table) and area size (from the vector layer) for ...
Get Learning R for Geospatial Analysis now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.