This question already has an answer here:

I have a map of US zip codes and a spreadsheet that associates data with specific zip codes. I want to show the zip codes where the most data exists using a gradient, but I am not even sure how to get it onto the map in the first place.

marked as duplicate by underdark qgis May 20 '17 at 12:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    please edit your question with the version of qgis you are using, and a small snippet of the spreadsheet would be good. Also I don't see an actual question. please ask 1 question specifically. – Brad Nesom Aug 20 '15 at 20:28

Since I've been helping my (non-GIS user) brother with this lately:

Essentially you have to join your data table to your shapefile, but since XLS aren't readable by QGIS, you can use CSV and accomplish the same thing.

  • open your XLS and remove all formatting from the sheet, if any (ie. colours or lines or anything like that)
  • ensure all the column names are short and without spaces
  • note the column that holds the ZIP CODE value
  • save the XLS as a CSV from excel
  • using QGIS, go to the menu option Layer > Add Layer > Add Delimited Text Layer
  • Browse to your CSV
  • ensure the option for 'No Geometry (attribute table only) is selected next to "Geometry definition"
  • once the CSV has been added to the map, open the properties (right-click / properties) for the CSV and select the 'Fields' section on the left-hand side
  • Ensure all the field types are being read as INT values (rather than String, so you can do your mapping correctly) Close the properties when finished checking.
  • Add your ZipCodes.shp to the map
  • Right-click the ZipCodes.shp layer and open the Properties
  • Select Fields from the left-hand side and note which field stores the ZIP CODE value
  • Access the Join option on the left-hand side
  • Click the little green cross in the bottom left of the dialogue box
  • ensure the Join Layer is your CSV file
  • ensure the join field and target field are the ZIP CODE value fields from each of your SHP and CSV as you checked above
  • click OK
  • check the Fields setting on the left, and ensure the fields from the CSV have been added to the SHP

You should now be able to do your mapping...

  • I actually figured this out myself once I started playing with q. For some reason though when I press OK after following these steps the layers aren't joined. I tried it the other way around and was able to join the SHP to the CSV file where the zips were the same. Do you know why I might be having trouble getting the csv to join the SHP file, but not the other way around? I really appreciate your help btw! – Dill Aug 20 '15 at 20:55
  • Hmmm no that is strange! Not sure what to say about that! – DPSSpatial Aug 20 '15 at 20:57

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