I'm using QGIS, but I am quite familiar with R and python, so I could use any of these.
I want a map of mexico but want to color the states according to a certain variable that goes from 0 to 100. So it would be like a heatmap of Mexico.
How can I do this?
I just have the names of the states and the corresponding value. I would therefore need an already made "empty" map with the states already defined or something.
Answer
If your data consists of points and you would like to create a heatmap, QGIS has a handy heatmap plugin. There is a great tutorial on creating heatmaps from point data here.
Often it is useful to display categorical data in your maps. In this case, I would recommend using the integrated QGIS ColorBrewer located in the style manager. There is a great tutorial here. Or, you can use the online Color Brewer for cartographic color advice.
Since your data consists of a value for each Mexican state, try the following steps:
- Download a .shp of Mexican states--I found one titled "Mexico States" or Global Administrative Areas
- Right-click the new layer and select "Toggle Editing"
- Right click on the layer and select "Open Attribute Table"
- On the bottom of the attribute table, select "New Column" and choose the necessary parameters
- Type in whatever value you want in the new column next to each state name
- Deselect the "Toggle Editing" tab
- Right click on the layer again choose Properties > Style
- Within the Style tab, choose "Categorized" and column "YourNewField"
- Choose the color ramp (Here you can integrate ColorBrewer)
- Select the "Classify" tab and the color ramp will display
- Select "OK"
Your new map reflects custom values associated with each state. This is only one of many ways to accomplish your goals. Good luck!
No comments:
Post a Comment