A GET request to the Astronomy Picture of the Day (APOD) web service on September 18, 2020, returned the above photo of the spiral galaxy Arp 78. APOD is one of many APIs available through NASA Open APIs. Like APOD, some include imagery, such as the Earth Polychromatic Imaging Camera (EPIC) API, which returns images like this:

Others include data. The Coronal Mass Ejection Analysis API, which is part of the DONKI suite of space weather forecasting tools, returns data that looks like this:

[
   {
      "time21_5":"2016-09-06T14:18Z",
      "latitude":-20.0,
      "longitude":120.0,
      "halfAngle":31.0,
      "speed":674.0,
      "type":"C",
      "isMostAccurate":true,
      "associatedCMEID":"2016-09-06T08:54:00-CME-001",
      "note":"",
      "catalog":"SWRC_CATALOG",
      "link":"https://kauai.ccmc.gsfc.nasa.gov/DONKI/view/CMEAnalysis/11233/-1"
   },
   {
      "time21_5":"2016-09-15T04:24Z",
      "latitude":-18.0,
      "longitude":-122.0,
      "halfAngle":43.0,
      "speed":722.0,
      "type":"C",
      "isMostAccurate":true,
      "associatedCMEID":"2016-09-14T23:36:00-CME-001",
      "note":"Measured with swpc_cat using C3 and STA Cor2 imagery.",
      "catalog":"SWRC_CATALOG",
      "link":"https://kauai.ccmc.gsfc.nasa.gov/DONKI/view/CMEAnalysis/11256/-1"
   }
]

In this article, we’ll dig into an API that, like the one above, returns NASA data in JSON format. We’ll explore a small portion of all the available information provided through NASA Open APIs. We’ll visualize that data with a Python library called Bokeh to help contextualize it for the viewer.

Check out the interactive visualization created in this tutorial or see the code on GitHub.

#python #astronomy #programming #nasa #visualization #coding #space #hackernoon-top-story

Visualizing Asteroids in Python with Bokeh and NASA APIs
2.10 GEEK