https://github.com/mdsumner/mapwtf
Maps Anywhere
https://github.com/mdsumner/mapwtf
Last synced: 7 months ago
JSON representation
Maps Anywhere
- Host: GitHub
- URL: https://github.com/mdsumner/mapwtf
- Owner: mdsumner
- License: other
- Created: 2021-05-04T13:30:31.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-04T13:51:56.000Z (about 5 years ago)
- Last Synced: 2024-12-28T12:17:01.726Z (over 1 year ago)
- Language: R
- Homepage: https://mdsumner.github.io/mapwtf/
- Size: 8.61 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
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
[](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.