https://github.com/nelson-gon/umart
umart generates umap art
https://github.com/nelson-gon/umart
art artists dimensionality-reduction generative-art image-processing r-package rstats umap
Last synced: about 1 year ago
JSON representation
umart generates umap art
- Host: GitHub
- URL: https://github.com/nelson-gon/umart
- Owner: Nelson-Gon
- License: apache-2.0
- Created: 2022-02-22T14:40:13.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-19T18:32:38.000Z (over 4 years ago)
- Last Synced: 2025-02-09T08:19:00.887Z (over 1 year ago)
- Topics: art, artists, dimensionality-reduction, generative-art, image-processing, r-package, rstats, umap
- Language: R
- Homepage: https://nelson-gon.github.io/umart
- Size: 119 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
---
title: 'umart generates umap art'
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
[](https://cran.r-project.org/package=umart)
[](https://CRAN.R-project.org/package=umart)
[](https://codecov.io/gh/Nelson-Gon/umart?branch=main)
[](https://github.com/Nelson-Gon/umart/actions/workflows/devel-check.yaml)

[](https://www.repostatus.org/)
[](https://lifecycle.r-lib.org/articles/stages.html)
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
[](https://github.com/Nelson-Gon/umart/commits/main)
[](https://GitHub.com/Nelson-Gon/umart/issues/)
[](https://GitHub.com/Nelson-Gon/umart/issues?q=is%3Aissue+is%3Aclosed)
[](https://makeapullrequest.com)
[](https://GitHub.com/Nelson-Gon/umart/graphs/commit-activity)
# Installation
```{r install, eval=FALSE}
devtools::install_github("Nelson-Gon/umart")
```
# Load library
```{r lib_call}
library(umart)
```
# Data Generation
```{r generate_data}
r_x <- generate_data(mean = 20.5, sd = 0.2)
r_y <- generate_data(mean = 10.5, sd = 0.1)
df <- data.frame(x = r_x, y=r_y, group = rep(paste0("grp_", 1:5), 10))
```
# Run UMAP
```{r run_umap}
umap_df <- run_umap(df[, -3],neighbors = 5, seed = 520)
```
# Generate umart
```{r generate_art}
generate_umart(umap_df, group_col = df$group,
bg_color = "#f2f5f3", use_geom = "geom_segment",
xend = 0.5, yend = 12)
```
# Many neighbors
```{r}
umaps <- run_umap(df[, -3],neighbors = 2:5, seed = 20)
groups <- rep(paste0("g_", 1:5), 40)
generate_umart(umaps, group_col = groups, opacity = 0.15,
bg_color = "#f6feff", use_geom = "geom_col",
use_palette = "Blues"
)
```
---
Please note that the `umart` project is released with a [Contributor Code of Conduct](https://github.com/Nelson-Gon/umart/blob/main/.github/CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.
For further exploration, please `browseVignettes("umart")`.
To raise an issue, please do so
[here](https://github.com/Nelson-Gon/umart/issues)
Thank you, feedback is always welcome :)