Repository navigation
Releases
nert 2.1.0
nert 2.1.0
Accepted by rOpenSci!
Major changes
- Reexport [terra::plot()] along with
activeCat,categoriesandcatsfor working with raster data from TERN. - Update all URLs to point to rOpenSci.
Minor changes
- Use Markdown syntax in Roxygen code.
- Use
@inheritsto deduplicate Roxygen code. - Other minor code linting and polishing.
nert 2.0.0
-
Breaking change: nert no longer re-exports
autoplot(). The examples,
README and vignettes now plot withplot()from terra. Code that called
autoplot()can usetidyterra::autoplot()instead. -
nert now requires R 4.1.0 or later, the oldest version on which testthat
installs. -
collect_tern_data()is faster. GDAL no longer checks TERN for file types
nert does not read: nert setsCPL_VSIL_CURL_ALLOWED_EXTENSIONSto
.tif,.vrt,.aux.xmlwhile it reads and then restores your own value. -
Retries are handled by GDAL through
GDAL_HTTP_MAX_RETRYand
GDAL_HTTP_RETRY_DELAY, set frommax_triesandinitial_delay. GDAL
retries busy and server-error responses, both when a file is opened and when
its values are read later. The previous retry loop could not recover,
because GDAL remembered the first failure. -
plot()on aread_smips()raster now shows the correct values. It used
to draw from the file's overviews, which hold wrong values at the coast. -
The TERN API key is passed to GDAL as the
GDAL_HTTP_USERPWDsetting
instead of in the file URL, soterra::sources()no longer shows it. The
setting lasts for the R session and GDAL sends it to every server read with
/vsicurl, so the first read warns about this. -
The screenshots in the Getting started vignette and the plots in the README
and the Bandwidth-safe spatial subsetting vignette now have alt-text. -
New
show_datasets()returns the datasets nert can read, with their
aliases, TERN IDs, time steps, resolutions and descriptions. The table that
collect_tern_data()prints comes from the same source. -
Michael Sumner and Shandiya Balasubramaniam added as package reviewers
(rOpenSci review, ropensci/software-review#785). -
Breaking change:
collect_tern_data()takes each row's PHENOLOGY value from
the year of that row'sdate, and leaves rows dated outside 2003--2018 as
NAwith a warning. PHENOLOGY columns no longer carry the year
(PHENOLOGY_SGS_y2018_s1becomesPHENOLOGY_SGS_s1) (#95). -
get_key()checks the"nert"keyring first, then the default keyring (#92). -
The SMIPS date validator now uses a per-collection earliest date. Requests
for thetotalbucketandSMindexcollections are accepted back to
2005-01-01 (these are archived earlier than the four bucket-level
collectionsbucket1,bucket2,deepD, andrunoff, which start
2015-01-01). Previously every SMIPS request before 2015-01-01 was rejected,
so valid 2005--2014totalbucket/SMindexrequests were turned away. The
out-of-range error message now also names the requested collection. -
The offline test suite now covers every dataset handler and validator
directly, in addition to the existing end-to-end mocked tests, and also
exercises the download retry/backoff logic and the verbose reporting path.
Key-less test coverage (the figure reported by continuous integration,
which runs without a TERN API key) is now approximately 99.8%. -
New vignette, Bandwidth-safe spatial subsetting, showing how to crop to an
area of interest, extract at point locations, and save a local copy so that
only the data you need crosses the network, and covering the coordinate
reference system handling for the canopy height dataset.
nert 1.0.0 — first stable release
First stable release of the TERN data API client. 11 exports covering 14 TERN datasets via a unified read_tern() dispatcher and the batch primitive collect_tern_data(), plus the audit-driven polish accumulated during pre-CRAN review.
Highlights
- Unified dispatcher:
read_tern(dataset_id, ...)covers SMIPS, ASC, AET, eight SLGA soil attributes (AWC, CLY, SND, SLT, BDW, PHC, PHW, NTO), Soil Beta Diversity, Canopy Height, and Land Surface Phenology — via short aliases or full TERN keys. - Batch primitive:
collect_tern_data()extracts values from any combination of datasets at any number of locations over any date range. Vectorised across locations (one COG open per work item, not per point). - Configurable retry:
options(nert.max_tries = ..., nert.initial_delay = ...)set globally; per-call overrides still honoured.
Breaking changes
read_smips()argumentdayrenamed todateto match the unified argument naming across allread_*()functions. Replaceday =withdate =.
Test surface
- 310 deterministic offline tests; package coverage 83%, every
read_*()reader at 100%. - URL-construction
expect_snapshot()pins every TERN bucket path/version/filename template. - Mocking via
testthat::local_mocked_bindings()on.read_cog(); no network inR CMD check.
Quality gates
R CMD check --as-cran: 0 errors / 0 warnings / 3 NOTEs (all intrinsic/environmental; itemised incran-comments.md).lintr::lint_package(),spelling::spell_check_package(),urlchecker::url_check(): clean.
See NEWS.md for the full change log.
v0.0.1 - First release
This is the first release of the {nert} package.
Windows users can use the nert_x.y.z.zip file. The .tar.gz file is a source version that is suitable for building on any system.