plot_ntl_trend: Plot nighttime lights radiance trends

View source: R/plot.R

plot_ntl_trendR Documentation

Plot nighttime lights radiance trends

Description

Line chart of mean radiance over time for one or more regions. Accepts output from extract_panel() or bhuvan_stats().

Usage

plot_ntl_trend(
  panel,
  region = NULL,
  title = "Nighttime lights radiance",
  subtitle = NULL,
  caption = NULL
)

Arguments

panel

A data frame as returned by extract_panel() (with region_id column) or bhuvan_stats() (with state column), plus year and mean_radiance.

region

Character vector of region identifiers to plot. NULL (default) plots all regions.

title

Plot title. Default "Nighttime lights radiance".

subtitle

Optional subtitle string.

caption

Optional caption string.

Value

A ggplot2 object.

Examples


panel <- data.frame(
  region_id = rep(c("Lucknow", "Patna"), each = 4),
  year = rep(2018:2021, 2),
  mean_radiance = c(8.1, 8.6, 8.4, 9.2, 5.0, 5.6, 6.1, 6.9)
)
plot_ntl_trend(panel)
plot_ntl_trend(panel, region = "Patna")


lightson documentation built on Nov. 3, 2026, 5:07 p.m.