Getting Started With PDS3

  collapse = TRUE,
  comment = "#>"

PDS3 is a data standard used extensively by NASA for archiving data from science missions, maintained by JPL. While being replaced by PDS4, PDS4 covers all currently active missions and those covering the history of US space exploration.

The R pds3 package provides tools for parsing PDS3 data, particularly the ODL label format which describes all the metadata of data collection. Want to plot a heatmap of Mars of all the images taken? This is the package for you!

Getting Started

The package is not yet on CRAN, so to install you'll want to use devtools to get the development version from Github.

# Install devtools if you don't already have it
# Install the development version of pds3

Finding Data

If you're exploring this package, chances are you already have a collection of PDS files, but if you're interested in exploring NASA data, the place to get started is The Planetary Data System.

Once you find a mission you're interested in exploring, finding the data explorer is typically straight forward. The metadata this package processes is typically stored in .lbl files. For instance, we'll look at the labels from the Mars Reconnaissance Orbiter's HiRise experiment, particularly the data associated with this image.

Reading & Parsing Data

We'll start by grabbing the label (LBL) file.

href <- ''
req <- curl::curl_fetch_memory(href)
dat <- rawToChar(req$content)

Now we have the data, we'll process it using parse_pds3.

res <- pds3_read(dat)

Cautionary Notes

All of the data you can access from NASA missions is public, but be aware that if you are going to download a large amount, there are almost always better ways than web scraping - be it either a catalog-only download or via FTP, investigate and be sure to be considerate.

Also of note that the data is public and free to use, it is the product of a lot of hard work and it is appropriate to cite the data source and the principle investigators of the instrument whose data you are using. NASA provides a guide to Citing PDS3 Data

One cool thing is that many PDS catalogs include citation information in a PDS3 formatted file we can use this package to extract!

cit_href <- ""
cit_req <- curl::curl_fetch_memory(cit_href)
cit_dat <- rawToChar(cit_req$content)
cit_res <- pds3_read(cit_dat)



Try the pds3 package in your browser

Any scripts or data that you put into this service are public.

pds3 documentation built on May 2, 2019, 6:59 a.m.