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

https://github.com/tobiste/structr

Structural geology package for R
https://github.com/tobiste/structr

spherical-geometry spherical-projection statistical-analysis structural-geology tectonics

Last synced: about 1 month ago
JSON representation

Structural geology package for R

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# structr

[![R-CMD-check](https://github.com/tobiste/structR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tobiste/structR/actions/workflows/R-CMD-check.yaml)

`{structur}` is a free and open-source package for R that provides tools for structural geology. You can

- analyze and visualize orientation data of structural geology (including, stereographic projections, contouring, fabric plots, and statistics.)

- analyze stress (including visualization of the magnitudes of stress in the Mohr circle and extracting the maximum horizontal stress of a 3D stress tensor)

- reconstruct the orientation of structures in oriented drill cores using the alpha, beta, and gamma angles

- calculate fault displacement components

## Installation

You can install the development version of `{structr}` from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("tobiste/structr")
```

## Example

This is a basic example which shows you how to import data and plot them on a sterographic projection.

```{r stereo, warning=FALSE,message=FALSE}
library(structr)
library(ggplot2)

data(example_planes)
planes <- Plane(example_planes$dipdir, example_planes$dip)

fabric <- or_shape_params(planes)$Vollmer["D"]

ggstereo() +
geom_contourf_stereo(gg(planes)) +
geom_point(data = gg(planes), aes(x, y), color = "grey", shape = 21) +
scale_fill_viridis_d(option = "F") +
labs(
subtitle = "Example data",
title = "Density contour plot",
fill = "Multiples of\nvon Mises-Fisher\ndistribution",
caption = paste0("Equal area, lower hemisphere projection | N: ", nrow(planes), " | Fabric strength: ", round(fabric, 2))
)
```

## Documentation

The detailed documentation can be found at https://tobiste.github.io/structr/

## Author

Tobias Stephan ([tstephan\@lakeheadu.ca](mailto:[email protected]){.email})

## Feedback, issues, and contributions

I welcome feedback, suggestions, issues, and contributions! If you have found a
bug, please file it [here](https://github.com/tobiste/geoprofiler/issues) with
minimal code to reproduce the issue.

## License

MIT License