# Basemap tutorial

Basemap is a great tool for creating maps using python in a simple way. It’s a matplotlib 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, but some things are a bit more difficult to find. I started this documentation to extend a little the original documentation and examples, but it grew a little, and now covers many of the basemap possibilities.

I started writing Basemap examples for a talk given during the 2014 SIGTE meetings and I posted some examples in my blog (geoexamples.com). I would really appreciate some feedback if somebody finds an error, or thinks that some section should be added. You can leave a comment at the blog post announcing this tutorial.

## Getting started

- Installation
  - Downloading the tutorial
- Drawing the first map
- Managing projections
  - Projection
  - Extension
- Basic functions
  - Drawing a point in a map
  - Plotting raster data
  - Calculating the position of a point on the map
- Working with shapefiles
  - Basic usage
  - Reading point data
  - Polygon information
  - Filling polygons

## All Basemap methods

- Basemap
  - Passing the bounding box
  - Using the Basemap instance to convert units
  - Basemap object fields
- Plotting data
  - annotate
  - barbs
  - contour
  - contourf
  - hexbin
  - imshow
  - pcolor
  - pcolormesh
  - plot
  - quiver
  - scatter
  - streamplot
  - text
- Background methods
  - arcgisimage
  - bluemarble
  - drawcoastlines
  - drawcounties
  - drawcountries
  - drawlsmask
  - drawmapboundary
  - drawmeridians
  - drawparallels
  - drawrivers
  - drawstates
  - etopo
  - fillcontinents
  - shadedrelief
  - warpimage
  - wmsimage
- Basemap utility functions
  - addcyclic
  - colorbars
  - drawmapscale
  - gcpoints
  - greatcircle
  - interp
  - is_land
  - makegrid
  - maskoceans
  - nightshade
  - rotate_vector
  - set_axes_limits
  - shiftdata
  - shiftgrid
  - tissot
  - transform_scalar
  - transform_vector

## Cookbook

- Custom colormaps
- Multiple maps using subplots
- Basemap in 3D
- Inset locators
- Clipping a raster with a shapefile
- Reading WRF model data

## Other

- Running scripts from the crontab
- External resources