knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
# devtools::install_github("Liu-Zhichao/nasaR")
library(nasaR)

Functions

The followings show the usage and examples of all functions (sorted alphabetically) included in the package. For detailed meaning of each parameter, please check the helper file of each funtion by running "?[function name]" in the console.
Tips: All examples are valid only when you place NASA token in R.evironment and name it "NASA_TOKEN" (by default), otherwise you need check the helper file carefully and enter your private key in the function every time.

APOD

Description

The function helps print out an stronomy picture of the day. Each day a different image or photograph of our fascinating universe is featured, along with a brief explanation written by a professional astronomer.

Parameters

APOD <- function(key = Sys.getenv("NASA_TOKEN"), date = Sys.Date(), hd = FALSE, return_text = FALSE, download_filename = "img.jpg")

Examples

APOD()
APOD(date = as.Date("2019-11-01"), hd = TRUE, return_text = TRUE)

CAD

Description

This function provides access to current close-approach data for all asteroids and comets in JPL’s SBDB (Small-Body DataBase). See detailed info at: https://ssd-api.jpl.nasa.gov/doc/cad.html.

Parameters

CAD <- function(date_min = "now", date_max = lubridate::today() + 60, dist_min = NULL, dist_max = "0.05", h_min = NULL, h_max = NULL, v_inf_min = NULL, v_inf_max = NULL, v_rel_min = NULL, v_rel_max = NULL, class = NULL, pha = FALSE, nea = FALSE, comet = FALSE, nea_comet = FALSE, neo = TRUE, kind = NULL, spk = NULL, des = NULL, body = "Earth", sort = "date", limit = NULL, fullname = FALSE)

Examples

CAD(des = "433", date_min = as.Date("2019-01-01"), date_max = as.Date("2100-01-01"), dist_max = "0.2")
CAD(dist_max = "10LD", date_min = as.Date("2018-01-01"), sort = "dist")

DONKI_CME

Description

This function provides access to the data of Coronal Mass Ejection (CME).

Parameters

DONKI_CME <- function(key = Sys.getenv("NASA_TOKEN"), start_date = end_date - 30, end_date = lubridate::today(tzone = "UTC"))

Examples

DONKI_CME(end_date = as.Date("2019-11-20"))

DONKI_CME_Analysis

Description

This function provides access to the data of Coronal Mass Ejection (CME) Analysis.

Parameters

DONKI_CME_Analysis <- function(key = Sys.getenv("NASA_TOKEN"), start_date = end_date - 30, end_date = lubridate::today(tzone = "UTC"), mostAccurateOnly = TRUE, completeEntryOnly = TRUE, speed = 0, halfAngle = 0, catalog = "ALL", keyword = "NONE")

Examples

DONKI_CME_Analysis(start_date = as.Date("2016-09-01"), end_date = as.Date("2016-09-30"), speed = 500, halfAngle = 30)

DONKI_FLR

Description

This function provides access to the data of Solar Flare (FLR).

Parameters

DONKI_FLR <- function(key = Sys.getenv("NASA_TOKEN"), start_date = end_date - 30, end_date = lubridate::today(tzone = "UTC"))

Examples

DONKI_FLR(start_date = as.Date("2019-01-01"), end_date = as.Date("2019-06-30"))

DONKI_GST

Description

This function provides access to the data of Geomagnetic Storm (GST).

Parameters

DONKI_GST <- function(key = Sys.getenv("NASA_TOKEN"), start_date = end_date - 30, end_date = lubridate::today(tzone = "UTC")){

Examples

DONKI_GST(start_date = as.Date("2015-01-01"), end_date = as.Date("2015-06-30"))

DONKI_HSS

Description

This function provides access to the data of Hight Speed Stream (HSS).

Parameters

DONKI_HSS <- function(key = Sys.getenv("NASA_TOKEN"), start_date = end_date - 30, end_date = lubridate::today(tzone = "UTC"))

Examples

DONKI_HSS(start_date = as.Date("2019-01-01"))

DONKI_IPS

Description

This function provides access to the data of Interplanetary Shock (IPS).

Parameters

DONKI_IPS <- function(key = Sys.getenv("NASA_TOKEN"), start_date = end_date - 30, end_date = lubridate::today(tzone = "UTC"), location = "ALL", catalog = "ALL")

Examples

DONKI_IPS(start_date = as.Date("2019-01-01"), end_date = as.Date("2019-10-31"), location = "Earth")

DONKI_MPC

Description

This function provides access to the data of Magnetopause Crossing (MPC).

Parameters

DONKI_MPC <- function(key = Sys.getenv("NASA_TOKEN"), start_date = end_date - 30, end_date = lubridate::today(tzone = "UTC"))

Examples

DONKI_MPC(start_date = as.Date("2018-01-01"))

DONKI_Notifications

Description

This function provides access to the data of Notifications.

Parameters

DONKI_Notifications <- function(key = Sys.getenv("NASA_TOKEN"), start_date = end_date - 7, end_date = lubridate::today(tzone = "UTC"), type = "all")

Examples

DONKI_Notifications(start_date = as.Date("2019-01-01"), end_date = as.Date("2019-03-01"))

DONKI_RBE

Description

This function provides access to the data of Radiation Belt Enhancement (RBE).

Parameters

DONKI_RBE <- function(key = Sys.getenv("NASA_TOKEN"), start_date = end_date - 30, end_date = lubridate::today(tzone = "UTC"))

Examples

DONKI_RBE(start_date = as.Date("2019-01-01"))

DONKI_SEP

Description

This function provides access to the data of Solar Energetic Particle (SEP).

Parameters

DONKI_SEP <- function(key = Sys.getenv("NASA_TOKEN"), start_date = end_date - 30, end_date = lubridate::today(tzone = "UTC"))

Examples

DONKI_SEP(start_date = as.Date("2000-01-01"), end_date = as.Date("2010-12-31"))

DONKI_WSAEnlilSimulation

Description

This function provides access to the data of WSA+EnlilSimulation.

Parameters

DONKI_WSAEnlilSimulation <- function(key = Sys.getenv("NASA_TOKEN"), start_date = end_date - 7, end_date = lubridate::today(tzone = "UTC"))

Examples

DONKI_WSAEnlilSimulation(start_date = as.Date("2019-10-01"), end_date = as.Date("2019-10-15"))

Earth_Assets (This function is similar to "earth_asset" in nasadata package.)

Description

This function retrieves retrieves the date-times and asset names for available imagery for a supplied location.

Parameters

Earth_Assets <- function(key = Sys.getenv("NASA_TOKEN"), lat, lon, begin_date, end_date = Sys.Date())

Examples

Earth_Assets(lon = 100.75, lat = 1.5, begin_date = as.Date("2014-02-01"))

Earth_Imagery (This function is similar to "earth_image" + "plot_earth_image" in nasadata package.)

Description

This function retrieves the Landsat 8 image for the supplied location and date.

Parameters

Earth_Imagery <- function(key = Sys.getenv("NASA_TOKEN"), lat, lon, dim = 0.025, date = Sys.Date(), cloud_score = FALSE, download_filename = "img.png")

Examples

Earth_Imagery(lon = 100.75, lat = 1.5, date = as.Date("2014-02-01"), cloud_score = TRUE)

EONET_Events (This function is similar to "earth_event", "eonet_categories", and "eonet_sources" in nasadata package.)

Description

This function helps get access to the information of events on the Earth (filtered by events/categories/layers).

Parameters

EONET_Events <- function(source = c("InciWeb", "EO"), status = "open", limit = 5, days = 20, by_events = TRUE, by_layers = FALSE, category_id = 8)

Examples

#### Filtered by events:
EONET_Events(source = "InciWeb", limit = 10, days = 30)
#### Filtered by categories:
EONET_Events(category_id = 8, source = "EO", limit = 5, days = 365, by_events = FALSE)
#### Filtered by layers:
EONET_Events(by_layers = TRUE, category_id = 14)

EPIC

Description

This function helps provide information on the daily imagery collected by DSCOVR's Earth Polychromatic Imaging Camera (EPIC) instrument.

Parameters

EPIC <- function(key = Sys.getenv("NASA_TOKEN"), query_by_date, date = Sys.Date(), download = FALSE)

Examples

EPIC(query_by_date = "natural")
EPIC(query_by_date = "enhanced/date", date = as.Date("2019-11-01"))
EPIC(query_by_date = "natural/date", date = as.Date("2019-06-01"), download = TRUE)

Exoplanet

Description

This function allows programatic access to NASA's Exoplanet Archive database. See detailed info at: https://exoplanetarchive.ipac.caltech.edu/docs/program_interfaces.html#data.

Parameters

Exoplanet <- function(table = "exoplanets", select = NULL, count = NULL, colset = NULL, where = NULL, order = NULL, ra = NULL, dec = NULL, radius = NULL, aliastable = NULL)

Examples

Exoplanet()
Exoplanet(select = "pl_hostname", order = "dec")
Exoplanet(ra = 291, dec = 48, radius = "1 degree")
Exoplanet(table = "cumulative", where = c("koi_prad<2", "koi_teq>180", "koi_teq<303", "koi_disposition like 'CANDIDATE'"))
Exoplanet(aliastable = "bet Pic")

Fireball

Description

This function helps provide a method of requesting specific records from the available data-set. Every successful query will return content representing one or more fireball data records. See detailed info at: https://ssd-api.jpl.nasa.gov/doc/fireball.html.

Parameters

Fireball <- function(date_min = lubridate::today(), date_max = lubridate::today() + 60, energy_min = NULL, energy_max = NULL, impact_e_min = NULL, impact_e_max = NULL, vel_min = NULL, vel_max = NULL, alt_min = NULL, alt_max = NULL, req_loc = FALSE, req_alt = FALSE, req_vel = FALSE, req_vel_comp = FALSE, vel_comp = FALSE, sort = "date", limit = NULL)

Examples

Fireball(date_min = as.Date("2014-01-01"), limit = 20)
Fireball(date_min = as.Date("2015-01-01"), req_alt = TRUE, sort = "-date")

GeneLab_Search

Description

This function helps get access to the data from GeneLab website.

Parameters

GeneLab_Search <- function(key = Sys.getenv("NASA_TOKEN"), term = "", type = "cgene", from = 0, size = 25, order = "DESC", ffield, fvalue)

Examples

GeneLab_Search(term = "space", ffield = "links", fvalue = "GPL16417", type = "cgene,nih_geo_gse")
GeneLab_Search(ffield = "Accession", fvalue = "GSE82255")

Insight

Description

This function helps provide per-Sol summary data for each of the last seven available Sols (Martian Days).

Parameters

Insight <- function(key = Sys.getenv("NASA_TOKEN"), ver = "1.0", feedtype = "json", simplified_data_frame = FALSE)

Examples

Insight()
Insight(simplified_data_frame = TRUE)

Mission_Design

Description

This function helps get access to the JPL/SSD small-body mission design suite. See detailed info at: https://ssd-api.jpl.nasa.gov/doc/mdesign.html.

Parameters

Mission_Design <- function(mode = "Q", des = NULL, spk = NULL, sstr = NULL, class = FALSE, mjd0 = NULL, span = NULL, tof_min = NULL, tof_max = NULL, step = NULL)

Examples

#### Mode: Q
Mission_Design(des = "2012%20TC4")
Mission_Design(des = 1, class = TRUE)
Mission_Design(sstr = "apophis")
#### Mode: M
Mission_Design(mode = "M", des = "2012%20TC4", mjd0 = 58490, span = 3652, tof_min = 10, tof_max = 365, step = 2)

MRP_date

Description

This function helps get access to Mars Rover Photos - Querying by Earth date.

Parameters

MRP_date <- function(key = Sys.getenv("NASA_TOKEN"), earth_date, camera = "all", page = 1, type = "curiosity", download_image = FALSE)

Examples

MRP_date(earth_date = "2015-06-03")
MRP_date(earth_date = "2019-05-01", download_image = TRUE)

MRP_sol

Description

This function helps get access to Mars Rover Photos - Querying by Martian sol.

Parameters

MRP_sol <- function(key = Sys.getenv("NASA_TOKEN"), sol = 1000, camera = "all", page = 1, type = "curiosity", download_image = FALSE)

Examples

MRP_sol(download_image = TRUE)
MRP_sol(camera = "MAST", page = 2)
MRP_sol(type = "opportunity")

NASA_Image_Video

Description

This function helps get access to Info of images/videos in NASA Image and Video Library.

Parameters

NASA_Image_Video <- function(endpoint, nasa_id = NULL, q = NULL, center = NULL, description = NULL, description_508 = NULL, keywords = NULL, location = NULL, media_type = NULL, page = NULL, photographer = NULL, secondary_creator = NULL, title = NULL, year_start = NULL, year_end = NULL)

Examples

NASA_Image_Video(endpoint = "search", q = "apollo%2011", description = "moon%20landing", media_type = "image")
NASA_Image_Video(endpoint = "asset", nasa_id = "as11-40-5874")
NASA_Image_Video(endpoint = "metadata", nasa_id = "as11-40-5874")
NASA_Image_Video(endpoint = "captions", nasa_id = "172_ISS-Slosh")

Neo_Browse

Description

This function helps browse the overall Asteroid dataset.

Parameters

Neo_Browse <- function(key = Sys.getenv("NASA_TOKEN"))

Examples

Neo_Browse()

Neo_Feed

Description

This function retrieves a list of Asteroids based on their closest approach date to Earth.

Parameters

Neo_Feed <- function(key = Sys.getenv("NASA_TOKEN"), start_date, end_date = start_date + 7, as_dataframe = FALSE)

Examples

Neo_Feed(start_date = as.Date("2019-11-01"), end_date = as.Date("2019-11-03"), as_dataframe = TRUE)

Neo_Lookup

Description

This function helps lookup a specific Asteroid based on its NASA JPL small body (SPK-ID) ID.

Parameters

Neo_Lookup <- function(key = Sys.getenv("NASA_TOKEN"), asteroid_id)

Examples

Neo_Lookup(asteroid_id = 3542519)

NHATS

Description

This function provides a method of requesting data from the NHATS-related tables in the SBDB. See detailed info at: https://ssd-api.jpl.nasa.gov/doc/nhats.html.

Parameters

NHATS <- function(mode = "S", dv = 12, dur = 450, stay = 8, launch = "2020-2045", h = NULL, occ = NULL, spk = NULL, des = NULL, plot = FALSE)

Examples

#### Mode: S
NHATS(dv = 6, dur = 360, stay = 8, launch = "2020-2045", h = 26, occ = 7)
#### Mode: O
NHATS(mode = "O", des = "99942")
NHATS(mode = "O", des = "2000%20SG344", dv = 6, dur = 360, stay = 8, launch = "2020-2045")

Patents - THIS IS DOWN CURRENTLY!

Description

This function helps get access to the data of NASA's patents.

Parameters

Patents <- function(key = Sys.getenv("NASA_TOKEN"), query, concept_tags = FALSE, limit = 5)

Examples

Patents(query = "temperature")

Scout

Description

This function provides access to near-realtime results from the CNEOS Scout system. See detailed info at: https://ssd-api.jpl.nasa.gov/doc/scout.html.

Parameters

Scout <- function(mode = "O", tdes = NULL, plot = NULL, file = NULL, orbits = FALSE, n_orbits = 1000, eph_start = "now", eph_stop = NULL, eph_step = NULL, obs_code = "500", fov_diam = NULL, fov_ra = NULL, fov_dec = NULL, fov_vmag = NULL)

Examples

## Note that the NEOCP object tdes used in the following examples is not guaranteed to still exist in the database.
#### Mode: O
Scout(tdes = "P10vY9r")
Scout(tdes = "P10vY9r", plot = "el")
Scout(tdes = "P10vY9r", orbits = 1)
#### Mode: E
Scout(mode = "E", tdes = "P10vY9r", eph_start = "2016-09-24T12:00:00")
Scout(mode = "E", tdes = "P10vY9r", eph_start = "2016-09-25T18:00:00", eph_stop = "2016-09-26T06:00:00", eph_step = "2h")

Sentry

Description

This function provides access to results from the CNEOS Sentry system. See detailed info at: https://ssd-api.jpl.nasa.gov/doc/sentry.html.

Parameters

Sentry <- function(mode = "S", spk = NULL, des = NULL, h_max = NULL, ps_min = NULL, ip_min = NULL, days = NULL, all = FALSE, removed = FALSE)

Examples

#### Mode: O
Sentry(mode = "O", des = "99942")
Sentry(mode = "O", des = "2000%20SG344")
#### Mode: S
Sentry()
#### Mode: V
Sentry(mode = "V", all = TRUE, ip_min = 1e-3)
#### Mode: R
Sentry(mode = "R", removed = TRUE)

Techport

Description

This function helps discover the technologies NASA is working on every day to explore space, understand the universe, and improve aeronautics.

Parameters

Techport <- function(key = Sys.getenv("NASA_TOKEN"), id_parameter = NULL, all_valid_id = FALSE, update_since = NULL)

Examples

Techport(id_parameter = 17792)
Techport(all_valid_id = TRUE)
Techport(update_since = as.Date("2016-01-01"))

TLE

Description

This function helps get access to the data of earth-orbiting objects

Parameters

TLE <- function(satellite_name = NULL, satellite_num = NULL)

Examples

TLE(satellite_name = "HTV")
TLE(satellite_num = 43553)


Liu-Zhichao/nasaR documentation built on Dec. 16, 2019, 10:48 p.m.