| Title: | Analytical Color Palettes for Philippine Phenology |
|---|---|
| Description: | Provides specialized color palettes representing phenological transitions and biological lifecycles within Philippine landscapes. Rather than abstract gradients, these scales are anchored to topologically grounded states such as agricultural maturity, seasonal vegetation shifts, and environmental readiness. Palettes are indexed against the Biologische Bundesanstalt, Bundessortenamt und CHemische Industrie (BBCH) scale (Meier, 2023) <https://www.openagrar.de/servlets/MCRFileNodeServlet/openagrar_derivate_00010428/BBCH-Skala_en.pdf> for terrestrial vegetation and the Reef Health Index (RHI) framework (McField and Kramer, 2007) <https://www.healthyreefs.org> for marine ecosystems. This ensures scientific interoperability across archipelagic spatial models, aligning with global standards for ecological state-transition modeling (Schwartz, 2013) <doi:10.1007/978-94-007-6925-0>. |
| Authors: | NJ Talingting [aut, cre] (ORCID: <https://orcid.org/0009-0003-7245-874X>) |
| Maintainer: | NJ Talingting <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.3 |
| Built: | 2026-06-09 13:48:00 UTC |
| Source: | https://github.com/pinasr/palettephines |
Translate values to Phenological States
cite_phines(palette, value)cite_phines(palette, value)
palette |
Name of the palette. |
value |
A numeric value between 0 and 1. |
A character string representing the biological stage and
scientific code (e.g., "Seedling (BBCH 10)"). This maps a normalized
value to its ecological meaning.
cite_phines("palay_harvest", 0.8) cite_phines("forest_transition", 0.2)cite_phines("palay_harvest", 0.8) cite_phines("forest_transition", 0.2)
Generate Phenological Palettes
phines(name, n = NULL, direction = 1)phines(name, n = NULL, direction = 1)
name |
Palette name (palay_harvest, mangga_pico, coral_bleach, red_tide_watch, forest_transition) |
n |
Number of colors. If NULL, returns the anchor colors. |
direction |
1 for standard, -1 for reversed. |
A character vector of hex colors. If n is NULL,
returns the original anchor colors; otherwise, returns an interpolated
vector of length n for smooth gradients.
phines("palay_harvest", n = 5) phines("mangga_pico", direction = -1)phines("palay_harvest", n = 5) phines("mangga_pico", direction = -1)
Internal list containing hex codes and scientific stages (BBCH, MSI, and ST-Mod).
phines_metadataphines_metadata
An object of class list of length 5.
A nested list where each element represents a palette containing
vectors of colors, biological stages, and scientific codes.
ggplot2 Scales for palettephines
scale_fill_phines(palette = "palay_harvest", discrete = TRUE, ...) scale_color_phines(palette = "palay_harvest", discrete = TRUE, ...)scale_fill_phines(palette = "palay_harvest", discrete = TRUE, ...) scale_color_phines(palette = "palay_harvest", discrete = TRUE, ...)
palette |
Palette name. |
discrete |
Logical, if TRUE returns a discrete scale. |
... |
Passed to ggplot2 scale functions. |
A ggplot2 scale object (class ScaleDiscrete or
ScaleContinuous) to be added to a ggplot object. This maps
data values to the phenological colors of the Philippines.
library(ggplot2) ggplot(mtcars, aes(x = wt, y = mpg, fill = factor(cyl))) + geom_point(shape = 21, size = 3) + scale_fill_phines("palay_harvest")library(ggplot2) ggplot(mtcars, aes(x = wt, y = mpg, fill = factor(cyl))) + geom_point(shape = 21, size = 3) + scale_fill_phines("palay_harvest")
Visual Preview of Palettes
show_phines(name)show_phines(name)
name |
Palette name. |
No return value, called for side effects. This function generates a plot in the active graphics device showing the color blocks of the palette.
# Use oldpar to respect user's graphical settings oldpar <- par(no.readonly = TRUE) show_phines("coral_bleach") par(oldpar)# Use oldpar to respect user's graphical settings oldpar <- par(no.readonly = TRUE) show_phines("coral_bleach") par(oldpar)