inst/doc/india-electrification.R

## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment  = "#>",
  dev.args = list(bg = "transparent")
)

## ----ten-lines, eval = FALSE--------------------------------------------------
# library(lightson)
# 
# token <- earthdata_token()
# rasters <- ntl_download(region = "IND", years = 2015:2025, token = token)
# districts <- get_india_admin(level = "district")
# panel <- extract_panel(rasters, districts)
# plot_ntl_trend(panel, region = "Lucknow")

## ----custom-boundary, eval = FALSE--------------------------------------------
# library(sf)
# my_districts <- sf::read_sf("~/github/bharatviz/public/India_LGD_districts.geojson")
# panel2 <- extract_panel(rasters, my_districts, id_col = "district_name")

Try the lightson package in your browser

Any scripts or data that you put into this service are public.

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