geoprofiler

Creates Swath profiles and Distance vs X plots by measuring the accurate distances parallel and perpendicular to user-defined lines

https://github.com/tobiste/geoprofiler

Science Score: 39.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
    Found 3 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.2%) to scientific vocabulary

Keywords

crosssections earth-science geology geomorphology geoscience plotting terrain-analysis transects
Last synced: 6 months ago · JSON representation

Repository

Creates Swath profiles and Distance vs X plots by measuring the accurate distances parallel and perpendicular to user-defined lines

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
crosssections earth-science geology geomorphology geoscience plotting terrain-analysis transects
Created about 1 year ago · Last pushed 10 months ago
Metadata Files
Readme License

README.Rmd

---
output: github_document
---



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

# geoprofiler


[![](https://www.r-pkg.org/badges/version/geoprofiler)](https://cran.r-project.org/package=geoprofiler)
[![](http://cranlogs.r-pkg.org/badges/last-month/geoprofiler)](https://cran.r-project.org/package=geoprofiler)
[![R-CMD-check](https://github.com/tobiste/geoprofiler/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/tobiste/geoprofiler/actions/workflows/R-CMD-check.yaml)
[![codecov](https://codecov.io/gh/tobiste/geoprofiler/branch/main/graph/badge.svg)](https://app.codecov.io/gh/tobiste/geoprofiler?branch=main)


The goal of `{geoprofiler}` is to get distances along and across user-defined 
profile lines or transects. This is useful to visualize the distance-dependency 
of some variables in the geosciences.

![](man/figures/fig.png)

The concept of `{geoprofiler}` is a coordinate transformation of your 
geo-coordinates into "profile coordinates". These coordinates are the 
distances along and across your profile.

## Installation

You must have R installed on your system (see ).
To install `{geoprofiler}` from CRAN, type the following code at the R
command line prompt:

```         
install.packages("geoprofiler")
```

The most recent development version of `{geoprofiler}` is available from
from [GitHub](https://github.com/) and can be installed on your system as follows:

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

## Example

This is a basic example which shows you how to create a profile.

```{r example}
library(geoprofiler)
library(ggplot2)
```

Import example data and transfer them into a `sf` object:

```{r quakes}
data(quakes)
quakes_sf <- sf::st_as_sf(quakes, coords = c("long", "lat"), crs = "WGS84")
```

Create a profile line from two known points:

```{r profile}
profile <- data.frame(lon = c(160, -170), lat = c(-15, -30)) |>
  sf::st_as_sf(coords = c("lon", "lat"), crs = "WGS84") |>
  sf::st_shift_longitude() |>
  profile_line()
```

> Note: You can also create a profile line by a direction via `profile_points()`

Calculate the distances of all points along and across the profile line:

```{r cooridnates}
quakes_profile <- profile_coords(quakes_sf, profile = profile) |>
  dplyr::bind_cols(quakes_sf)
```

Finally, create your profile plot:

```{r plot}
ggplot(quakes_profile, aes(X, depth, color = mag, size = abs(Y), alpha = abs(Y))) +
  geom_point() +
  scale_color_viridis_c("Richter magnitude", option = "A") +
  scale_size_continuous(bquote("Distance from profile (" * degree * ")"), range = c(3, .1)) +
  scale_alpha_continuous(bquote("Distance from profile (" * degree * ")"), range = c(1, .1)) +
  scale_y_reverse() +
  scale_x_continuous(guide = guide_axis(position = "top")) +
  labs(x = bquote("Distance along profile (" * degree * ")"), y = "Depth (km)") +
  theme_classic()
```

The above example uses the `quakes` dataset giving the locations of 1000 seismic
events of MB \> 4.0. The events occurred in a cube near Fiji since 1964.

## Documentation

The detailed documentation can be found at 

## Author

Tobias Stephan ([tstephan\@lakeheadu.ca](mailto:tstephan@lakeheadu.ca){.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.

## How to cite geoprofiler

When referencing this package, please cite the package DOI:
[10.32614/CRAN.package.geoprofiler](https://doi.org/10.32614/CRAN.package.geoprofiler).

## License

GPL-3.0 License

Owner

  • Name: Tobias Stephan
  • Login: tobiste
  • Kind: user
  • Location: Thunder Bay, ON
  • Company: Lakehead University

GitHub Events

Total
  • Release event: 1
  • Public event: 1
  • Push event: 91
  • Create event: 2
Last Year
  • Release event: 1
  • Public event: 1
  • Push event: 91
  • Create event: 2

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total 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
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
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 162 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: geoprofiler

Perpendicular Line Transects for Geosciences

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 162 Last month
Rankings
Dependent packages count: 26.8%
Dependent repos count: 33.0%
Average: 48.8%
Downloads: 86.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 4.0 depends
  • dplyr * imports
  • raster * imports
  • scales * imports
  • sf * imports
  • sp * imports
  • structr * imports
  • tectonicr * imports
  • knitr * suggests
  • rmarkdown * suggests