How to create a choropleth map in QGIS

1. Format your data. Create a csv and csvt. Save with the same file names, same location (ie. test.csv and test.csvt).

2. Bring your datafile to QGIS. Drag and drop works.

3. Merge your files. Double click on your base layer (.shp file). The Layer Properties window will open. Go to Joins.


Click on the green + button at the bottom of the window. A pop-up box will appear. Choose the layers you want to join, and the fields you want to be merged. The Join field and Target field should have have similar data so they can be merged. For my dataset, I used country names as the point of merger. Hit OK.

4. Create an editable layer of your merged layers. To do this, right click on your .shp file, choose Save As, then go ahead and create your ESRI file.

5. Colorize your map. Open Layer Properties of new layer. Go to Style, click on the dropdown (default is usually Single symbol) and choose Graduated.

6. Customize. Choose which data column you want to use, toggle methods between Color and Size. For this we want to use Color. Choose the Color ramp you prefer. If you click on the dropdown menu, there should more colors to choose from. 

7. To classify your data, choose the mode you want to use. I used Pretty Breaks for this one, and 5 classes. Then click Classify and it will show you the symbol and values. Hit apply, and this will show on your map. Other mode of classification are Equal Interval, Quantile, Standard Deviation, Natural Breaks.


Note: The countries with values are not colored accordingly, I added an underlying layer for the other countries that don’t have values.


8. If you want an SVG of your map, go to Project > Print Composer, or simply Command + P.  To print the map, click on the button that looks like a  blank canvas with green + button (left hand side, sixth icon from from the top). To save as SVG, click on the icon which looks like a canvas with a snowflake. If you want to print the key/legend, click on the icon with colorful boxes, third icon down from Print.



Here’s how to use the print composer:

Let me know if you have questions! 
Hx

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.