diff --git a/failing_notebooks/Siphon Radar Server.ipynb b/failing_notebooks/Siphon Radar Server.ipynb index aa5c307a..b2fd9c67 100644 --- a/failing_notebooks/Siphon Radar Server.ipynb +++ b/failing_notebooks/Siphon Radar Server.ipynb @@ -550,7 +550,7 @@ "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "import cartopy\n", - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "from metpy.plots import ctables # For NWS colortable\n", "\n", "# Create projection centered on the radar. This allows us to use x\n", @@ -562,7 +562,7 @@ "fig = plt.figure(figsize=(10, 10))\n", "ax = fig.add_subplot(1, 1, 1, projection=proj)\n", "\n", - "ax.add_feature(cfeat.STATES.with_scale('50m'), linewidth=2)\n", + "ax.add_feature(cfeature.STATES.with_scale('50m'), linewidth=2)\n", "\n", "# Set limits in lat/lon space\n", "ax.set_extent([data.RadarLongitude - 2.5, data.RadarLongitude + 2.5,\n", diff --git a/failing_notebooks/python-awips/Satellite_Imagery.ipynb b/failing_notebooks/python-awips/Satellite_Imagery.ipynb index 5cd43470..69bfd4e3 100644 --- a/failing_notebooks/python-awips/Satellite_Imagery.ipynb +++ b/failing_notebooks/python-awips/Satellite_Imagery.ipynb @@ -17,7 +17,7 @@ "source": [ "from awips.dataaccess import DataAccessLayer\n", "import cartopy.crs as ccrs\n", - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "import matplotlib.pyplot as plt\n", "from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER\n", "import numpy as np\n", @@ -146,7 +146,7 @@ "\n", "fig, ax = make_map(bbox=bbox)\n", "# State boundaries\n", - "states = cfeat.NaturalEarthFeature(category='cultural',\n", + "states = cfeature.NaturalEarthFeature(category='cultural',\n", " name='admin_1_states_provinces_lakes',\n", " scale='50m', facecolor='none')\n", "ax.add_feature(states, linestyle=':')\n", diff --git a/failing_notebooks/python-awips/Watch_and_Warning_Polygons.ipynb b/failing_notebooks/python-awips/Watch_and_Warning_Polygons.ipynb index effef2a1..32077662 100644 --- a/failing_notebooks/python-awips/Watch_and_Warning_Polygons.ipynb +++ b/failing_notebooks/python-awips/Watch_and_Warning_Polygons.ipynb @@ -151,7 +151,7 @@ "from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER\n", "\n", "\n", - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "from cartopy.feature import ShapelyFeature,NaturalEarthFeature\n", "from shapely.geometry import Polygon\n", "from awips.tables import vtec\n", @@ -325,7 +325,7 @@ "metadata": {}, "outputs": [], "source": [ - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "from cartopy.feature import ShapelyFeature\n", "from shapely.geometry import Polygon\n", "\n", diff --git a/notebooks/Bonus/Downloading GFS with Siphon.ipynb b/notebooks/Bonus/Downloading GFS with Siphon.ipynb index 7f8df9a0..1d1c2d82 100644 --- a/notebooks/Bonus/Downloading GFS with Siphon.ipynb +++ b/notebooks/Bonus/Downloading GFS with Siphon.ipynb @@ -528,7 +528,7 @@ "source": [ "import matplotlib.pyplot as plt\n", "import cartopy.crs as ccrs\n", - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "from metpy.plots import ctables\n", "\n", "# Create a new figure\n", @@ -539,7 +539,7 @@ "ax.set_extent([-100.03, -111.03, 35, 43])\n", "\n", "# Retrieve the state boundaries using cFeature and add to plot\n", - "ax.add_feature(cfeat.STATES, edgecolor='gray')\n", + "ax.add_feature(cfeature.STATES, edgecolor='gray')\n", "\n", "# Contour temperature at each lat/long\n", "contours = ax.contourf(lon_2d, lat_2d, temp_2d.to('degF'), 200, transform=ccrs.PlateCarree(),\n", diff --git a/notebooks/CartoPy/CartoPy.ipynb b/notebooks/CartoPy/CartoPy.ipynb index cdaf9042..235e82cf 100644 --- a/notebooks/CartoPy/CartoPy.ipynb +++ b/notebooks/CartoPy/CartoPy.ipynb @@ -202,21 +202,21 @@ "outputs": [], "source": [ "# import cartopy's collection of map features\n", - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "\n", "fig = plt.figure(figsize=(10, 8))\n", "ax = fig.add_subplot(1, 1, 1, projection=ccrs.LambertConformal())\n", "\n", "# Add variety of features\n", - "ax.add_feature(cfeat.LAND)\n", - "ax.add_feature(cfeat.OCEAN)\n", - "ax.add_feature(cfeat.COASTLINE)\n", + "ax.add_feature(cfeature.LAND)\n", + "ax.add_feature(cfeature.OCEAN)\n", + "ax.add_feature(cfeature.COASTLINE)\n", "\n", "# Can also supply matplotlib kwargs\n", - "ax.add_feature(cfeat.BORDERS, linestyle=':')\n", - "ax.add_feature(cfeat.STATES, linestyle=':')\n", - "ax.add_feature(cfeat.LAKES, alpha=0.5)\n", - "ax.add_feature(cfeat.RIVERS, edgecolor='tab:green')\n", + "ax.add_feature(cfeature.BORDERS, linestyle=':')\n", + "ax.add_feature(cfeature.STATES, linestyle=':')\n", + "ax.add_feature(cfeature.LAKES, alpha=0.5)\n", + "ax.add_feature(cfeature.RIVERS, edgecolor='tab:green')\n", "\n", "ax.set_extent([-130, -60, 20, 55])" ] @@ -264,9 +264,9 @@ "fig = plt.figure(figsize=(10, 8))\n", "ax = fig.add_subplot(1, 1, 1, projection=ccrs.LambertConformal())\n", "\n", - "ax.add_feature(cfeat.COASTLINE)\n", - "ax.add_feature(cfeat.BORDERS, linewidth=2)\n", - "ax.add_feature(cfeat.STATES, linestyle=\"--\", edgecolor='black')\n", + "ax.add_feature(cfeature.COASTLINE)\n", + "ax.add_feature(cfeature.BORDERS, linewidth=2)\n", + "ax.add_feature(cfeature.STATES, linestyle=\"--\", edgecolor='black')\n", "\n", "ax.plot(-105, 40, marker='o', color='tab:red')\n", "\n", @@ -289,9 +289,9 @@ "fig = plt.figure(figsize=(10, 8))\n", "ax = fig.add_subplot(1, 1, 1, projection=ccrs.LambertConformal())\n", "\n", - "ax.add_feature(cfeat.COASTLINE)\n", - "ax.add_feature(cfeat.BORDERS, linewidth=2)\n", - "ax.add_feature(cfeat.STATES, linestyle=\"--\", edgecolor='black')\n", + "ax.add_feature(cfeature.COASTLINE)\n", + "ax.add_feature(cfeature.BORDERS, linewidth=2)\n", + "ax.add_feature(cfeature.STATES, linestyle=\"--\", edgecolor='black')\n", "\n", "data_projection = ccrs.PlateCarree()\n", "ax.plot(-105, 40, marker='o', color='tab:red', transform=data_projection)\n", @@ -326,8 +326,8 @@ "fig = plt.figure(figsize=(10, 8))\n", "ax = fig.add_subplot(1, 1, 1, projection=ccrs.LambertConformal())\n", "\n", - "ax.add_feature(cfeat.COASTLINE)\n", - "ax.add_feature(cfeat.BORDERS, linewidth=2)\n", + "ax.add_feature(cfeature.COASTLINE)\n", + "ax.add_feature(cfeature.BORDERS, linewidth=2)\n", "\n", "# Plot wind barbs--CartoPy handles reprojecting the vectors properly for the\n", "# coordinate system\n", diff --git a/notebooks/CartoPy/solutions/map.py b/notebooks/CartoPy/solutions/map.py index bd12c574..3d923a64 100644 --- a/notebooks/CartoPy/solutions/map.py +++ b/notebooks/CartoPy/solutions/map.py @@ -1,11 +1,11 @@ fig = plt.figure(figsize=(10, 8)) ax = fig.add_subplot(1, 1, 1, projection=ccrs.Mercator()) -ax.add_feature(cfeat.COASTLINE) -ax.add_feature(cfeat.LAND, facecolor='tab:brown') -ax.add_feature(cfeat.OCEAN, facecolor='tab:cyan') -ax.add_feature(cfeat.BORDERS, linewidth=2) -ax.add_feature(cfeat.STATES, linestyle="--", edgecolor='black') +ax.add_feature(cfeature.COASTLINE) +ax.add_feature(cfeature.LAND, facecolor='tab:brown') +ax.add_feature(cfeature.OCEAN, facecolor='tab:cyan') +ax.add_feature(cfeature.BORDERS, linewidth=2) +ax.add_feature(cfeature.STATES, linestyle="--", edgecolor='black') ax.plot(-101.877, 33.583, marker='o', color='tab:green', transform=ccrs.PlateCarree()) diff --git a/notebooks/Command_Line_Tools/synopticplot.py b/notebooks/Command_Line_Tools/synopticplot.py index 922ad776..eddd2cb8 100755 --- a/notebooks/Command_Line_Tools/synopticplot.py +++ b/notebooks/Command_Line_Tools/synopticplot.py @@ -3,7 +3,7 @@ import argparse import cartopy.crs as ccrs -import cartopy.feature as cfeat +import cartopy.feature as cfeature import matplotlib.pyplot as plt import netCDF4 import numpy as np @@ -117,8 +117,8 @@ def make_basemap(proj): """ fig = plt.figure(figsize=(10.5, 7)) ax = fig.add_subplot(1, 1, 1, projection=proj) - ax.add_feature(cfeat.STATES, linestyle=':') - ax.add_feature(cfeat.COASTLINE) + ax.add_feature(cfeature.STATES, linestyle=':') + ax.add_feature(cfeature.COASTLINE) return fig, ax diff --git a/notebooks/GOES_RGB_Demo/GOES_False_Color_RGB.ipynb b/notebooks/GOES_RGB_Demo/GOES_False_Color_RGB.ipynb index 6dd6c7af..d807e7b9 100644 --- a/notebooks/GOES_RGB_Demo/GOES_False_Color_RGB.ipynb +++ b/notebooks/GOES_RGB_Demo/GOES_False_Color_RGB.ipynb @@ -53,7 +53,7 @@ "from datetime import datetime\n", "\n", "import cartopy.crs as ccrs\n", - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "import matplotlib.pyplot as plt\n", "from matplotlib import patheffects\n", "from metpy.plots import add_metpy_logo\n", @@ -152,19 +152,14 @@ " latitude_true_scale=proj_var.standard_parallel,\n", " globe=globe)\n", "\n", - "# Set up a feature for the state/province lines. Tell cartopy not to fill in the polygons\n", - "state_boundaries = cfeat.NaturalEarthFeature(category='cultural',\n", - " name='admin_1_states_provinces_lakes',\n", - " scale='50m', facecolor='none')\n", - "\n", "# Same as before, except we call imshow with our colormap and norm.\n", "fig = plt.figure(figsize=(20, 20))\n", "ax = fig.add_subplot(1, 1, 1, projection=proj)\n", "\n", "im = ax.imshow(rgb_data, extent=(x.min(), x.max(), y.min(), y.max()), origin='upper')\n", "ax.coastlines(resolution='50m', color='black')\n", - "ax.add_feature(state_boundaries, linestyle=':', edgecolor='black')\n", - "ax.add_feature(cfeat.BORDERS, linewidth=2, edgecolor='black')\n", + "ax.add_feature(cfeature.STATES, linestyle=':')\n", + "ax.add_feature(cfeature.BORDERS, linewidth=2)\n", "\n", "# Add text (aligned to the right); save the returned object so we can manipulate it.\n", "text_time = ax.text(0.99, 0.01, timestamp.strftime('%d %B %Y %H%MZ'),\n", @@ -201,7 +196,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.2" + "version": "3.6.4" } }, "nbformat": 4, diff --git a/notebooks/GOES_RGB_Demo/GOES_RGB_Image.ipynb b/notebooks/GOES_RGB_Demo/GOES_RGB_Image.ipynb index b42f8742..43db1519 100644 --- a/notebooks/GOES_RGB_Demo/GOES_RGB_Image.ipynb +++ b/notebooks/GOES_RGB_Demo/GOES_RGB_Image.ipynb @@ -61,7 +61,7 @@ "from datetime import datetime\n", "\n", "import cartopy.crs as ccrs\n", - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "import matplotlib.pyplot as plt\n", "from matplotlib import patheffects\n", "from metpy.plots import add_metpy_logo\n", @@ -201,7 +201,7 @@ " globe=globe)\n", "\n", "# Set up a feature for the state/province lines. Tell cartopy not to fill in the polygons\n", - "state_boundaries = cfeat.NaturalEarthFeature(category='cultural',\n", + "state_boundaries = cfeature.NaturalEarthFeature(category='cultural',\n", " name='admin_1_states_provinces_lakes',\n", " scale='50m', facecolor='none')\n", "\n", @@ -212,7 +212,7 @@ "im = ax.imshow(rgb_data, extent=(x.min(), x.max(), y.min(), y.max()), origin='upper')\n", "ax.coastlines(resolution='50m', color='black')\n", "ax.add_feature(state_boundaries, linestyle=':', edgecolor='black')\n", - "ax.add_feature(cfeat.BORDERS, linewidth=2, edgecolor='black')\n", + "ax.add_feature(cfeature.BORDERS, linewidth=2, edgecolor='black')\n", "\n", "# Add text (aligned to the right); save the returned object so we can manipulate it.\n", "text_time = ax.text(0.99, 0.01, timestamp.strftime('%d %B %Y %H%MZ'),\n", diff --git a/notebooks/MetPy_Case_Study/MetPy_Case_Study.ipynb b/notebooks/MetPy_Case_Study/MetPy_Case_Study.ipynb index ffbd542e..f88da66e 100644 --- a/notebooks/MetPy_Case_Study/MetPy_Case_Study.ipynb +++ b/notebooks/MetPy_Case_Study/MetPy_Case_Study.ipynb @@ -46,7 +46,7 @@ "from datetime import datetime\n", "\n", "import cartopy.crs as ccrs\n", - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "from netCDF4 import Dataset, num2date\n", "import numpy as np\n", "from scipy.ndimage import gaussian_filter\n", @@ -620,7 +620,7 @@ " ax=plt.subplot(111, projection=plotproj)\n", " ax.set_extent([-125, -73, 25, 50],ccrs.PlateCarree())\n", " ax.coastlines('50m', linewidth=0.75)\n", - " ax.add_feature(cfeat.STATES, linewidth=0.5)\n", + " ax.add_feature(cfeature.STATES, linewidth=0.5)\n", " return fig, ax" ] }, @@ -848,7 +848,7 @@ "ax=plt.subplot(221,projection=plotproj)\n", "ax.set_extent([-125.,-73,25.,50.],ccrs.PlateCarree())\n", "ax.coastlines('50m', linewidth=0.75)\n", - "ax.add_feature(cfeat.STATES,linewidth=0.5)\n", + "ax.add_feature(cfeature.STATES,linewidth=0.5)\n", "\n", "# Contour #1\n", "clev500 = np.arange(0,7000,60)\n", @@ -879,7 +879,7 @@ "ax=plt.subplot(222,projection=plotproj)\n", "ax.set_extent([-125.,-73,25.,50.],ccrs.PlateCarree())\n", "ax.coastlines('50m', linewidth=0.75)\n", - "ax.add_feature(cfeat.STATES, linewidth=0.5)\n", + "ax.add_feature(cfeature.STATES, linewidth=0.5)\n", "\n", "# Contour #1\n", "clev500 = np.arange(0,7000,60)\n", @@ -910,7 +910,7 @@ "ax=plt.subplot(223,projection=plotproj)\n", "ax.set_extent([-125.,-73,25.,50.],ccrs.PlateCarree())\n", "ax.coastlines('50m', linewidth=0.75)\n", - "ax.add_feature(cfeat.STATES, linewidth=0.5)\n", + "ax.add_feature(cfeature.STATES, linewidth=0.5)\n", "\n", "# Contour #1\n", "clev500 = np.arange(0,7000,60)\n", @@ -941,7 +941,7 @@ "ax=plt.subplot(224,projection=plotproj)\n", "ax.set_extent([-125.,-73,25.,50.],ccrs.PlateCarree())\n", "ax.coastlines('50m', linewidth=0.75)\n", - "ax.add_feature(cfeat.STATES, linewidth=0.5)\n", + "ax.add_feature(cfeature.STATES, linewidth=0.5)\n", "\n", "# Contour #1\n", "clev500 = np.arange(0,7000,60)\n", @@ -1033,7 +1033,7 @@ "ax = plt.subplot(111,projection=ccrs.LambertConformal(central_latitude=50,central_longitude=-107))\n", "ax.set_extent([LLlon,URlon,LLlat,URlat],ccrs.PlateCarree())\n", "ax.coastlines('50m', edgecolor='grey', linewidth=0.75)\n", - "ax.add_feature(cfeat.STATES, edgecolor='grey', linewidth=0.5)\n", + "ax.add_feature(cfeature.STATES, edgecolor='grey', linewidth=0.5)\n", "\n", "# Set up station plotting using only every third element from arrays for plotting\n", "stationplot = StationPlot(ax, lon[skip_points].ravel()[mask],\n", diff --git a/notebooks/MetPy_Case_Study/solutions/map_data_500.py b/notebooks/MetPy_Case_Study/solutions/map_data_500.py index 1d4dda8f..a64c58ee 100644 --- a/notebooks/MetPy_Case_Study/solutions/map_data_500.py +++ b/notebooks/MetPy_Case_Study/solutions/map_data_500.py @@ -3,7 +3,7 @@ proj = ccrs.LambertConformal(central_latitude=50, central_longitude=-107) ax = plt.subplot(111, projection=proj) ax.coastlines('50m', edgecolor='grey', linewidth=0.75) -ax.add_feature(cfeat.STATES, edgecolor='grey', linewidth=0.5) +ax.add_feature(cfeature.STATES, edgecolor='grey', linewidth=0.5) # Set up station plotting using only every third # element from arrays for plotting diff --git a/notebooks/Metpy_Introduction/solutions/intro_calc.py b/notebooks/Metpy_Introduction/solutions/intro_calc.py index 44453bc8..79704c97 100644 --- a/notebooks/Metpy_Introduction/solutions/intro_calc.py +++ b/notebooks/Metpy_Introduction/solutions/intro_calc.py @@ -1,3 +1,3 @@ speed = mpcalc.get_wind_speed(u, v) print(speed) -print(speed.to('mph')) \ No newline at end of file +print(speed.to('mph')) diff --git a/notebooks/Metpy_Introduction/solutions/intro_temperature.py b/notebooks/Metpy_Introduction/solutions/intro_temperature.py index efc5f560..af03a909 100644 --- a/notebooks/Metpy_Introduction/solutions/intro_temperature.py +++ b/notebooks/Metpy_Introduction/solutions/intro_temperature.py @@ -1,4 +1,4 @@ temperature_change_rate = -2.3 * units.delta_degF / (10 * units.minutes) temperature = 25 * units.degC dt = 1.5 * units.hours -print(temperature + temperature_change_rate * dt) \ No newline at end of file +print(temperature + temperature_change_rate * dt) diff --git a/notebooks/Metpy_Introduction/solutions/intro_units.py b/notebooks/Metpy_Introduction/solutions/intro_units.py index e53b1a59..6b7bcb22 100644 --- a/notebooks/Metpy_Introduction/solutions/intro_units.py +++ b/notebooks/Metpy_Introduction/solutions/intro_units.py @@ -1,4 +1,4 @@ speed = 25 * units.knots time = 1 * units.fortnight distance = speed * time -print(distance.to('furlongs')) \ No newline at end of file +print(distance.to('furlongs')) diff --git a/notebooks/Model_Output/Downloading model fields with NCSS.ipynb b/notebooks/Model_Output/Downloading model fields with NCSS.ipynb index dde2ffe1..e7354fef 100644 --- a/notebooks/Model_Output/Downloading model fields with NCSS.ipynb +++ b/notebooks/Model_Output/Downloading model fields with NCSS.ipynb @@ -242,7 +242,7 @@ "source": [ "%matplotlib inline\n", "import cartopy.crs as ccrs\n", - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "import matplotlib.pyplot as plt\n", "\n", "# GFS uses lon/lat grid\n", @@ -258,8 +258,8 @@ "\n", "# add some common geographic features\n", "ax.coastlines(resolution='10m', color='black')\n", - "ax.add_feature(cfeat.STATES, edgecolor='black')\n", - "ax.add_feature(cfeat.BORDERS)\n", + "ax.add_feature(cfeature.STATES, edgecolor='black')\n", + "ax.add_feature(cfeature.BORDERS)\n", "\n", "# add some lat/lon gridlines\n", "ax.gridlines()\n", @@ -310,8 +310,8 @@ "\n", "# add some common geographic features\n", "ax.coastlines(resolution='10m', color='black')\n", - "ax.add_feature(cfeat.STATES, edgecolor='black')\n", - "ax.add_feature(cfeat.BORDERS)\n", + "ax.add_feature(cfeature.STATES, edgecolor='black')\n", + "ax.add_feature(cfeature.BORDERS)\n", "\n", "# add some lat/lon gridlines\n", "ax.gridlines()" diff --git a/notebooks/Model_Output/solutions/model_plot.py b/notebooks/Model_Output/solutions/model_plot.py index 715e3651..7fb21997 100644 --- a/notebooks/Model_Output/solutions/model_plot.py +++ b/notebooks/Model_Output/solutions/model_plot.py @@ -39,8 +39,8 @@ # add some common geographic features ax.coastlines(resolution='10m', color='black') -ax.add_feature(cfeat.STATES, edgecolor='black') -ax.add_feature(cfeat.BORDERS) +ax.add_feature(cfeature.STATES, edgecolor='black') +ax.add_feature(cfeature.BORDERS) # add some lat/lon gridlines ax.gridlines() diff --git a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_bounds.py b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_bounds.py index d2122bc1..83e79087 100644 --- a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_bounds.py +++ b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_bounds.py @@ -27,4 +27,4 @@ ax.grid(True) ax.set_xlabel('Time') ax.xaxis.set_major_formatter(DateFormatter('%m/%d')) - ax.xaxis.set_major_locator(DayLocator()) \ No newline at end of file + ax.xaxis.set_major_locator(DayLocator()) diff --git a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_dictionaryupdate.py b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_dictionaryupdate.py index fb94ec49..9f01efa9 100644 --- a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_dictionaryupdate.py +++ b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_dictionaryupdate.py @@ -21,4 +21,4 @@ ax.grid(True) ax.set_xlabel('Time') ax.xaxis.set_major_formatter(DateFormatter('%m/%d')) - ax.xaxis.set_major_locator(DayLocator()) \ No newline at end of file + ax.xaxis.set_major_locator(DayLocator()) diff --git a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_enumeration.py b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_enumeration.py index ec212f64..6ef67651 100644 --- a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_enumeration.py +++ b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_enumeration.py @@ -1,3 +1,3 @@ for i, item in enumerate(zip(my_list, my_other_list)): reference, quote = item - print(i, ' - ', reference, ' - ', quote) \ No newline at end of file + print(i, ' - ', reference, ' - ', quote) diff --git a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_functions.py b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_functions.py index 3740c6a6..882da00d 100644 --- a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_functions.py +++ b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_functions.py @@ -2,4 +2,4 @@ def myfunc(exp): return 2**exp for i in range(0, 25): - print(myfunc(i)) \ No newline at end of file + print(myfunc(i)) diff --git a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_linestyles.py b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_linestyles.py index 83f0fe27..cc415f5d 100644 --- a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_linestyles.py +++ b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_linestyles.py @@ -16,4 +16,4 @@ ax.grid(True) ax.set_xlabel('Time') ax.xaxis.set_major_formatter(DateFormatter('%m/%d')) - ax.xaxis.set_major_locator(DayLocator()) \ No newline at end of file + ax.xaxis.set_major_locator(DayLocator()) diff --git a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_parameter_iteration.py b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_parameter_iteration.py index 34c6b751..131d22df 100644 --- a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_parameter_iteration.py +++ b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_parameter_iteration.py @@ -2,4 +2,4 @@ plot_names = ['Windspeed', 'Atmospheric Pressure'] for var, name in zip(plot_variables, plot_names): - print('Plotting variable', var, 'as', name) \ No newline at end of file + print('Plotting variable', var, 'as', name) diff --git a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_pressureconversion.py b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_pressureconversion.py index 833323f6..6d9ae689 100644 --- a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_pressureconversion.py +++ b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_pressureconversion.py @@ -30,4 +30,4 @@ def convert_pressure(a): ax.grid(True) ax.set_xlabel('Time') ax.xaxis.set_major_formatter(DateFormatter('%m/%d')) - ax.xaxis.set_major_locator(DayLocator()) \ No newline at end of file + ax.xaxis.set_major_locator(DayLocator()) diff --git a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_troubleshooting.py b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_troubleshooting.py index 0039aa94..64f3f268 100644 --- a/notebooks/Pythonic_Data_Analysis/solutions/pythonic_troubleshooting.py +++ b/notebooks/Pythonic_Data_Analysis/solutions/pythonic_troubleshooting.py @@ -44,4 +44,4 @@ def read_buoy_data(fname): ax.grid(True) ax.set_xlabel('Time') ax.xaxis.set_major_formatter(DateFormatter('%m/%d')) - ax.xaxis.set_major_locator(DayLocator()) \ No newline at end of file + ax.xaxis.set_major_locator(DayLocator()) diff --git a/notebooks/Satellite_Data/GOES_Interactive_Plot.ipynb b/notebooks/Satellite_Data/GOES_Interactive_Plot.ipynb index 4c44720c..73c15f6c 100644 --- a/notebooks/Satellite_Data/GOES_Interactive_Plot.ipynb +++ b/notebooks/Satellite_Data/GOES_Interactive_Plot.ipynb @@ -26,7 +26,7 @@ "from datetime import datetime\n", "\n", "import cartopy.crs as ccrs\n", - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "from IPython.display import display\n", "from ipywidgets import Dropdown, interact, fixed, Select\n", "from matplotlib import patheffects\n", @@ -90,8 +90,8 @@ " fig = plt.figure(figsize=(10, 10))\n", " ax = fig.add_subplot(1, 1, 1, projection=proj)\n", " ax.coastlines(resolution='50m', color='black')\n", - " ax.add_feature(cfeat.STATES, linestyle=':', edgecolor='black')\n", - " ax.add_feature(cfeat.BORDERS, linewidth=2, edgecolor='black')\n", + " ax.add_feature(cfeature.STATES, linestyle=':', edgecolor='black')\n", + " ax.add_feature(cfeature.BORDERS, linewidth=2, edgecolor='black')\n", "\n", " for im in ax.images:\n", " im.remove()\n", diff --git a/notebooks/Satellite_Data/Working with Satellite Data.ipynb b/notebooks/Satellite_Data/Working with Satellite Data.ipynb index e2152dcf..ebae674b 100644 --- a/notebooks/Satellite_Data/Working with Satellite Data.ipynb +++ b/notebooks/Satellite_Data/Working with Satellite Data.ipynb @@ -375,13 +375,13 @@ "metadata": {}, "outputs": [], "source": [ - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "\n", "# Add country borders with a thick line.\n", - "ax.add_feature(cfeat.BORDERS, linewidth=2, edgecolor='black')\n", + "ax.add_feature(cfeature.BORDERS, linewidth=2, edgecolor='black')\n", "\n", "# Add state borders with dotted lines, denoted by ':'\n", - "ax.add_feature(cfeat.STATES, linestyle=':', edgecolor='black')\n", + "ax.add_feature(cfeature.STATES, linestyle=':', edgecolor='black')\n", "\n", "# Redisplay modified figure\n", "fig" @@ -672,8 +672,8 @@ "plt.subplots_adjust(left=0.005, bottom=0.005, right=0.995, top=0.995, wspace=0, hspace=0)\n", "ax.coastlines(zorder=2)\n", "ax.coastlines(resolution='50m', color='black')\n", - "ax.add_feature(cfeat.STATES, linestyle=':')\n", - "ax.add_feature(cfeat.BORDERS, linewidth=2)" + "ax.add_feature(cfeature.STATES, linestyle=':')\n", + "ax.add_feature(cfeature.BORDERS, linewidth=2)" ] }, { diff --git a/notebooks/Satellite_Data/solutions/satellite_conus.py b/notebooks/Satellite_Data/solutions/satellite_conus.py index 8ba9dd34..97e8e4ea 100644 --- a/notebooks/Satellite_Data/solutions/satellite_conus.py +++ b/notebooks/Satellite_Data/solutions/satellite_conus.py @@ -34,8 +34,8 @@ im = ax.imshow(data_var[:], extent=(x.min(), x.max(), y.min(), y.max()), origin='upper', cmap=wv_cmap, norm=wv_norm) ax.coastlines(resolution='50m', color='black') -ax.add_feature(cfeat.STATES, linestyle=':') -ax.add_feature(cfeat.BORDERS, linewidth=2) +ax.add_feature(cfeature.STATES, linestyle=':') +ax.add_feature(cfeature.BORDERS, linewidth=2) # Add text (aligned to the right); save the returned object so we can manipulate it. text_time = ax.text(0.99, 0.01, timestamp.strftime('%d %B %Y %H%MZ'), @@ -50,4 +50,4 @@ text_time.set_path_effects(outline_effect) text_channel.set_path_effects(outline_effect) -fig = add_metpy_logo(fig) \ No newline at end of file +fig = add_metpy_logo(fig) diff --git a/notebooks/Satellite_Data/solutions/satellite_data.py b/notebooks/Satellite_Data/solutions/satellite_data.py index 6d8fa339..26a096d7 100644 --- a/notebooks/Satellite_Data/solutions/satellite_data.py +++ b/notebooks/Satellite_Data/solutions/satellite_data.py @@ -1,4 +1,4 @@ cat = TDSCatalog('http://thredds-test.unidata.ucar.edu/thredds/catalog/casestudies/irma/goes16/Mesoscale-1/Channel09/20170910/catalog.xml') ds = cat.datasets.filter_time_nearest(datetime(2017, 9, 10, 0)) print(ds.name) -ds = ds.remote_access(service='OPENDAP') \ No newline at end of file +ds = ds.remote_access(service='OPENDAP') diff --git a/notebooks/Skew_T/solutions/skewt_dewpoint_limits.py b/notebooks/Skew_T/solutions/skewt_dewpoint_limits.py index b91b2436..ff053330 100644 --- a/notebooks/Skew_T/solutions/skewt_dewpoint_limits.py +++ b/notebooks/Skew_T/solutions/skewt_dewpoint_limits.py @@ -1,4 +1,4 @@ skew.plot(p, Td, color='tab:green') skew.ax.set_xlim(-40, 60) -fig \ No newline at end of file +fig diff --git a/notebooks/Skew_T/solutions/skewt_fiducial_lines.py b/notebooks/Skew_T/solutions/skewt_fiducial_lines.py index 20f8979b..82fd79db 100644 --- a/notebooks/Skew_T/solutions/skewt_fiducial_lines.py +++ b/notebooks/Skew_T/solutions/skewt_fiducial_lines.py @@ -1,4 +1,4 @@ skew.plot_moist_adiabats() skew.plot_mixing_lines() -fig \ No newline at end of file +fig diff --git a/notebooks/Skew_T/solutions/skewt_get_data.py b/notebooks/Skew_T/solutions/skewt_get_data.py index 5b0c1b2c..99f5d357 100644 --- a/notebooks/Skew_T/solutions/skewt_get_data.py +++ b/notebooks/Skew_T/solutions/skewt_get_data.py @@ -4,4 +4,4 @@ T = df['temperature'].values * units(df.units['temperature']) Td = df['dewpoint'].values * units(df.units['dewpoint']) u = df['u_wind'].values * units(df.units['u_wind']) -v = df['v_wind'].values * units(df.units['v_wind']) \ No newline at end of file +v = df['v_wind'].values * units(df.units['v_wind']) diff --git a/notebooks/Skew_T/solutions/skewt_lfc_el.py b/notebooks/Skew_T/solutions/skewt_lfc_el.py index 8e9c1806..4464495c 100644 --- a/notebooks/Skew_T/solutions/skewt_lfc_el.py +++ b/notebooks/Skew_T/solutions/skewt_lfc_el.py @@ -10,4 +10,4 @@ if el_pressure: skew.ax.axhline(el_pressure, color='tab:blue') -fig \ No newline at end of file +fig diff --git a/notebooks/Skew_T/solutions/skewt_plot_hodograph.py b/notebooks/Skew_T/solutions/skewt_plot_hodograph.py index f5bcd1d0..a8045a35 100644 --- a/notebooks/Skew_T/solutions/skewt_plot_hodograph.py +++ b/notebooks/Skew_T/solutions/skewt_plot_hodograph.py @@ -1,4 +1,4 @@ fig = plt.figure(figsize=(3, 3)) h = Hodograph() h.plot_colormapped(u[mask], v[mask], windspeed[mask]) # Plot a line colored by wind speed -h.add_grid(increment=20) \ No newline at end of file +h.add_grid(increment=20) diff --git a/notebooks/Surface_Data/Surface Data with Siphon and MetPy.ipynb b/notebooks/Surface_Data/Surface Data with Siphon and MetPy.ipynb index 2755bf61..7e10c649 100644 --- a/notebooks/Surface_Data/Surface Data with Siphon and MetPy.ipynb +++ b/notebooks/Surface_Data/Surface Data with Siphon and MetPy.ipynb @@ -254,7 +254,7 @@ "%matplotlib inline\n", "\n", "import cartopy.crs as ccrs\n", - "import cartopy.feature as cfeat\n", + "import cartopy.feature as cfeature\n", "import matplotlib.pyplot as plt\n", "\n", "from metpy.plots import StationPlot\n", @@ -264,7 +264,7 @@ "fig = plt.figure(figsize=(12, 12))\n", "proj = ccrs.Stereographic(central_longitude=-95, central_latitude=35)\n", "ax = fig.add_subplot(1, 1, 1, projection=proj)\n", - "ax.add_feature(cfeat.STATES, edgecolor='black')\n", + "ax.add_feature(cfeature.STATES, edgecolor='black')\n", "ax.coastlines(resolution='50m')\n", "ax.gridlines()\n", "\n", @@ -321,7 +321,7 @@ "# Set up a plot with map features\n", "fig = plt.figure(figsize=(12, 12))\n", "ax = fig.add_subplot(1, 1, 1, projection=proj)\n", - "ax.add_feature(cfeat.STATES, edgecolor='black')\n", + "ax.add_feature(cfeature.STATES, edgecolor='black')\n", "ax.coastlines(resolution='50m')\n", "ax.gridlines()\n", "\n", @@ -367,7 +367,7 @@ "# Set up a plot with map features\n", "fig = plt.figure(figsize=(12, 12))\n", "ax = fig.add_subplot(1, 1, 1, projection=proj)\n", - "ax.add_feature(cfeat.STATES, edgecolor='black')\n", + "ax.add_feature(cfeature.STATES, edgecolor='black')\n", "ax.coastlines(resolution='50m')\n", "ax.gridlines()\n", "\n", diff --git a/notebooks/Surface_Data/solutions/station_plot.py b/notebooks/Surface_Data/solutions/station_plot.py index 32c93a69..fc82a351 100644 --- a/notebooks/Surface_Data/solutions/station_plot.py +++ b/notebooks/Surface_Data/solutions/station_plot.py @@ -4,7 +4,7 @@ # Set up a plot with map features fig = plt.figure(figsize=(12, 12)) ax = fig.add_subplot(1, 1, 1, projection=proj) -ax.add_feature(cfeat.STATES, edgecolor='black') +ax.add_feature(cfeature.STATES, edgecolor='black') ax.coastlines(resolution='50m') ax.gridlines() diff --git a/notebooks/Time_Series/solutions/timeseries_basicfinalplot.py b/notebooks/Time_Series/solutions/timeseries_basicfinalplot.py index cf2eea74..2948a8c2 100644 --- a/notebooks/Time_Series/solutions/timeseries_basicfinalplot.py +++ b/notebooks/Time_Series/solutions/timeseries_basicfinalplot.py @@ -22,4 +22,4 @@ # Handling of getting lines and labels from all axes for a single legend lines, labels = ax.get_legend_handles_labels() lines2, labels2 = axb.get_legend_handles_labels() -axb.legend(lines + lines2, labels + labels2, loc='upper left') \ No newline at end of file +axb.legend(lines + lines2, labels + labels2, loc='upper left') diff --git a/notebooks/Time_Series/solutions/timeseries_gustplot.py b/notebooks/Time_Series/solutions/timeseries_gustplot.py index ca977fbb..95128f79 100644 --- a/notebooks/Time_Series/solutions/timeseries_gustplot.py +++ b/notebooks/Time_Series/solutions/timeseries_gustplot.py @@ -5,4 +5,4 @@ ax.legend(loc='upper left') -fig \ No newline at end of file +fig diff --git a/notebooks/Time_Series/solutions/timeseries_parse_dates.py b/notebooks/Time_Series/solutions/timeseries_parse_dates.py index 90ab93d1..12b1aafd 100644 --- a/notebooks/Time_Series/solutions/timeseries_parse_dates.py +++ b/notebooks/Time_Series/solutions/timeseries_parse_dates.py @@ -5,4 +5,4 @@ # Using inplace means the return is None and the dataframe is simply modified. df.drop(['year', 'month', 'day', 'hour', 'minute'], axis='columns', inplace=True) -df.head() \ No newline at end of file +df.head()