Skip to content

nasapower

4.3.0

NASA POWER API Client

4packages dependsuggested by 4
27Kdownloads / year
95.1%test coverage
13/13flavors OK

Overview

About

An API client for NASA POWER global meteorology, surface solar energy and climatology data API. POWER (Prediction Of Worldwide Energy Resources) data are freely available for download with varying spatial resolutions dependent on the original data and with several temporal resolutions depending on the POWER parameter and community. This work is funded through the NASA Earth Science Directorate Applied Science Program. For more on the data themselves, the methodologies used in creating, a web-based data viewer and web access, please see https://power.larc.nasa.gov/.

Changes in 4.3.0

Bug fixes

  • Fixes outdated examples where fetching more than one parameter per region was illustrated. The API changed without warning to disallow this and a change was made to the package to stop it, but I forgot to update the examples.

get_power()

  • Added temporal_api = "daily" default to the function signature
  • Parse response$parse("UTF-8") once into raw, then pass raw to both read_lines() and read_csv() — no double network/parse cost
  • Extracted header delimiter strings into named constants (header_begin, header_end)
  • Fixed || precedence bug: temporal_api == "daily" && (... == "re" || ... == "sb") now correctly requires daily for both communities
  • Now captures the return value of .check_inputs() and updates site_elevation/wind_elevation from it

.check_inputs()

  • Removed the unused community parameter
  • Replaced wind_elevation %notin% 10L:300L with wind_elevation < 10L || wind_elevation > 300L (no 291-element vector allocation)
Show all changes in 4.3.0Hide the rest of the changes in 4.3.0
  • Now returns list(site_elevation = ..., wind_elevation = ...) so nulling those values actually propagates to the caller

.check_dates()

  • Added an explicit return(dates) at the end so the climatology path returns NULL visibly rather than falling off the function silently

Minor changes

  • Add user-facing settings to change download options, for *e.g.*, change the timeout for the API connection to 60 seconds, options(nasapower.timeout = 60L).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.2 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 4.3.0
READMEYes · 794 wordsVignettesYes · 1 · staticNEWSYes · 100% structured · mentions 4.3.0Citation fileYes · cites a publicationWebsiteYes · pkgdown
Cites a JOSS paper
Help pages
6 (2 internal)includes a package overview page
Examples that run
100%4 run in a plain check (4 of them under a condition)
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
17%
Vignettes (1)

Downloads

27K
CRAN downloads in the past year
Rank #2,728 · ~74/day · ~2.3K/mo
Daily download trend is not available in this view yet.
1.9K30 days
5.4K90 days
27K1 year
Compare downloads with other packages →
Also on161 r2u8 autocran82 c2d4u

Repository

PracticesBeta

Repository codeberg.org/ropensci/nasapower is linked, but repository-practices checks have not run for it yet. Checks are GitHub-only for now.

How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
15 external dependencies (excludes base and recommended)

Installing nasapower adds 36 packages (22 with compiled code, 13 MB of source tarballs). Heaviest: Rcpp 1.8 MB, yyjsonr 1.3 MB, jsonlite 1.0 MB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
4direct
1indirect
Imports 4
Suggested by 4
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (10)
Author, Maintainer since 1.0.1 (2018)
Contributor · added in 4.0.4
Phillip Alderman contributed a patch to fix an issue with, 'The `file` argument of `vroom()` must use `I()` for literal…
Contributor, Copyright holder · added in 4.2.0
Author of the CRAN package 'rapportools', from which the '.is_boolean()' was derived.
Contributor, Copyright holder · added in 4.2.0
Author of the CRAN package 'rapportools', from which the '.is_boolean()' was derived.
Contributor · added in 3.0.1
Fernando Miguez provided assistance in identifying improper missing value handling in the POWER data, see…
Contributor · added in 4.0.3
Maëlle Salmon contributed a patch to fix issues with using the R package, 'vcr', for testing the API queries, see…
Copyright holder · added in 4.2.0
http://www.curtin.edu.au/
Reviewer
Alison Boyer reviewed nasapower for rOpenSci, see <https://github.com/ropensci/software-review/issues/155>.
Reviewer
Scott Chamberlain reviewed nasapower for rOpenSci, see <https://github.com/ropensci/software-review/issues/155>.
Reviewer
Hazel Kavili reviewed nasapower for rOpenSci, see <https://github.com/ropensci/software-review/issues/155>.
Listed in earlier versions (2)
Western Australia Agriculture Authority (WAAA)
no longer listed · 4.0.4 to 4.1.0
James J. Balamuta
no longer listed · 4.2.5
Releases (30)

Pick two releases to compare their code metrics.

Show 23 earlier eventsHide 23 earlier events

Package metadata

First published
2018-10-14
Total releases
30 / 8 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Download size
234 KB
Appears in task views

Cite

Cite this package

Run in R for the authors' entry:

citation("nasapower")

The package provides a citation file, so citation() returns the authors' own entry.

It points to 10.21105/joss.01035.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for nasapower version 4.3.0 [Data set]. HJJB, LLC. Data release v2026-10-17. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy