Interface to NASA APIs in R {nasadata}

Hey there,

the package nasadata is finally officially available via CRAN. This package provides easy access to some of NASA’s open-source APIs.

The following APIs can be assessed with this package:

EONET Webservice

The EONET webservice aims to provide metadata for the examination of natural events (e.g. storms, wildfires, floodings, etc.), which are tracked by various sources.

# event categories:
   id                title
1   6              Drought
2   7        Dust and Haze
3  16          Earthquakes
4   9               Floods
5  14           Landslides
6  19              Manmade
7  15     Sea and Lake Ice
8  10        Severe Storms
9  17                 Snow
10 18 Temperature Extremes
11 12            Volcanoes
12 13          Water Color
13  8            Wildfires

# data sources:
           id                                                 title
1  BCWILDFIRE                     British Columbia Wildfire Service
2     CALFIRE California Department of Forestry and Fire Protection
3        CEMS               Copernicus Emergency Management Service
4          EO                                     Earth Observatory
5       GDACS         Global Disaster Alert and Coordination System
6       GLIDE                      GLobal IDEntifier Number (GLIDE)
7     InciWeb                                               InciWeb
8         IDC    International Charter on Space and Major Disasters
9         MRR                                  LANCE Rapid Response
10  NASA_ESRS            NASA Earth Science and Remote Sensing Unit
11  ReliefWeb                                             ReliefWeb
12  SIVolcano        Smithsonian Institute Global Volcanism Program
13     UNISYS                                        Unisys Weather
14   USGS_CMT  USGS Emergency Operations Collection Management Tool
15       HDDS                 USGS Hazards Data Distribution System

The EONET API can be assessed with the function earth_event():

# earth_event(status = "all", sources = "all", category_id = "all",
#             limit = 10, days = 20, LimitType = "limit", TrySimplify = TRUE)
event <- earth_event(limit = 1)
[1] "Events"   "Sources"   "Categories"   "Geography"   "Meta"

earth_event() returns a list that contains various metadata to the selected events. In this case, the event we have just selected is the for instance the EONET event with the ID EONET_406, a wildfire in North Mexico that occurred on 21 May 2016 in the afternoon.

Further information on the API (current version v2.1) can be found at EONET API documentation.

Earth Imagery API

The aim of the Earth Imagery API is to provide access to imagery that is being retrieved from Landsat 8 Satellites and stored in Google Earth Engine. The API requires a key which is freely available at Of course, given the properties inherent to LANDSAT data, this is better suited for analysis of variatons across large areas, as the resolution is too poor for detailed analysis of specific areas.

This package is still in the early stages of development, if you are interested in keeping track of the recent developments, you can have a look at the GitHub package repo


P.S.: even though the Earth Imagery API provides access to LANDSAT images, plotting spatial objects on satellite data is still best achieved with Google Earth via {dismo} (see Martin’s post on dismo) or {plotKML}.

About This Author

Matthias studied Environmental and Bio-Resources Management with a specialization in Environmental Information Management at the University of Natural Resources and Life Sciences (Vienna). He is currently a PhD student working at the Austrian Institute of Technology. Having written his master's thesis about extreme weather risk identification for the Austrian road network, he currently focuses on modeling of adverse weather events as a basis for risk assessment of road infrastructure networks.

1 Comment

You can post comments in this post.

  • Thanks for the great introduction to the NASA API! That was really useful to me!

    Martin 1 year ago Reply

Post A Reply