code: def aurora_forecast():
      """
      Get the latest Aurora Forecast from https://www.swpc.noaa.gov.
  
      Returns
      -------
      img : numpy array
          The pixels of the image in a numpy array.
      img_proj : cartopy CRS
          The rectangular coordinate system of the image.
      img_extent : tuple of floats
          The extent of the image ``(x0, y0, x1, y1)`` referenced in
          the ``img_proj`` coordinate system.
      origin : str
          The origin of the image to be passed through to matplotlib's imshow.
      dt : datetime
          Time of forecast validity.
  
      """
  
      # GitHub gist to download the example data from
      url = (
          "https://gist.githubusercontent.com/lgolston/594c030876c0614d3"
          "6d13d03e4f115b6/raw/342ff751419204594180e88d69b3986dbd4fea4a/"
          "ovation_aurora_latest.json"
      )
      # To plot the current forecast instead, uncomment the following line
      # url = 'https://services.swpc.noaa.gov/json/ovation_aurora_latest.json'
  
      # load data (JSON format)
      response = urlopen(url)
      aurora = json.loads(response.read().decode("utf-8"))
      # parse timestamp
      dt = datetime.strptime(
          aurora["Forecast Time"], "%Y-%m-%dT%H:%M:%SZ"
      )
      # convert lists of [lon, lat, value] to 2D array of probability values
      aurora_data = np.array(aurora["coordinates"])
      img = np.reshape(aurora_data[:, 2], (181, 360), order="F")
  
      img_proj = ccrs.PlateCarree()
      img_extent = (0, 359, -90, 90)
      return img, img_proj, img_extent, "lower", dt
  
file_path: cartopy/examples/scalar_data/aurora_forecast.py
imports: from datetime import datetime
  import json
  from urllib.request import urlopen
  from matplotlib.colors import LinearSegmentedColormap
  import matplotlib.pyplot
  import numpy
  import cartopy.crs
  from cartopy.feature.nightshade import Nightshade
label_desc: Use image node_id 1 for calling a global function with example usage: aurora_forecast() and returns: img,  img_proj,  img_extent,  str,  dt