Joining attribute tables to other database tables allows you to use a spatial dataset in order to reference a dataset without any geometry, using a common key between the data tables. A very common use case for this is to join a vector dataset of census attributes to a more detailed census attribute dataset. The use case we will demonstrate here links a US census track file to a detailed CSV file that contains more in-depth information.
For this recipe, you will need a census tract
shapefile and a CSV file containing the appropriate census data for the shapefile. You can download the sample data set from https://geospatialpython.googlecode.com/svn/census.zip.
Extract this data to a directory named /qgis_data/census
.