0

I am interested in mapping Australian election results. There is a good tutorial here using British elections as an example. However, it relies on him joining two datasets using vlookup. I can't work out how he did that so can't follow the tutorial any further as he doesn't supply the completed file.

Also, I have downloaded a shp file of Commonwealth Electorates from here. However, they do not contain the names of the electorates so I cannot label them.

closed as too broad by PolyGeo Jun 27 '16 at 1:33

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • At the moment your question contains two questions while the Tour stipulates that there should be only one. – PolyGeo Jun 27 '16 at 1:30
  • Sorry I can't properly answer as they shut your question down already. The electorate names are in the DBF file alongside the POLYGON files. Easiest to upload to PostGis and join using SELECT query. My script that isn't really reusable yet but may be useful to you is at: github.com/ansell/csv-schemas/blob/master/psma-electoral/… – Peter Jul 26 '16 at 2:15
  • Thanks Peter. I appreciate you commenting. I will look into the information that you have provided. Regards Phillip. – Phillip Money Aug 2 '16 at 3:59
2

This is a common procedure in GIS called joining. Essentially, you are joining some table that does not have a spatial geometric component (usually Excel file, csv, or dbf) to a GIS layer based on a common id field/column. In QGIS you can do this by:

  1. Add both non-spatial table and GIS layer to QGIS
  2. Right click on the spatial layer in the layer panel and select Properties
  3. Select the Joins tab and click on the plus symbol toward the bottom of the dialog

Here you can define the common id fields between the two layers in step one (*note the common id field needs to be the same field data type format for the join to work, e.g. text to text or number to number).

Here are some examples of this process:

Performing Table Joins

Joining non-spatial CSV file to spatial data (shapefile) using QGIS?

  • Thanks for your response. I have just done the performing table joins tutorial. I will search the shape file to see if there is a population identifier and then see if I can find a csv file with that information. A lot of this assumes a certain knowledge, which I will have to gain by trial and error. Thanks again. – Phillip Money Jun 27 '16 at 2:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.