{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Contextily 2: Other Image Providers" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Overview:\n", "1. Explore contextily's `add_basemap` function\n", "2. Access a variety of image sources via the contextily `providers` object \n", "3. Plot satellite imagery from NASA" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Prerequisites\n", "\n", "| Concepts | Importance | Notes |\n", "| --- | --- | --- |\n", "| Contextily 1 | |\n", "\n", "* **Time to learn**: 20 minutes\n", "***" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Imports" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import cartopy.crs as ccrs\n", "import cartopy.feature as cfeature\n", "from metpy.plots import USCOUNTIES\n", "import contextily as ctx\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Explore contextily's `add_basemap` function" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In our previous notebook, we created a plot with **contextily**'s default basemap source (Openstreetmaps). Here, we will do the same, over a variety of regions." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create a Python `dictionary` that pairs three regions with their corresponding lat-lon boundaries." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "extents = {'conus':[-125,-63,23,52],'nys':[-80, -72,40.5,45.2], 'alb':[-73.946,-73.735,42.648,42.707]}\n", "extents " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "