Science Score: 23.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
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.0%) to scientific vocabulary
Last synced: 11 months ago
·
JSON representation
Repository
Basic Info
- Host: GitHub
- Owner: thiyangt
- Language: R
- Default Branch: main
- Size: 43.5 MB
Statistics
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 0
Created over 5 years ago
· Last pushed over 3 years ago
Metadata Files
Readme
README.Rmd
--- output: github_document --- # nic```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) ``` ## Sri Lanka Nature Inspired Colour Palettes ## Installation You can install the released version of nic from [Github](https://github.com/thiyangt/nic) with: ```{r, warning=FALSE, message=FALSE} #devtools::install_github("thiyangt/nic") library(nic) library(ggplot2) library(tidyr) ``` ## Example This is a basic example which shows you how to solve a common problem: ```{r} library(patchwork) library(here) orchid_image <- ggplot() + annotation_custom(grid::rasterGrob( magick::image_read(here("data-raw","orchid.jpeg")), width=unit(1,"npc"), height=unit(1,"npc")), -Inf, Inf, -Inf, Inf) orchid_pal = nic_palette("orchid_12",12) ixora_pal = nic_palette("ixora_12",12) ixora_image <- ggplot() + annotation_custom(grid::rasterGrob( magick::image_read(here("data-raw","ixora.jpeg")), width=unit(1,"npc"), height=unit(1,"npc")), -Inf, Inf, -Inf, Inf) orchid_plot <- ggplot(data.frame(x = rnorm(1e4), y = rnorm(1e4)), aes(x = x, y = y)) + geom_hex() + coord_fixed() + scale_fill_gradientn(colours = orchid_pal) + ggtitle("Orchid flower") + theme_minimal()+ theme(legend.position = "bottom") ixora_plot <- ggplot(data.frame(x = rnorm(1e4), y = rnorm(1e4)), aes(x = x, y = y)) + geom_hex() + coord_fixed() + scale_fill_gradientn(colours = ixora_pal) + ggtitle("Ixora flower") + theme_minimal()+ theme(legend.position = "bottom") orchid_image + ixora_image + orchid_plot + ixora_plot ``` ```{r} moss_rose_1_image <- ggplot() + annotation_custom(grid::rasterGrob( magick::image_read(here("data-raw","moss_rose_1.jpeg")), width=unit(1,"npc"), height=unit(1,"npc")), -Inf, Inf, -Inf, Inf) moss_rose_2_image <- ggplot() + annotation_custom(grid::rasterGrob( magick::image_read(here("data-raw","moss_rose_2.jpeg")), width=unit(1,"npc"), height=unit(1,"npc")), -Inf, Inf, -Inf, Inf) moss_rose_3_image <- ggplot() + annotation_custom(grid::rasterGrob( magick::image_read(here("data-raw","moss_rose_3.jpeg")), width=unit(1,"npc"), height=unit(1,"npc")), -Inf, Inf, -Inf, Inf) mean_vecs <- sample(seq(5)) sd_vecs <- sample(seq(5)) moss_rose_plot <- ggplot(data.frame(y = c(rnorm(1000,mean=mean_vecs,sd=sd_vecs)),x = sample(LETTERS[1:5],1000,replace=TRUE)),aes(x = x,y = y,fill = x)) + geom_boxplot() + theme_minimal() + scale_fill_manual(values = nic_palette("moss_rose_5")) + theme(legend.position = "none") (moss_rose_1_image + moss_rose_2_image + moss_rose_3_image) / moss_rose_plot ``` ```{r} library(palmerpenguins) coleus_density_img <- ggplot() + annotation_custom(grid::rasterGrob( magick::image_read(here("data-raw","coleus_density.PNG")), width=unit(1,"npc"), height=unit(2,"npc")), -Inf, Inf, -Inf, Inf) coleus_density = nic_palette("coleus_density_7",7) coleus_density_plot <- ggplot(data.frame(x = rnorm(1e4), y = rnorm(1e4)), aes(x = x, y = y)) + geom_hex() + coord_fixed() + scale_fill_gradientn(colours = coleus_density) + ggtitle("coleus_density_7") coleus1a <- ggplot() + annotation_custom(grid::rasterGrob( magick::image_read(here("data-raw","coleus1a.jpg")), width=unit(1,"npc"), height=unit(2,"npc")), -Inf, Inf, -Inf, Inf) pal <- nic_palette("coleusa_2",2) penguins2 <- penguins %>% drop_na() penguinplot <- ggplot(data = penguins2, aes(y = flipper_length_mm, x = sex, fill=sex)) + geom_boxplot() + scale_fill_manual(values = pal) + ggtitle("colleasa_2") (coleus_density_img + coleus_density_plot + coleus1a + penguinplot) ``` ```{r, fig.width=12} #devtools::install_github("edwinth/paletti") library(paletti) statesMap = map_data("state") statesMap$num = rnorm(nrow(statesMap)) kandyan <- knitr::include_graphics(here("data-raw","kandyan_dancer.png")) kandyan <- ggplot() + annotation_custom(grid::rasterGrob( magick::image_read(here("data-raw","kandyan_dancer.png")), width=unit(1,"npc"), height=unit(1,"npc")), -Inf, Inf, -Inf, Inf) pal_kandyan <- nic_palette("kandyan_dancer_6",6) scale_fill_my_palette <- get_pal(pal_kandyan) %>% get_scale_fill() g2 <- ggplot(statesMap, aes(x = long, y = lat, group = group, fill = num)) + geom_polygon(color = "black") + scale_fill_my_palette(discrete = FALSE) (kandyan + g2) ```
Owner
- Name: Thiyanga Talagala
- Login: thiyangt
- Kind: user
- Company: PhD, Monash University, Australia
- Website: http://thiyanga.netlify.com/
- Repositories: 21
- Profile: https://github.com/thiyangt
Time Series, Machine Learning Interpretability, Large-Scale Forecasting (twitter: thiyangt)
GitHub Events
Total
Last Year
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| thiyangt | t****a@m****u | 30 |
| Janith Wanniarachchi | j****i@g****m | 6 |
| Thiyanga Talagala | t****a@g****m | 1 |
Committer Domains (Top 20 + Academic)
monash.edu: 1
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 0
- Total pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: about 9 hours
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- 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
- janithwanni (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 246 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: nic
Nature Inspired Colours
- Homepage: https://github.com/thiyangt/nic
- Documentation: http://cran.r-project.org/web/packages/nic/nic.pdf
- License: CC0
-
Latest release: 0.0.2
published over 3 years ago
Rankings
Forks count: 21.9%
Stargazers count: 28.5%
Dependent packages count: 29.8%
Average: 33.0%
Dependent repos count: 35.5%
Downloads: 49.3%
Maintainers (1)
Last synced:
12 months ago
Dependencies
DESCRIPTION
cran
- knitr * suggests
- palmerpenguins * suggests
- rmarkdown * suggests
- tidyverse * suggests
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
## Sri Lanka Nature Inspired Colour Palettes
## Installation
You can install the released version of nic from [Github](https://github.com/thiyangt/nic) with:
```{r, warning=FALSE, message=FALSE}
#devtools::install_github("thiyangt/nic")
library(nic)
library(ggplot2)
library(tidyr)
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r}
library(patchwork)
library(here)
orchid_image <- ggplot() + annotation_custom(grid::rasterGrob(
magick::image_read(here("data-raw","orchid.jpeg")),
width=unit(1,"npc"),
height=unit(1,"npc")),
-Inf, Inf, -Inf, Inf)
orchid_pal = nic_palette("orchid_12",12)
ixora_pal = nic_palette("ixora_12",12)
ixora_image <- ggplot() + annotation_custom(grid::rasterGrob(
magick::image_read(here("data-raw","ixora.jpeg")),
width=unit(1,"npc"),
height=unit(1,"npc")),
-Inf, Inf, -Inf, Inf)
orchid_plot <- ggplot(data.frame(x = rnorm(1e4), y = rnorm(1e4)), aes(x = x, y = y)) +
geom_hex() +
coord_fixed() +
scale_fill_gradientn(colours = orchid_pal) +
ggtitle("Orchid flower") +
theme_minimal()+
theme(legend.position = "bottom")
ixora_plot <- ggplot(data.frame(x = rnorm(1e4), y = rnorm(1e4)), aes(x = x, y = y)) +
geom_hex() +
coord_fixed() +
scale_fill_gradientn(colours = ixora_pal) +
ggtitle("Ixora flower") +
theme_minimal()+
theme(legend.position = "bottom")
orchid_image + ixora_image + orchid_plot + ixora_plot
```
```{r}
moss_rose_1_image <- ggplot() + annotation_custom(grid::rasterGrob(
magick::image_read(here("data-raw","moss_rose_1.jpeg")),
width=unit(1,"npc"),
height=unit(1,"npc")),
-Inf, Inf, -Inf, Inf)
moss_rose_2_image <- ggplot() + annotation_custom(grid::rasterGrob(
magick::image_read(here("data-raw","moss_rose_2.jpeg")),
width=unit(1,"npc"),
height=unit(1,"npc")),
-Inf, Inf, -Inf, Inf)
moss_rose_3_image <- ggplot() + annotation_custom(grid::rasterGrob(
magick::image_read(here("data-raw","moss_rose_3.jpeg")),
width=unit(1,"npc"),
height=unit(1,"npc")),
-Inf, Inf, -Inf, Inf)
mean_vecs <- sample(seq(5))
sd_vecs <- sample(seq(5))
moss_rose_plot <- ggplot(data.frame(y = c(rnorm(1000,mean=mean_vecs,sd=sd_vecs)),x = sample(LETTERS[1:5],1000,replace=TRUE)),aes(x = x,y = y,fill = x)) +
geom_boxplot() +
theme_minimal() +
scale_fill_manual(values = nic_palette("moss_rose_5")) +
theme(legend.position = "none")
(moss_rose_1_image + moss_rose_2_image + moss_rose_3_image) / moss_rose_plot
```
```{r}
library(palmerpenguins)
coleus_density_img <- ggplot() + annotation_custom(grid::rasterGrob(
magick::image_read(here("data-raw","coleus_density.PNG")),
width=unit(1,"npc"),
height=unit(2,"npc")),
-Inf, Inf, -Inf, Inf)
coleus_density = nic_palette("coleus_density_7",7)
coleus_density_plot <- ggplot(data.frame(x = rnorm(1e4), y = rnorm(1e4)), aes(x = x, y = y)) + geom_hex() +
coord_fixed() +
scale_fill_gradientn(colours = coleus_density) + ggtitle("coleus_density_7")
coleus1a <- ggplot() + annotation_custom(grid::rasterGrob(
magick::image_read(here("data-raw","coleus1a.jpg")),
width=unit(1,"npc"),
height=unit(2,"npc")),
-Inf, Inf, -Inf, Inf)
pal <- nic_palette("coleusa_2",2)
penguins2 <- penguins %>% drop_na()
penguinplot <- ggplot(data = penguins2,
aes(y = flipper_length_mm,
x = sex,
fill=sex)) +
geom_boxplot() +
scale_fill_manual(values = pal) + ggtitle("colleasa_2")
(coleus_density_img + coleus_density_plot + coleus1a + penguinplot)
```
```{r, fig.width=12}
#devtools::install_github("edwinth/paletti")
library(paletti)
statesMap = map_data("state")
statesMap$num = rnorm(nrow(statesMap))
kandyan <- knitr::include_graphics(here("data-raw","kandyan_dancer.png"))
kandyan <- ggplot() + annotation_custom(grid::rasterGrob(
magick::image_read(here("data-raw","kandyan_dancer.png")),
width=unit(1,"npc"),
height=unit(1,"npc")),
-Inf, Inf, -Inf, Inf)
pal_kandyan <- nic_palette("kandyan_dancer_6",6)
scale_fill_my_palette <- get_pal(pal_kandyan) %>%
get_scale_fill()
g2 <- ggplot(statesMap, aes(x = long, y = lat, group = group, fill = num)) +
geom_polygon(color = "black") + scale_fill_my_palette(discrete = FALSE)
(kandyan + g2)
```