Sunday, February 23, 2014

Making maps in python, step 1: installing dependencies

I want to plot some things on a map. I got one guide from here, that uses Basemap.

Basemap:
brew install geos
brew install gdal
brew install gfortran

pip install matplotlib
pip install numpy
pip install pandas
pip install shapely
pip install basemap --allow-external basemap --allow-unverified basemap
pip install scipy
pip install pysal
pip install Fiona
pip install descartes

Okay, geez, I had written a ton more in this Blogger window, it looked like it was saving my draft, but then it... somehow didn't? Jesus, nothing on computers ever works. All right, I'll try to recreate it:

on Ubuntu, I wanted to pip install as much as possible (because of virtualenv) so I did stuff like this:
sudo apt-get build-dep numpy scipy matplotlib
pip install numpy scipy matplotlib
I think I just used pip for pandas, shapely, pysal, descartes. Fiona required something else, like apt-getting gdal or something?

Kartograph:
Ubuntu: http://kartograph.org/docs/kartograph.py/install-ubuntu.html
OSX: pip install -r https://raw.github.com/kartograph/kartograph.py/master/requirements.txt worked, I think because I already had installed gdal via brew.

Cartopy:
Ubuntu: https://github.com/SciTools/cartopy/issues/46
OSX: https://github.com/SciTools/cartopy/issues/48

1 comment:

  1. All of a sudden I confused my browser window for my terminal :-)...welcome to mapland.

    ReplyDelete