2

I want to import summarized data from Excel into QGIS 2.4. The date consist of US states and Canadian provinces paired up with a percentage. The data looks like this:

State     %
CO       50.4
IN       34.1
KY       10.1
OH       5.2
TN       24.8

How do I import this data into QGIS to display it on a map? I would like the state to be a solid color that varies with the percentage. I would like to either have % transparency or fade from one color to the other. Also I am starting with the Natural Earth Quickstarter Kit, so I have state borders on my map.

If there are tutorials on this, please share.

3
  • Do you mean you want a transparency of % amount applied to the 'solid' color? – recurvata Sep 16 '14 at 18:45
  • Do you have a shapefile of the states and provinces? (If not, you will need one.) Also, for reference: the term for a map of polygons in different colors is choropleth. – Erica Sep 16 '14 at 18:53
  • I would like to either have % transparency or fade from one color to the other. Also I am starting with the Natural Earth Quickstarter Kit, so I have state borders on my map. – ukfan Sep 16 '14 at 19:16
4

So you have a map and some data in a spreadsheet, and you want to display the shapes in the map based on data in the spreadsheet. In order to do this you will need to perform a Join to link the two sets of data. In order to do a join, both sets of data must have a common, identical reference. If the attributes of your shapes only identify them by full state name, you'll have to modify one set of data or the other. You could add the state abbreviations to the map data, or you could add the full state name (exactly as it appears in the map data) to the spreadsheet.

Once you've done the join you can save that data to a new shapefile to make it permanent if you like, as joins are only temporary. Then you'll need to symbolize the shapes based on your percentage column. Since no two states are likely to have the same percentages (and even if some do, most values will be fairly unique), you'll have two choices on how to do this. In a classed choropleth, you'll decide groupings (ranges) for the values and all states that fall in a group will be the same color. In an unclassed choropleth, all states will be shown as a unique color on a spectrum. Based on your description I think the latter method is what you'll want.

You can find a short tutorial on the general process here. It creates a classed choropleth, but once you learn the process and concepts you should be able to figure out where you need to change options. That site in general has a number of good tutorials. The QGIS documentation also has a few components that are tutorial like in nature. You might start with the Gentle Introduction in GIS, while the User Guide outlines many specific tools in a how-to way, and the Training Manual strings things together a bit more as 'lessons'.

4
  • Thanks for the Help. This worked an now I have a great looking Choropleth Map. – ukfan Sep 17 '14 at 19:10
  • Checked it off. Follow up question, I performed this join with 2 separate data sets and the shape file (one on a duplicate layer). I want to display both labels simultaneously from each layer, however it only shows one of the data sets for each state. Some states show the count while other show the percentage (in decimal form). I have played with the label offset but only one shows. Any advice? – ukfan Sep 18 '14 at 13:55
  • example Imgur – ukfan Sep 18 '14 at 14:42
  • @ukfan That would probably be best asked as a separate question. I'm not overly familiar with labeling in QGIS - in ArcGIS there are a couple of ways to tackle the problem, which is basically a conflict between two sets of labels and layers in the same place. One way that wouldn't matter what software you use would be to combine everything to a single data set (so your shapes have an attribute field for both count and percentage). You can then create a single label out of however many / whichever fields you want. – Chris W Sep 18 '14 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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