Create heatmap in QGIS

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

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 a 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 Color ramp you want to use. 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.


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.



Here’s how to use the print composer:

Let me know if you have questions! 
Hx

Leave a Reply