ropensci / exoplanets Goto Github PK
View Code? Open in Web Editor NEW:earth_americas: Provides access to NASA's Exoplanet Archive
Home Page: https://docs.ropensci.org/exoplanets
License: Other
:earth_americas: Provides access to NASA's Exoplanet Archive
Home Page: https://docs.ropensci.org/exoplanets
License: Other
See usethis::use_package_doc()
.
People will probably either want progress/messages from the function or not want it at all. We should allow the user to define this with something like:
options(exoplanets.progress = FALSE)
So that they don't need to keep providing progress = FALSE
.
It's possible to only select n
rows in the request:
r <- httr::GET("https://exoplanetarchive.ipac.caltech.edu/TAP/sync?query=select+*+from+k2names+top+5&format=csv")
httr::content(r, type = "text/csv")
Add a parameter limit
to exoplanets()
.
Note: Found out about top
from https://www.ivoa.net/documents/ADQL/20180112/PR-ADQL-2.1-20180112.html
Prepare for release:
devtools::build_readme()
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
cran-comments.md
Submit to CRAN:
usethis::use_version('patch')
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version()
Since this API use sql in the URL, it would be cool if we could do something like:
tbl(con, "ps") %>%
filter(pl_name == "foo") %>%
collect()
It sounds cool but I'm not sure if it would work. Part of what is so fun with databases is being able to manipulate the data, see the results (lazily), and then collect when you're ready. But doing this via an API, it sounds like we would need to make a request each time, which could defeat the purpose, and take even longer (the tables offered in TAP right now aren't very large, they will be as more are migrated however).
More: https://twitter.com/tyluRp/status/1390773696860770304?s=20
Prepare for release:
devtools::build_readme()
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
cran-comments.md
Submit to CRAN:
usethis::use_version('patch')
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version()
The tableinfo
dataset is pretty much a raw representation of the tables found at each individual link shown here: https://exoplanetarchive.ipac.caltech.edu/docs/TAP/usingTAP.html
There could be some possible areas of improvement such as replacing "X" with TRUE
, i.e. something more familiar to R users. Below are some ideas:
library(dplyr)
tableinfo %>%
# remove all trailing/leading whitespace
mutate(across(
.cols = where(is.character),
.fns = stringr::str_squish
)) %>%
# replace all empty character values with NA
mutate(across(
.cols = where(is.character),
.fns = dplyr::na_if,
""
)) %>%
# if "X" return TRUE
mutate(across(
.cols = where(is.character),
.fns = ~ ifelse(
test = .x == "X",
yes = TRUE,
no = .x
)
))
The archive has some pretty cool plots that are generated on a frequent basis: https://exoplanetarchive.ipac.caltech.edu/exoplanetplots/
Might be nice to add functions for these, e.g. plot_confirmed()
.
First release:
usethis::use_cran_comments()
Title:
and Description:
@returns
and @examples
Prepare for release:
devtools::build_readme()
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
Submit to CRAN:
devtools::release()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version()
The exoplanets()
function is memoized so give the user an easy option to forget past results and clear the functions cache with forget_exoplanets()
.
library(exoplanets)
# first try
exoplanets("k2names")
# second try, cached
exoplanets("k2names")
# third try, forgotten
memoise::forget(exoplanets)
exoplanets("k2names")
This package used to provide exo_summary
, which provided the summaries you see here: https://exoplanetarchive.ipac.caltech.edu/docs/counts_detail.html
We could just scape the data or wait until all required tables have been migrated to TAP and calculate the summaries ourself.
Some users may want to remove all messages when calling exoplanets()
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.