4

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.

1
  • 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, 2011 at 14:25

3 Answers 3

1

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.

1

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).

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .