https://github.com/Liu-Zhichao/nasaR
nasaR API Client
https://github.com/Liu-Zhichao/nasaR
Last synced: 4 months ago
JSON representation
nasaR API Client
- Host: GitHub
- URL: https://github.com/Liu-Zhichao/nasaR
- Owner: Liu-Zhichao
- License: other
- Created: 2019-12-09T21:54:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-12T20:51:52.000Z (over 5 years ago)
- Last Synced: 2024-08-13T07:14:12.290Z (8 months ago)
- Language: R
- Size: 739 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - Liu-Zhichao/nasaR - nasaR API Client (R)
README
---
output: github_document
---```{r, include = FALSE}
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](https://github.com/Liu-Zhichao/nasaR) with:
``` r
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)
```2. You can get your own NASA API token at: [NASA_API](https://api.nasa.gov/). 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:
```{r example_1}
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)
``````{r example_2}
## Return info of technology which NASA is working on since 2019/12/01.
Techport(update_since = as.Date("2019-12-01"))
``````{r example_3}
## 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](https://cran.r-project.org/web/packages/nasadata/index.html). 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](https://api.nasa.gov/) 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](https://www.linkedin.com/in/zhichao-liu/) directly or leave an issue [here](https://github.com/Liu-Zhichao/nasaR/issues). Thank you!