An open API service indexing awesome lists of open source software.

https://github.com/mdsumner/sctrip

trip reboot
https://github.com/mdsumner/sctrip

rstats spatial trip

Last synced: 10 months ago
JSON representation

trip reboot

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

[![Travis-CI Build Status](https://travis-ci.org/mdsumner/sctrip.svg?branch=master)](https://travis-ci.org/mdsumner/sctrip)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/mdsumner/sctrip?branch=master&svg=true)](https://ci.appveyor.com/project/mdsumner/sctrip)
[![Coverage Status](https://img.shields.io/codecov/c/github/mdsumner/sctrip/master.svg)](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.