The examples provided in the cartopy docs under http://scitools.org.uk/cartopy/docs/latest/matplotlib/introductory_examples
are out of date compared to the codebase. There is a development ticket to update all of the examples (https://github.com/SciTools/cartopy/issues/128).
In this case, simply replace the line
plt.contourf(lons, lats, data, transform=ccrs.Geodetic())
with
plt.contourf(lons, lats, data, transform=ccrs.PlateCarree())
and the example should work again.
The matplotlib/cartopy introductory section of the cartopy docs has has a contouring example which may be of interest http://scitools.org.uk/cartopy/docs/latest/matplotlib/advanced_plotting.html#contour-plots The resulting image:
HTH,