Title: | Access NASA's Exoplanet Archive Data |
---|---|
Description: | The goal of exoplanets is to provide access to NASA's Exoplanet Archive TAP Service. For more information regarding the API please read the documentation <https://exoplanetarchive.ipac.caltech.edu/index.html>. |
Authors: | Tyler Littlefield [aut, cre] , Maƫlle Salmon [ctb, rev], Mathida Chuk [ctb] |
Maintainer: | Tyler Littlefield <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.3 |
Built: | 2024-09-28 06:28:36 UTC |
Source: | https://github.com/ropensci/exoplanets |
A simple interface for accessing exoplanet data. At the bare minimum, a table name is required. Tables names are documented in the 'tableinfo' dataset.
exoplanets(table, columns = NULL, limit = NULL, format = "csv")
exoplanets(table, columns = NULL, limit = NULL, format = "csv")
table |
A table name, see 'tableinfo'. |
columns |
A vector of valid column names, by default will return all default columns, see 'tableinfo'. |
limit |
Number of rows to return. If NULL, returns all data in the table. |
format |
Desired format, either csv, tsv, or json. |
At one time, this package used the Exoplanet Archive Application Programming Interface (API). Since then, a handful of tables have been transitioned to the Table Access Protocol (TAP) service. More tables will be transitioned to TAP and as such, this package only supports queries from TAP. For more information, you can read https://exoplanetarchive.ipac.caltech.edu/docs/exonews_archive.html#29April2021.
A data.frame
if format="csv"
or format="tsv"
.
A list
if format="json"
.
https://exoplanetarchive.ipac.caltech.edu/
tableinfo
if (interactive()) { # request all default columns from the `ps` table exoplanets("ps") # request the planet name and discovery method from the `ps` table exoplanets("ps", c("pl_name", "discoverymethod")) # request the first 5 rows from the `keplernames` table exoplanets("keplernames", limit = 5) # request in json format (returns list) exoplanets("ps", c("pl_name", "discoverymethod"), format = "json") }
if (interactive()) { # request all default columns from the `ps` table exoplanets("ps") # request the planet name and discovery method from the `ps` table exoplanets("ps", c("pl_name", "discoverymethod")) # request the first 5 rows from the `keplernames` table exoplanets("keplernames", limit = 5) # request in json format (returns list) exoplanets("ps", c("pl_name", "discoverymethod"), format = "json") }
Forget past results and reset the exoplanets
cache.
forget_exoplanets()
forget_exoplanets()
if (interactive()) { system.time(exoplanets("k2names")) system.time(exoplanets("k2names")) forget_exoplanets() system.time(exoplanets("k2names")) }
if (interactive()) { system.time(exoplanets("k2names")) system.time(exoplanets("k2names")) forget_exoplanets() system.time(exoplanets("k2names")) }
This dataset provides table information for NASA's Exoplanet Archive TAP service. In particular, the table name, columns, and column descriptions are provided.
tableinfo
tableinfo
An object of class tbl_df
(inherits from tbl
, data.frame
) with 546 rows and 13 columns.
https://exoplanetarchive.ipac.caltech.edu/docs/TAP/usingTAP.html
tableinfo
tableinfo