Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 stats according to a certain variable. It goes from 0 to 100. So it would be like a heatmap of Mexico. What would be the best way to 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...

I'm also looking for it to be as pretty as possible :). Thank you!

share|improve this question
2  
You just need to look up an introduction to producing choropleth maps in QGIS (this will basically be the first lesson in using the software for any general tutorial). There are also plenty of tutorials floating around to make such maps in R as well. For examples of Mexico choropleth maps in R I would suggest Diego Valle Jone's blog. –  Andy W Sep 27 '12 at 23:09
    
What is the source of your data? Shapefiles? Database? –  radek Sep 27 '12 at 23:09
    
This is a problem. 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... –  JEquihua Sep 27 '12 at 23:20
add comment

2 Answers 2

up vote 6 down vote accepted

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.

Edit:

Since your data consists of a value for each Mexican state, try the following steps:

  1. Download a .shp of Mexican states--I found one titled "Mexico States" or Global Administrative Areas
  2. Right-click the new layer and select "Toggle Editing"
  3. Right click on the layer and select "Open Attribute Table"
  4. On the bottom of the attribute table, select "New Column" and choose the necessary parameters
  5. Type in whatever value you want in the new column next to each state name
  6. Deselect the "Toggle Editing" tab
  7. Right click on the layer again choose Properties > Style
  8. Within the Style tab, choose "Categorized" and column "YourNewField"
  9. Choose the color ramp (Here you can integrate ColorBrewer)
  10. Select the "Classify" tab and the color ramp will display
  11. 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!

enter image description here

enter image description here

share|improve this answer
    
wow the tutorial was really informative! –  nickves Sep 28 '12 at 1:15
    
If my data doesn't consist of points? I only have names of states associated with a certain variable. Is there an easy way to create a certain structure to color? a shp file with polygons being states? I'm being really useless I know... sorry... –  JEquihua Sep 28 '12 at 2:39
    
Post edited to address comments @JEquihua –  Aaron Sep 28 '12 at 3:19
    
This is amazing, thank you. Is there anyway to create a legend stating the meaning of the intensity of colors? Thank you so much... –  JEquihua Sep 28 '12 at 4:04
    
Check the symbolgy tab. There you can edit the class labels. They will also be displayed (not ediable) in the layer list on the left of the map window. –  underdark Sep 28 '12 at 6:12
add comment

If you are familiar with R you could give ggplot2's geom_map a shoot.

Well documented so you should bet you up and running. For more details - dive into the book.

share|improve this answer
    
I am quite familiar with ggplot2, could probably learn geom_map quite easily. Does it have predefined maps of mexico with states and such? i only have the state names and the corresponding value as data... –  JEquihua Sep 27 '12 at 23:22
2  
Or you could read the R Spatial Task View (google it) and then you can do maps like this with base graphics, using the sp and rgdal packages. You then use standard spatial data files for your map outlines (shapefiles, most likely) which you can download from a number of places. –  Spacedman Sep 28 '12 at 7:19
    
@JEquihua - the 'mapdata' package also has a range of maps showing country and regional level boundaries which is a good starting point for mapping in R. –  Simbamangu Sep 28 '12 at 9:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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