Wednesday, November 26, 2014

Basemap Tutorial

Basemap is a great tool for creating maps using python in a simple way. It's a `matplotlib <http://matplotlib.org/>`_ extension, so it has got all its features to create data visualizations, and adds the geographical projections and some datasets to be able to plot coast lines, countries, and so on directly from the library.

Basemap has got `some documentation <http://matplotlib.org/basemap/index.html>`_, but some things are a bit more difficult to find. I started a readthedocs page to extend a little the original documentation and examples, but it grew a little, and now covers many of the basemap possibilities.

Some of the examples from the tutorial

The tutorial can be found at http://basemaptutorial.readthedocs.org/, and all the examples and its source code, at GitHub and it's available for sharing or being modified by adding the attribution.

The tutorial covers:
 I would really appreciate some feedback, the comments are open!


5 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This is really cool, you are helping me with a homework assignment, thanks so much! If I have any useful feedback I'll post here but wanted to say how thankful I am that someone has extended the cryptic documentation. Thanks!

    ReplyDelete
  3. Very helpful tutorials.I am trying to find the coordinates: llcrnrlon,llcrnrlat,urcrnrlon,urcrnrlat for London. Can you please tell me how to find them?
    Thanks in advance.

    ReplyDelete
    Replies
    1. Hi,

      You can either look on Google Maps the locations you want to show or, if you want to show London in the center, use the lon_0 and lat_0 plus the map size.
      The three options are shown here: https://basemaptutorial.readthedocs.io/en/latest/basemap.html#passing-the-bounding-box

      Delete