https://github.com/mdsumner/sctrip
trip reboot
https://github.com/mdsumner/sctrip
rstats spatial trip
Last synced: 10 months ago
JSON representation
trip reboot
- Host: GitHub
- URL: https://github.com/mdsumner/sctrip
- Owner: mdsumner
- Created: 2017-02-20T11:40:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-06T12:34:29.000Z (about 9 years ago)
- Last Synced: 2024-12-28T12:16:25.430Z (over 1 year ago)
- Topics: rstats, spatial, trip
- Language: R
- Size: 24.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
[](https://travis-ci.org/mdsumner/sctrip)
[](https://ci.appveyor.com/project/mdsumner/sctrip)
[](https://codecov.io/github/mdsumner/sctrip?branch=master)
# sctrip
The goal of sctrip is to reboot the trip package on a firmer basis.
It's not very functional yet, but the goal is to create normal-form PATH objects that fit within a very general
framework for structured data. PATHs aren't that useful in normal-form, but converting from external path-forms to PRIMITIVE forms and back is **very useful**. More soon.
## Installation
You can install sctrip from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("mdsumner/sctrip")
```
## Example
Convert an existing trip object to a PATH and then a PRIMITIVE, composed of segments.
```{r}
library(sctrip)
data("walrus818", package= "trip")
PRIMITIVE(walrus818)
```
Very much experimental, but here we work from raw data to create trips. A trip is a specialist and bespoke PATH, this will be turned inot tools that are much more general.
```{r example}
library(sctrip)
apath <- sc_path(aurora, LONGITUDE_DEGEAST, LATITUDE_DEGNORTH, DATE_TIME_UTC)
```
The PATH object can be converted to PRIMITIVE form:
```{r primitive}
sc::PRIMITIVE(apath)
```
We can do that no matter what choice we made when nominating the vertex columns.
```{r flexible}
sc::PRIMITIVE(sc_path(aurora, DATE_TIME_UTC, LATITUDE_DEGNORTH))
```
Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.