knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

nasaR

The goal of nasaR is to provide useful functions to help access NASA data easily.

Installation

  1. You can install the released version of nasaR from github with:
devtools::install_github("Liu-Zhichao/nasaR")
# If you want to read the vignettes of the package by:
browseVignettes("nasaR")
# Then you should use option "build_vignettes = TRUE":
devtools::install_github("Liu-Zhichao/nasaR", build_vignettes = TRUE)
  1. You can get your own NASA API token at: NASA_API. It is highly recommended that you place your private token in the R environment file, and name it "NASA_TOKEN". (the usethis::edit_r_environ() function will be useful). It could help your access to the data be much safer and faster.

Examples

These are some basic examples which show you how to get access to the data you want:

library(nasaR)
## Download an HD astronomy picture of 2019/12/01 and return its explanation text as well.
APOD(date = as.Date("2019-12-01"), hd = TRUE, return_text = TRUE)
## Return info of technology which NASA is working on since 2019/12/01.
Techport(update_since = as.Date("2019-12-01"))
## Return the most recent info about weather on Mars.
Insight(simplified_data_frame = TRUE)

Announcement

R CRAN has an official NASA API interface package called nasadata. However, the version is quite old and has no longer been updated since 2016, and the functions in this package only take the Earth into consideration, info about other planets/objects in the space are not included in the package. So I decide to make an update(includes all the contents nasadata has and more) and build up various functions for acquiring NASA data easily from available APIs as complete as possible. Although a few functions seems to be similar in two packages(e.g. Earth_Assets in nasaR v.s. earth_assets in nasadata), I wrote all the functions myself without any references. Find more info about similarities/updates in the vignette file.

Find Out More

You can find lots of useful helper documents in nasaR package. If you don't know meaning of some specific functions, you could check NASA API official website for detailed information. I believe that you can find the solution there. If you find any questions or have some interesting new idea of the package, feel free to contact the author directly or leave an issue here. Thank you!



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