Skip to content
This repository has been archived by the owner on Jan 9, 2020. It is now read-only.

Commit

Permalink
Fix spelling errors in satellite notebook.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrleeman committed Nov 15, 2017
1 parent b394431 commit bfb6d9a
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions notebooks/Satellite_Data/Working with Satellite Data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"metadata": {},
"outputs": [],
"source": [
"list(cat.datasets)[-5:]"
"cat.datasets[-5:]"
]
},
{
Expand All @@ -115,7 +115,7 @@
"<div class=\"alert alert-success\">\n",
" <b>EXERCISE</b>:\n",
" <ul>\n",
" <li>Using the link to the Hurricane Irma archive above, get data from September 10, 2017 at 15Z for the mid-level water vapor channel (9) in the Mesoscale-1 sector. You could search through the datasets list manually, but instead try the `cat.datasets.filter_time_nearest` functinoality!</li>\n",
" <li>Using the link to the Hurricane Irma archive above, get data from September 10, 2017 at 15Z for the mid-level water vapor channel (9) in the Mesoscale-1 sector. You could search through the datasets list manually, but instead try the `cat.datasets.filter_time_nearest` functionality!</li>\n",
" </ul>\n",
"</div>"
]
Expand All @@ -135,11 +135,7 @@
"metadata": {},
"outputs": [],
"source": [
"# %load solutions/satellite_data.py\n",
"cat = TDSCatalog('http://thredds-test.unidata.ucar.edu/thredds/catalog/casestudies/irma/goes16/Mesoscale-1/Channel09/20170910/catalog.xml')\n",
"ds = cat.datasets.filter_time_nearest(datetime(2017, 9, 10, 0))\n",
"print(ds.name)\n",
"ds = ds.remote_access(service='OPENDAP')"
"# %load solutions/satellite_data.py"
]
},
{
Expand Down Expand Up @@ -175,7 +171,7 @@
"source": [
"Our goal is to plot the imagery, so we'll be using the `Sectorized_CMI` variable from the `.variables` dictionary.\n",
"Rather than just giving back the raw array of data, this gives back a `Variable` object; from here not only\n",
"can we get the raw data values, but there is useful metadata as well. We can see just what additional information\n",
"can we get the raw data values, but there are useful metadata as well. We can see just what additional information\n",
"is present by printing out the `Variable` object:"
]
},
Expand Down Expand Up @@ -342,7 +338,7 @@
"metadata": {},
"source": [
"Now that we know how to properly reference the imagery data, we can plot\n",
"the data. CartoPy's projections are designed to interface with matplotlib, so they can just be passed as the `projection` keyword argument when creating an `Axes` using the `add_subplot` method. Since the x and y coordinates, as well as the image data, are referenced in the lambert conformal projection, we can pass all of them directly to plotting methods (such as `imshow`) with no additional information. The `extent` keyword argument to `imshow` is used to specify the bounds of the image data being plotted. It is **especially important** to specify that the `origin` is at the the upper left of the image (standard practice in imagery). If your forget this, your image will be flipped. Try it!"
"the data. CartoPy's projections are designed to interface with matplotlib, so they can just be passed as the `projection` keyword argument when creating an `Axes` using the `add_subplot` method. Since the x and y coordinates, as well as the image data, are referenced in the lambert conformal projection, we can pass all of them directly to plotting methods (such as `imshow`) with no additional information. The `extent` keyword argument to `imshow` is used to specify the bounds of the image data being plotted. It is **especially important** to specify that the `origin` is at the upper left of the image (standard practice in imagery). If your forget this, your image will be flipped. Try it!"
]
},
{
Expand Down Expand Up @@ -370,7 +366,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This is a nice start, but it would be nice to have better geographic references for the image. For example, where are the states? Cartopy's `feature` module has support for adding geographic features to plots ,with many features are built in. The `BORDERS` built-in feature contains country borders. There is also support for creating \"custom\" features from the [Natural Earth](http://www.naturalearthdata.com/) set of free vector and raster map data (CartoPy will automatically download the necessary data and cache it locally). Here we create a feature for states/provinces."
"This is a nice start, but it would be nice to have better geographic references for the image. For example, where are the states? Cartopy's `feature` module has support for adding geographic features to plots, with many features are built in. The `BORDERS` built-in feature contains country borders. There is also support for creating \"custom\" features from the [Natural Earth](http://www.naturalearthdata.com/) set of free vector and raster map data (CartoPy will automatically download the necessary data and cache it locally). Here we create a feature for states/provinces."
]
},
{
Expand Down Expand Up @@ -552,8 +548,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Well, that's a good idea, but the text is invisible in some places! White text and black text have issues, but we can outline the text using matplotlib's [path effects](http://matplotlib.org/users/patheffects_guide.html). More details on path effects can be found in the [documentation](http://matplotlib.org/users/patheffects_guide.html) if you want to know more.\n",
"\n"
"Well, that's a good idea, but the text is invisible in some places! White text and black text have issues, but we can outline the text using matplotlib's [path effects](http://matplotlib.org/users/patheffects_guide.html). More details on path effects can be found in the [documentation](http://matplotlib.org/users/patheffects_guide.html) if you want to know more."
]
},
{
Expand Down Expand Up @@ -649,7 +644,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"First we'll import the animation support from matplotlib. We also tell it that we want it to render the animations to HTML using the HTML5 video tag:"
"First, we'll import the animation support from matplotlib. We also tell it that we want it to render the animations to HTML using the HTML5 video tag:"
]
},
{
Expand Down Expand Up @@ -690,7 +685,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Then we loop over a bunch of the datasets. For each one we pull out the data and plot both the timestamp and the image. The `ArtistAnimation` class takes the `Figure` instance and a list as required arguments. The contents of this list is a collection of matplotlib artists for each frame of the animation. In the loop below, we populate this list with the `Text` instance created when adding the timestamp as well as the image that results from plotting the data."
"Then we loop over a bunch of the datasets. For each one we pull out the data and plot both the timestamp and the image. The `ArtistAnimation` class takes the `Figure` instance and a list as required arguments. The contents of this list are a collection of matplotlib artists for each frame of the animation. In the loop below, we populate this list with the `Text` instance created when adding the timestamp as well as the image that results from plotting the data."
]
},
{
Expand Down

0 comments on commit bfb6d9a

Please sign in to comment.