A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/kevinsblake/NatParksPalettes below:

kevinsblake/NatParksPalettes: Color palette package inspired by National Parks

National Parks Palettes

Color palettes inspired by National Parks.

NatParksPalettes is comprised of 30 color palettes, including 12 colorblind-friendly palettes, based on photos of national parks from around the world. Compatible with {ggplot2} in R and QGIS.

For more National Parks inspired palettes, see the nationalparkcolors package. Palettes converted to .xml with Convert R palette to QGIS Style XML.

Installation

Palettes

Functions

Colorblind Checking

NatParksPalettes is on CRAN and able to be downloaded in R. It can still be installed through GitHub.

# Install through CRAN
install.packages("NatParksPalettes")

# Install through GitHub
install.packages("devtools")
devtools::install_github("kevinsblake/NatParksPalettes")

From QGIS, open Settings Style Manager... expand the Import/Export drop-down menu and select Import Item(s).... Expand the Import from drop-down menu, select URL, and paste this URL:

https://raw.githubusercontent.com/kevinsblake/NatParksPalettes/main/GIS/NatParksPalettes.xml

Then select Fetch Items. Choose individual palettes or select Select All then select Import.

library(NatParksPalettes)

names(NatParksPalettes)
 [1] "Acadia"      "Arches"      "Arches2"     "Banff"       "BryceCanyon" "CapitolReef" "Chamonix"   "CraterLake"  "Cuyahoga"    "DeathValley" "Denali"     
[12] "Everglades"  "Glacier"     "GrandCanyon" "Halekala"    "IguazuFalls" "KingsCanyon" "LakeNakuru"  "Olympic"     "Redwood"     "RockyMtn"    "Saguaro"    
[23] "SmokyMtns"   "SouthDowns"  "Torres"      "Triglav"     "WindCave"    "Volcanoes"   "Yellowstone" "Yosemite"

Chamonix-Mont-Blanc NP, France

Iguazu Falls NP, Argentina & Brazil

Torres del Paine NP, Chile

Hawai'i Volcanoes NP, USA

You can retrieve palettes using various methods listed below.
natparks.pals(name="DeathValley",n=7,type="discrete")

natparks.pals("Yellowstone", 5)

.png)

natparks.pals("Glacier",n=15,type="continuous")

natparks.pals("Arches",n=100)

Here are also some ways you can incorporate this package into {ggplot2}

ggplot(data=iris, aes(x=Species, y=Petal.Length, fill=Species)) +
  geom_violin() +
  scale_fill_manual(values=natparks.pals("Yellowstone", 3))

ggplot(data=iris, aes(x=Sepal.Length, y=Sepal.Width, color=Species)) +
  geom_point(size=2) +
  scale_color_manual(values=natparks.pals("Banff", 3))

ggplot(data=iris, aes(x=Species, y=Sepal.Width, color=Sepal.Width)) +
  geom_point(size=3) +
  scale_color_gradientn(colors=natparks.pals("Arches2"))

Colorblind Friendly checking

The colorblind friendliness of all palettes have been checked using colorblindcheck. Those with [min_dist] >10 for all color vision deficiencies - deuteranopia, protanopia, and tritanopia - are considered colorblind friendly. You can list the colorblind-friendly palettes with the following code:

NatParksPalettes::colorblind_palettes
[1] "Acadia"      "Arches"      "Arches2"     "DeathValley" "Glacier"     "KingsCanyon"

You can also check if a specific palette is colorblind friendly using the function provided

NatParksPalettes::colorblind.friendly("DeathValley")
[1] TRUE

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4