Type: Package
Title: Analytical Color Palettes for Philippine Phenology
Version: 0.1.3
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>.
License: MIT + file LICENSE
URL: https://github.com/pinasr/palettephines
BugReports: https://github.com/pinasr/palettephines/issues
Encoding: UTF-8
RoxygenNote: 7.3.3
Depends: R (≥ 4.1.0)
Imports: ggplot2, graphics, grDevices
Suggests: knitr, rmarkdown, sf, dplyr, sfdep, tidyr, roroph, rnaturalearth, rnaturalearthdata
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2026-04-23 04:52:59 UTC; Nino Jay Talingting
Author: NJ Talingting ORCID iD [aut, cre]
Maintainer: NJ Talingting <ninotalingting77@gmail.com>
Repository: CRAN
Date/Publication: 2026-04-24 20:30:02 UTC

Translate values to Phenological States

Description

Translate values to Phenological States

Usage

cite_phines(palette, value)

Arguments

palette

Name of the palette.

value

A numeric value between 0 and 1.

Value

A character string representing the biological stage and scientific code (e.g., "Seedling (BBCH 10)"). This maps a normalized value to its ecological meaning.

Examples

cite_phines("palay_harvest", 0.8)
cite_phines("forest_transition", 0.2)

Generate Phenological Palettes

Description

Generate Phenological Palettes

Usage

phines(name, n = NULL, direction = 1)

Arguments

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.

Value

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.

Examples

phines("palay_harvest", n = 5)
phines("mangga_pico", direction = -1)

Philippine Phenological Palette Metadata

Description

Internal list containing hex codes and scientific stages (BBCH, MSI, and ST-Mod).

Usage

phines_metadata

Format

An object of class list of length 5.

Value

A nested list where each element represents a palette containing vectors of colors, biological stages, and scientific codes.


ggplot2 Scales for palettephines

Description

ggplot2 Scales for palettephines

Usage

scale_fill_phines(palette = "palay_harvest", discrete = TRUE, ...)

scale_color_phines(palette = "palay_harvest", discrete = TRUE, ...)

Arguments

palette

Palette name.

discrete

Logical, if TRUE returns a discrete scale.

...

Passed to ggplot2 scale functions.

Value

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.

Examples

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

Description

Visual Preview of Palettes

Usage

show_phines(name)

Arguments

name

Palette name.

Value

No return value, called for side effects. This function generates a plot in the active graphics device showing the color blocks of the palette.

Examples

# Use oldpar to respect user's graphical settings
oldpar <- par(no.readonly = TRUE)
show_phines("coral_bleach")
par(oldpar)