Releases: mapme-initiative/mapme.biodiversity
mapme.biodiversity 0.9.5
mapme.biodiversity 0.9.5
General
get_gfw_treecover()andget_gfw_lossyear()updated to version "GFC-2024-v1.12" (416)calc_treecover_area(),calc_treecover_area_and_emissions()andcalc_treecoverloss_emissions()updated to include the year 2024 (416)get_esalandcover()has been adapted to download data from a new source in a format compatible with the previous version (430)- modified
calc_treecover_area()to return zero area and not NULL when tree cover <min_cover(413) get_teow()now requires users to manually download the file (450)
Internal
- internal function
.has_internet()now delegates tocurl::has_internet() - added function
.check_system_requirements()that checks on package load if system requirements (GDAL and PROJ versions) are met, and warns if not - use
utils::compareVersion()instead of simple '<' to check the GDAL system library version
Bug fixes
- internal function
.fetch_resource()now correctly takes into account the resources that could not be retrieved and reports them (433) - fixed messages from the
check_namespace()function - fixed the way
normalizePath()is used so it works correctly on Windows (446) - fixed
calc_treecover_area()to correctly handle the full tree cover (100%) (451)
mapme.biodiversity 0.9.4
General
get_biodiversity_intactness_index(),get_iucn(), andget_key_biodiversity_areas()now usespds_exists()to check if input files existget_chelsa()now supports precipitation layers for 2019- changes bucket URL for
get_chelsa()tohttps://os.zhdk.cloud.switch.ch/chelsav2/GLOBAL/monthly/pr spds_exist()andmake_footprints()now usenormalizePath()allowing better handling of relative file paths
Internal
-
the
sf_colattribute value is now retained throughout the portfolio checks and chunking routines -
.raster_bbox()now only uses thecornerCoordinatesoutput fromgdalinfoto derive a bounding box (385) -
bounding boxes for raster and vector resources are now derived via
st_as_sfc(st_bbox(x))to ensure that they are oriented correctly when using S2 (377 and 385)
mapme.biodiversity 0.9.3
Bug fixes
get_nasa_srtm()now uses GDAL's VSI path optionpc_url_signing=yesto
sign URLs from Microsoft Planetary Computer (#383)
Internal
- test for
.read_vector()now copies input GPKG to a directory with write
permissions to avoid CRAN check failures when included in a read only directory
mapme.biodiversity 0.9.2
General
-
new resources:
get_acled()
-
new indicators:
calc_fatalities_acled()calc_fatalities_ucdp()(renamed)calc_exposed_population_acled()calc_exposed_population_ucdp()(renamed)
-
calc_fatalities_ucdp()now returns a sparse timeseries, e.g. asset-months
with now fatalities are omitted.
Bug fixes
- fixes
portfolio_wide()throwing an error when single assets withNULL
values are present calc_mangroves_area()returned NULL if invalid geometries were encountered
Now it tries to repair geometries and return the area of valid geometries (#375)
Internal
.get_intersection()now assumes bothxandtindexto be represented by
oriented rings on the sphere (#378)
mapme.biodiversity 0.9.1
General
- new resources:
get_accessibility_2000()(#365, @fBedecarrats)
- new indicators:
calc_traveltime_2000()(#365, @fBedecarrats)
Internal
mapme.biodiversity 0.9.0
General
-
prep_resources()received additional argumentmodeto
get control over the reading mode (e.g. portfolio or asset) -
resources based on WorldClim now support selecting the spatial
resolution and cover the historical timeseries starting from 1960 (#302) -
assets are now chunked into sub-components prior to indicator calculation thus
parallelization now is applied to a single level (#322) -
chunk_sizenow is properly set to 100,000 ha as per documentation (before
it was set to 10,000 ha) (#324) -
setting
chunk_size=NULLis now allowed and skips chunking (#331) -
treecover indicators now trough a message if landscapemetrics is not
installed (#325) -
setting
outdirviamapme_options()now probes the destination by trying
to write a GTiff file and errors if unsuccessful (#335) -
code previously using
httrnow useshttr2(#330) -
new resources:
-
new indicators:
calc_slope()(#355, @fBedecarrats)calc_ipbes_biomes()(#345)calc_humanfootprint()(#341)calc_gsw_time_series()(#354, @karpfen)calc_species_richness()(#359)calc_exposed_population()(#321)calc_precipitation_chelsa()(#318)calc_key_biodiversity_area()(#349, @karpfen)calc_biodiversity_intactness_index()(#351, @karpfen)calc_vul_carbon(),calc_man_carbon(), andcalc_irr_carbon()(#339)
Bug fixes
- fixes transforming asset to the CRS of raster dataset
incalc_deforestation_drivers()(#300) write_portfolio()now drops indicators with only NULL values instead
of throwing an error (#303)get_ucdp_ged()now adds SRS infos to the footprints object (#313)- uses binary writing mode for
worldpopresource on Windows (#319)
Internal
.check_portfolio()now checks ifassetidhas unique values and only
overrides them if this in not the case (#305).read_raster()now reads values into memory and removes VRT files on-exit (#311).fetch_resources()now honors both creation and opening options (#315)httrcalls are replaced with the respectivehttr2equivalents (#329)
mapme.biodiversity 0.8.0
General
- updates
gfw_lossyearresource tov20240402which entails emission data
between 2000 - 2023 - removes the
nasa_firmsresource and associatedactive_fire_countsindicator - adds
mcd64a1resource andburned_areaindicator mapme.biodiveristynow leverages GDAL for data I/O meaning that all GDAL
readable source data sets and writable destinations are now supportedREADME.mdnow includes a section on how to set up cloud-storages to use
as a destination for resource data- The quickstart vignette now uses GFW data as example data
- chunking is now applied based on the area of an assets bounding box instead
of its own area write_portfolio()now again serializes to a two-table GeoPackage and
re-introducesread_portfolio()(#294)datetimecolumn values are now encoded asPOSIXct
Internal
- exports
make_footprints()to ease the process of creating footprints
for resource functions - exports
spds_exists()for resource function to check if a data source
is exists get_*()functions are now required to return footprint objects indicating
the spatial extent of each elements and pointing towards a GDAL readable
data source in thesourcecolumn- in case a user-specified destination is found, the package now uses
gdal_translateto write data from source to destination - tests for long-running examples and tests are skipped on GA and CRAN
- fixes a bug in checking if a portfolio inherits from
tbl_df
mapme.biodiversity 0.7.0
Bug fixes
- fixes bug with wrong tile paths returned by
get_gfw_emissions()
Breaking changes
- introduces a standardized output format for indicators, see #240 for
more information get_chirps()now allows to specify the years for which to download CHIRPS
resourcescalc_precipitation_chirps()now only returns precipitation sums- deprecation of indicator
active_fire_propertiessince resources can now
be retrieved usingprep_resources()(see below)
General
- exports
prep_resources()to prepare resources for single assets - exports
portfolio_long()andportfolio_wide()to automatically
un-nest indicator columns and change the data layout to either long or wide - changes the behavior of
write_portfolio()to serialize portfolios to
GDAL supported spatial formats in either long or wide format and deprecates
read_portfolio() - introduces option
chunk_sizetomapme_options()to control the size
for which polygons are split and processed in chunks - allows assets of type
'MULTIPOLYGON'and automatically combines the results
based on an aggregation function - indicator examples now use
portfolio_long()instead oftidyr::unnest()
Internal
- indicator functions must now return tibbles with columns named
datetime,
variable,unitandvalue - inner-level indicator functions must now specify a statistic for aggregation
of chunks chirpsandnasa_graceresources updated- check for internet connectivity can now be disabled via environment variable
mapme_check_connection(#262) gfw_treecoverandgfw_lossyearresources updated to v1.11 (#277, @fBedecarrats)- GFW indicators now automatically detect the maximum years based on the
gfw_lossyearlayer (#273) - drops
curl,stringr, andtidyselectas dependencies - moves
progressrandrvestfromImportstoSuggests - drops
SPEIfromSuggests
mapme.biodiversity 0.6.0
Breaking changes
- introduces a new UI based on closures for resources and indicators, see #240 for
more information
General
- improves output of
available_resources()andavailable_indicators() - introduces
mapme_options()to add fine-control of the packages behaviour - deprecates
init_portfolio()in favor ofmapme_options() - exports helper functions for third parties to extend the package for custom
resources and indicators:check_available_years()check_namespace()download_or_skip()check_engine()check_stats()select_engine()make_global_grid()unzip_and_remove()
New features
Internal
- removed
st_make_valid()from.read_vector().
mapme.biodiversity 0.5.0
General
- Quickstart vignette uses the WorldPop resource instead of CHIRPS, not
relying on a working internet connection (#230).
New features
- GFW resources and indicators include latest GFC-2022-v1.10 version (#203).
- Raster resources with a CRS different from WGS84 are now supported (#213).
Breaking changes
- The argument
add_resourcestoinit_portfolio()is deprecated. This
means thatget_resources()has to be run in every new R session to make
resource available for further processing (#219). - Rasters are now cropped to the spatial extent of an asset with setting
snap="out", thus delivering a slightly bigger extent (#212).
Bug Fixes
calc_indicators()checks for 0-length tibbles (#196, #199, #215).- Fix bug with reading rasters with temporal dimensions (#209).
- All raster cells touching a polygon are now returned (#208).
Internal
.read_raster_source()now uses a simplified logic to cover all cases
(e.g. single tiles, tiled rasters with and without temporal dimension,
single temporal rasters) (#211).- Rasters are cropped using
snap="out"by default (#212). .read_raster_source()now projects assets in case their CRS differs
from the portfolio (#213).- tile indices for raster resources are now appended to the portfolio attributes
assfobjects instead of being written to disk (#219). .read_raster_source()now applies a precision round-trip of 5 decimal point
to match rasters with slight changes in their spatial extent (#217).register_resource()andregister_indicator()now issue warnings for
resources/indicators with names already registered and overwrites them (#220).