nasapower
4.3.0NASA POWER API Client
Overview
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/.
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 bothread_lines()andread_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:300Lwithwind_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 returnsNULLvisibly 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
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- 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%
Downloads
Repository
Repository codeberg.org/ropensci/nasapower is linked, but repository-practices checks have not run for it yet. Checks are GitHub-only for now.
Dependencies
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.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 4.3.0Latest
- RR 4.6.0 released · 2026-04-24
- 4.2.52025-05-31 · diff ↗
- 4.2.42025-04-21 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 4.2.22024-12-18 · diff ↗
- 4.2.12024-05-18 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 4.2.0
- 4.1.02023-12-05 · diff ↗
- 4.0.112023-08-19 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 4.0.102023-02-25 · diff ↗
- 4.0.92023-01-05 · diff ↗
- 4.0.82022-08-13 · diff ↗
- RR 4.2.0 released · 2022-04-22
Show 23 earlier eventsHide 23 earlier events
- 4.0.72022-04-10 · diff ↗
- 4.0.62022-02-28 · diff ↗
- 4.0.52022-02-25 · diff ↗
- 4.0.42022-02-01 · diff ↗
- 4.0.32022-01-04 · diff ↗
- 4.0.22021-12-19 · diff ↗
- 4.0.0
- RR 4.1.0 released · 2021-05-18
- 3.0.12020-10-24 · diff ↗
- 3.0.0
- 2.0.0
- RR 4.0.0 released · 2020-04-24
- 1.1.32019-11-18 · diff ↗
- 1.1.22019-09-07 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 1.1.12019-04-18 · diff ↗
- 1.1.02019-04-10 · diff ↗
- 1.0.72019-02-17 · diff ↗
- 1.0.52019-02-02 · diff ↗
- 1.0.42019-01-08 · diff ↗
- 1.0.22018-10-18 · diff ↗
- 1.0.12018-10-14
- RR 3.5.0 released · 2018-04-23
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
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.
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.