Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to create a PNG (or GIF) image, with geopolitical map of countries, where each country has color set according to some country statistics (e.g. 'USA' has n, 'Canada' has m, etc.).

Something similar to LogToMap, but there is no need to generate it dynamically and/or being interactive. Data source is external file.

share|improve this question
    
GIF is a paletted format. You can easily create a source GIF with USA=1, Canada=2, etc, and then color it in by setting color1=$00FFFF, color2=$777777, etc. –  MSalters Dec 1 '11 at 14:25
add comment

3 Answers

up vote 1 down vote accepted

Just because I think you are probably dealing with log-type data, I'd probably go with R and probably the ggplot2 library.

These two resources should get you started:

There is, of course, also QGIS and GRASS GIS in the open-source full-blown GIS realm. I'm discounting ESRI's ArcMap just based on cost alone.

share|improve this answer
add comment

A word of warning - Google Map Charts doesn't recognise ALL the countries in the ISO list mentioned, so its usefulness will depend on which countries you wish to graph data for. I've not found a definitive list of which ones it doesn't like, but am working on one at the minute based on dummy data (flooded the database with an entry for EVERY country in the ISO list and sending this up to the API a few at a time to check which ones aren't used).

share|improve this answer
add comment

I finally used on-line Map Chart from the Google Chart Tools / Image Charts (aka Chart API). You generate URL like this one (split for better readibility):

which results in the following image:

map example

The data part of URL was generated using a Perl script, which used country2code subroutine from Locale::Country to convert from country names to ISO 3166-1-alpha-2 codes that Map Chart API requires.


There is also Visualization: Geomap from Google Chart Tools / Interactive Charts (aka Visualization API), where you write JavaScript to produce interactive Flash (SWF) geomap.

share|improve this answer
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.