Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Perl Choropleth

Choropleth maps are those geographical maps where different regions/counties are colored differently, like election results, etc.

The super easy way to generate them is to take SVG and transform it. This little script does exactly that, in perl.

It requires XML::Parser, which you might be able to install by doing yum install perl-XML-Parser. If that works, you win.

The script trans.pl parses an SVG source file and modifies colors. It's currently set up to use this awesome public domain map of the USA. I made a few modifications to the source map to fix some bugs:

  • Worth, NO -> Worth, MO
  • Polk, WIO -> Polk, WI
  • Yukon-Koyukuk, AL -> Yukon-Koyukuk, AK

There are some example outputs along with the code to generate them.

Colors come from ColorBrewer, which you should use too.

About

Tools for generating choropleth maps

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.