Skip to contents

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

if (FALSE) { # \dontrun{
panel <- extract_panel(rasters, districts)
plot_ntl_trend(panel, region = "Lucknow")
plot_ntl_trend(panel, region = c("Mumbai", "Delhi", "Chennai"))
} # }