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

https://github.com/mdsumner/mapwtf

Maps Anywhere
https://github.com/mdsumner/mapwtf

Last synced: 7 months ago
JSON representation

Maps Anywhere

Awesome Lists containing this project

README

          

---
output: github_document
editor_options:
chunk_output_type: console
---

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

# mapwtf

[![R-CMD-check](https://github.com/mdsumner/mapwtf/workflows/R-CMD-check/badge.svg)](https://github.com/mdsumner/mapwtf/actions)

The goal of mapwtf is to plot topography for simple maps anywhere. Might become a 'automap()' like the 'SOmap_auto()' function in SOmap package.

## Installation

You can install from github with

``` r
remotes::install_github("mdsumner/mapwtf")
```

## Example

This is a basic example which shows you how to plot topography anywhere in any projection on the earth. Just replace 'reg' with your
projected raster to fill it with elevation values using `populate_topo()`.

```{r example}
library(mapwtf)
for (i in seq_len(5)) {
reg <- any_region(width = runif(1L, 50000, 5e6))
x <- populate_topo(reg)
raster::plot(x, col = hcl.colors(256))
grat(x)
}

reg <- any_region(proj = "stere", width = 7e6, lat_0=-90, lon_0=147, lat_ts=-75)
x <- populate_topo(reg)
raster::plot(x, col = hcl.colors(256))
grat(x)

```

## Code of Conduct

Please note that the mapwtf project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.