Tested on Mac OS 10.6.8
shapefile (http://code.google.com/p/pyshp/)
One of the following should work
sudo pypm install pyshp
easy_install pyshp
This should work:
pip install polygon
Alternatively download mac binaries from
and copy the folder "Polygon" into
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
Follow instructions here:
http://code.google.com/p/svgfig/wiki/HowToInstall
git clone https://github.com/kartograph/kartograph.py
Output should look like this:
Cloning into kartograph.py...
remote: Counting objects: 422, done.
remote: Compressing objects: 100% (265/265), done.
remote: Total 422 (delta 210), reused 353 (delta 141)
Receiving objects: 100% (422/422), 38.82 MiB | 458 KiB/s, Resolving deltas: 100% (210/210), done.
Kartograf needs some shapefiles from naturalearthdata.com. While you could download them manually, you can also get them packed into one archive:
Download them into your kartograph.py/ directory and unzip them via
cd kartograph.py
7z x data.7z
You can safely replace any files.
You may need to install the 7z archive utility
brew install p7zip
cd kartograph.py
python kartograph world -o world.svg
If you want to open generated maps automatically, save the following script to /usr/local/bin/firefox
(make sure to point it to the location where you installed Firefox on your system).
#!/bin/sh
open -a /Applications/Firefox.app $1
Using that, you're able to open things in Firefox via command line, eg.
firefox world.svg
If you then run svgmap without the -o parameter, the map would automatically open in firefox.
python kartograph world
If you don't want to type that "python " prefix you can run this. Note that you still have to run svgmap from the svgmap.py/ directory.
chmod +x kartograph
export PATH=$PATH:.
kartograph world