Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (20.7%) to scientific vocabulary
Keywords
data
r-package
stapi
star-trek
Last synced: 4 months ago
·
JSON representation
Repository
R package for Star Trek datasets and related R functions.
Basic Info
- Host: GitHub
- Owner: leonawicz
- License: other
- Language: R
- Default Branch: master
- Homepage: https://leonawicz.github.io/rtrek/
- Size: 21.5 MB
Statistics
- Stars: 54
- Watchers: 7
- Forks: 4
- Open Issues: 0
- Releases: 8
Topics
data
r-package
stapi
star-trek
Created over 7 years ago
· Last pushed over 1 year ago
Metadata Files
Readme
Changelog
License
Code of conduct
Codemeta
README.Rmd
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE, comment = "#>", fig.path = "man/figures/README-",
message = FALSE, warning = FALSE, error = FALSE
)
```
# rtrek
[](https://www.repostatus.org/)
[](https://github.com/leonawicz/rtrek/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/leonawicz/rtrek)
[](https://CRAN.R-project.org/package=rtrek)
[](https://cran.r-project.org/package=rtrek)
[](https://github.com/leonawicz/rtrek)
The `rtrek` package provides datasets related to the Star Trek fictional universe and functions for working with those datasets. It interfaces with the [Star Trek API](http://stapi.co/) (STAPI), [Memory Alpha](https://memory-alpha.fandom.com/wiki/Portal:Main) and [Memory Beta](https://memory-beta.fandom.com/wiki/Main_Page) to retrieve data, metadata and other information relating to Star Trek.
The package also contains several local datasets covering a variety of topics such as Star Trek timeline data, universe species data and geopolitical data. Some of these are more information rich, while others are toy examples useful for simple demonstrations. The bulk of Star Trek data is accessed from external sources by API. A future version of `rtrek` will also include summary datasets resulting from text mining analyses of Star Trek novels.

*Image: Example [Leaflet map](https://leonawicz.github.io/rtrek/articles/sc.html) using non-geographic Star Trek map tiles.*
## Installation
Install the CRAN release of `rtrek` with
``` r
install.packages("rtrek")
```
Install the development version from GitHub with
``` r
# install.packages("remotes")
remotes::install_github("leonawicz/rtrek")
```
Examples
Time to be good detectives. Good thing Data has R installed.
These are just a few examples to help you jump right in. See the package articles for more.
### STAPI
Use the Star Trek API (STAPI) to obtain information on the infamous character, Q. Specifically, retrieve data on his appearances and the stardates when he shows up.
The first API call does a lightweight, unobtrusive check to see how many pages of potential search results exist for characters in the database. There are a lot of characters.
The second call grabs only page two results. The third call uses the universal/unique ID `uid` to retrieve data on Q. Think of these three successive uses of `stapi()` as safe mode, search mode and extraction mode.
```{r ex, thm = knitr::knit_theme$get("molokai")}
library(rtrek)
library(dplyr)
stapi("character", page_count = TRUE)
stapi("character", page = 1) |> select(uid, name)
Q <- "CHMA0000025118" #unique ID
Q <- stapi("character", uid = Q)
Q$episodes |> select(uid, title, stardateFrom, stardateTo)
```
### Memory Alpha
Obtain content and metadata from the article about Spock on Memory Alpha:
```{r spock}
x <- ma_article("Spock")
x
x$metadata[[1]]$Born
```
### Memory Beta
Spock was born in 2230. Obtain a subset of the Star Trek universe historical timeline for that year:
```{r timeline}
mb_timeline(2230)
```
Live long and prosper.
## Packages in the trekverse
rtrek: The core Star Trek package
Datasets related to Star Trek, API wrappers to external data sources, and more.
lcars: LCARS aesthetic for Shiny
Create Shiny apps based on the Library Computer Access/Retrieval System (LCARS).
trekcolors: A color palette package
Predefined and customizable Star Trek themed color palettes and related functions.
trekfont: A fonts package
True (Trek) type fonts to style your Star Trek themed graphics text.
## Citation
Matthew Leonawicz (`r substr(Sys.Date(), 1, 4)`). rtrek: Data analysis relating to Star Trek. R package version 0.5.2. https://CRAN.R-project.org/package=rtrek
## Contribute
Contributions are welcome. Contribute through GitHub via pull request. Please create an issue first if it is regarding any substantive feature add or change.
---
Please note that the `rtrek` project is released with a [Contributor Code of Conduct](https://github.com/leonawicz/rtrek/blob/master/CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.
Owner
- Name: Matt Leonawicz
- Login: leonawicz
- Kind: user
- Location: Denver, Colorado, USA
- Repositories: 89
- Profile: https://github.com/leonawicz
R and Shiny developer | Software developer @ropensci @r-music
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "rtrek",
"description": "Provides datasets related to the Star Trek fictional universe and functions for working with the data. The package also provides access to real world datasets based on the televised series and other related licensed media productions. It interfaces with the Star Trek API (STAPI) (<http://stapi.co/>), Memory Alpha (<https://memory-alpha.fandom.com/wiki/Portal:Main>), and Memory Beta (<https://memory-beta.fandom.com/wiki/Main_Page>) to retrieve data, metadata and other information relating to Star Trek. It also contains several local datasets covering a variety of topics. The package also provides functions for working with data from other Star Trek-related R data packages containing larger datasets not stored in 'rtrek'.",
"name": "rtrek: Data Analysis Relating to Star Trek",
"codeRepository": "https://github.com/leonawicz/rtrek",
"issueTracker": "https://github.com/leonawicz/rtrek/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.5.2",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.5.0 (2025-04-11 ucrt)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"author": [
{
"@type": "Person",
"givenName": "Matthew",
"familyName": "Leonawicz",
"email": "rpkgs@pm.me",
"@id": "https://orcid.org/0000-0001-9452-2771"
}
],
"maintainer": [
{
"@type": "Person",
"givenName": "Matthew",
"familyName": "Leonawicz",
"email": "rpkgs@pm.me",
"@id": "https://orcid.org/0000-0001-9452-2771"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "ggrepel",
"name": "ggrepel",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=ggrepel"
},
{
"@type": "SoftwareApplication",
"identifier": "gridExtra",
"name": "gridExtra",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=gridExtra"
},
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "leaflet",
"name": "leaflet",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=leaflet"
},
{
"@type": "SoftwareApplication",
"identifier": "leaflet.extras",
"name": "leaflet.extras",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=leaflet.extras"
},
{
"@type": "SoftwareApplication",
"identifier": "lubridate",
"name": "lubridate",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=lubridate"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
"name": "rmarkdown",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "showtext",
"name": "showtext",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=showtext"
},
{
"@type": "SoftwareApplication",
"identifier": "sysfonts",
"name": "sysfonts",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=sysfonts"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
},
{
"@type": "SoftwareApplication",
"identifier": "trekfont",
"name": "trekfont",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=trekfont"
}
],
"softwareRequirements": {
"1": {
"@type": "SoftwareApplication",
"identifier": "R",
"name": "R",
"version": ">= 4.1"
},
"2": {
"@type": "SoftwareApplication",
"identifier": "downloader",
"name": "downloader",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=downloader"
},
"3": {
"@type": "SoftwareApplication",
"identifier": "dplyr",
"name": "dplyr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=dplyr"
},
"4": {
"@type": "SoftwareApplication",
"identifier": "ggplot2",
"name": "ggplot2",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=ggplot2"
},
"5": {
"@type": "SoftwareApplication",
"identifier": "jpeg",
"name": "jpeg",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=jpeg"
},
"6": {
"@type": "SoftwareApplication",
"identifier": "jsonlite",
"name": "jsonlite",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=jsonlite"
},
"7": {
"@type": "SoftwareApplication",
"identifier": "memoise",
"name": "memoise",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=memoise"
},
"8": {
"@type": "SoftwareApplication",
"identifier": "png",
"name": "png",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=png"
},
"9": {
"@type": "SoftwareApplication",
"identifier": "purrr",
"name": "purrr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=purrr"
},
"10": {
"@type": "SoftwareApplication",
"identifier": "rvest",
"name": "rvest",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rvest"
},
"11": {
"@type": "SoftwareApplication",
"identifier": "tibble",
"name": "tibble",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=tibble"
},
"12": {
"@type": "SoftwareApplication",
"identifier": "tidyr",
"name": "tidyr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=tidyr"
},
"13": {
"@type": "SoftwareApplication",
"identifier": "xml2",
"name": "xml2",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=xml2"
},
"SystemRequirements": null
},
"fileSize": "635.483KB"
}
GitHub Events
Total
- Release event: 1
- Watch event: 4
- Create event: 1
Last Year
- Release event: 1
- Watch event: 4
- Create event: 1
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 4
- Total pull requests: 0
- Average time to close issues: almost 3 years
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 4.75
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- leonawicz (4)
Pull Request Authors
Top Labels
Issue Labels
enhancement (4)
help wanted (2)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 321 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 10
- Total maintainers: 1
cran.r-project.org: rtrek
Data Analysis Relating to Star Trek
- Homepage: https://github.com/leonawicz/rtrek
- Documentation: http://cran.r-project.org/web/packages/rtrek/rtrek.pdf
- License: MIT + file LICENSE
-
Latest release: 0.5.2
published 6 months ago
Rankings
Stargazers count: 7.2%
Forks count: 12.8%
Average: 27.0%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Downloads: 49.8%
Maintainers (1)
Last synced:
5 months ago
Dependencies
DESCRIPTION
cran
- R >= 2.10 depends
- downloader * imports
- dplyr * imports
- ggplot2 * imports
- jpeg * imports
- jsonlite * imports
- magrittr * imports
- memoise * imports
- purrr * imports
- rvest * imports
- tibble * imports
- tidyr * imports
- xml2 * imports
- covr * suggests
- knitr * suggests
- leaflet * suggests
- png * suggests
- rmarkdown * suggests
- showtext * suggests
- sysfonts * suggests
- testthat * suggests
- trekfont * suggests



