get_biodiversity_intactness_index()
, get_iucn()
, and get_key_biodiversity_areas()
now use spds_exists()
to check if input files existget_chelsa()
now supports precipitation layers for 2019get_chelsa()
to https://os.zhdk.cloud.switch.ch/chelsav2/GLOBAL/monthly/pr
the sf_col
attribute value is now retained throughout the portfolio checks
and chunking routines
.raster_bbox()
now only uses the cornerCoordinates
output from gdalinfo
to 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)
get_nasa_srtm()
now uses GDAL's VSI path option pc_url_signing=yes
to
sign URLs from Microsoft Planetary Computer (#383).read_vector()
now copies input GPKG to a directory with write
permissions to avoid CRAN check failures when included in a read only directorynew 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.
portfolio_wide()
throwing an error when single assets with NULL
values are presentcalc_mangroves_area()
returned NULL if invalid geometries were encountered
Now it tries to repair geometries and return the area of valid geometries (#375).get_intersection()
now assumes both x
and tindex
to be represented by
oriented rings on the sphere (#378)get_accessibility_2000()
(#365, @fBedecarrats)calc_traveltime_2000()
(#365, @fBedecarrats)get_gsw_timseries()
and calc_gsw_timeseries()
to write
to temporal directory of the R session to fix CRAN errors (#370, @karpfen)prep_resources()
received additional argument mode
to
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_size
now is properly set to 100,000 ha as per documentation (before
it was set to 10,000 ha) (#324)
setting chunk_size=NULL
is now allowed and skips chunking (#331)
treecover indicators now trough a message if landscapemetrics is not installed (#325)
setting outdir
via mapme_options()
now probes the destination by trying
to write a GTiff file and errors if unsuccessful (#335)
code previously using httr
now uses httr2
(#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()
, and calc_irr_carbon()
(#339)calc_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)worldpop
resource on Windows (#319).check_portfolio()
now checks if assetid
has 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)httr
calls are replaced with the respective httr2
equivalents (#329)gfw_lossyear
resource to v20240402
which entails emission data
between 2000 - 2023nasa_firms
resource and associated active_fire_counts
indicatormcd64a1
resource and burned_area
indicatormapme.biodiveristy
now leverages GDAL for data I/O meaning that all GDAL
readable source data sets and writable destinations are now supportedREADME.md
now includes a section on how to set up cloud-storages to use
as a destination for resource datawrite_portfolio()
now again serializes to a two-table GeoPackage and
re-introduces read_portfolio()
(#294)datetime
column values are now encoded as POSIXct
make_footprints()
to ease the process of creating footprints
for resource functionsspds_exists()
for resource function to check if a data source
is existsget_*()
functions are now required to return footprint objects indicating
the spatial extent of each elements and pointing towards a GDAL readable
data source in the source
columngdal_translate
to write data from source to destinationtbl_df
get_gfw_emissions()
get_chirps()
now allows to specify the years for which to download CHIRPS
resourcescalc_precipitation_chirps()
now only returns precipitation sumsactive_fire_properties
since resources can now
be retrieved using prep_resources()
(see below)prep_resources()
to prepare resources for single assetsportfolio_long()
and portfolio_wide()
to automatically
un-nest indicator columns and change the data layout to either long or widewrite_portfolio()
to serialize portfolios to
GDAL supported spatial formats in either long or wide format and deprecates
read_portfolio()
chunk_size
to mapme_options()
to control the size
for which polygons are split and processed in chunks'MULTIPOLYGON'
and automatically combines the results
based on an aggregation functionportfolio_long()
instead of tidyr::unnest()
datetime
,
variable
, unit
and value
chirps
and nasa_grace
resources updatedmapme_check_connection
(#262)gfw_treecover
and gfw_lossyear
resources updated to v1.11 (#277, @fBedecarrats)gfw_lossyear
layer (#273)curl
, stringr
, and tidyselect
as dependenciesprogressr
and rvest
from Imports
to Suggests
SPEI
from Suggests
available_resources()
and available_indicators()
mapme_options()
to add fine-control of the packages behaviourinit_portfolio()
in favor of mapme_options()
check_available_years()
check_namespace()
download_or_skip()
check_engine()
check_stats()
select_engine()
make_global_grid()
unzip_and_remove()
st_make_valid()
from .read_vector()
.The argument add_resources
to init_portfolio()
is deprecated. This
means that get_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).
Speed improvements for GFW indicators (up to x10 for larger rasters) now
require R package exactextractr
to be installed. Also, it is advised
to have the R package landscapemetrics
installed to gain the full computation
speed improvement.
calc_indicators()
checks for 0-length tibbles (#196, #199, #215)..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).snap="out"
by default (#212)..read_raster_source()
now projects assets in case their CRS differs
from the portfolio (#213).sf
objects 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()
and register_indicator()
now issue warnings for
resources/indicators with names already registered and overwrites them (#220).added new resource called ucdp_ged
providing a database of violent conflict
from 1989 to today
added a new indicator called fatalities
aggregating number of deaths
by type of conflict on a monthly time scale based on the ucdp_ged
resource.
Added a new resource called fritz_et_al
providing a raster layer of deforestation
added a new resource called fritz_et_al
providing a raster layer of deforestation
drivers in tropical forests based on Fritz et al. (2022)
added a new indicator called deforestation_drivers
using the fritz_et_al
resource
to obtain information on the absolute and relative area driving forest losses in
assets for the period 2008-2019
added two new exported functions register_resource()
and register_indicator()
which allow users to register custom functions for resources/indicators
added a new vignette for the web-version of the package only informing about how to obtain wide-output from indicators
added a new vignette for the web-version for a custom analysis of the NASA FIRMS resource in the example section
added the data for years 2017-2020 to the Global Mangrove Watch resource
Changed the parallel backend to the future package. Parallel processing is now implemented by furrr::future_map() on the asset level within the calc_indicators() function. User code is now required to set up a plan() to enable parallel processing. The function call needs to be wrapped on the user side with progressr::with_progress() to show a progress bar.
mapme.biodiversity no longer sets terra's temporal directory for you.
Instead you have to call terra::terraOptions()
manually
esalandcover
indicator now returns the value per each land cover class
exactly once (#177)disabled running examples on CRAN
disabled tests for get_* functions on CRAN
terra
engines now use get()
to resolve the requested zonal
statistic function
applying tidyverse coding style to existing code (#156, @karpfen)
extensive re-factoring of vector-raster zonal statistic engines (#150)
extensive re-writing of testing infrastructure for indicator functions omitting the usage of snapshot tests as far as possible (#142)
rundir
and todisk
arguments removed from indicator functions since they were
of no practical use
instead of a resource and indicator backlog, resources and indicators are now registered to .pkgenv and queried there during runtime. This also allows users to register custom resources/indicator functions
removed deprecation warnings for old resource/indicator name
on MacOS s2-based calculations are now enabled so users can expect the package to return numerically equivalent results on any operating system (#131)
the online source for the nasa_srtm
resource shows an expired SSL certificate
since November 2022. The get_resources()
function now includes an error and
instructions how to disable SSL certification at a users own risk. The
websites maintainers have been contacted and asked to renew the certification. (#131)
GFW resources are now updated to use the latest version allowing analysis for the additional year of 2021 (#123, @fBedecarrats)
GFW indicators now accept numeric min_size
argument allowing to specify
fractional covers (#110)
fire indicators now allow the simultaneous calculation of indicators based on MODIS and VIIRS. Before users had to chose between one of the instruments for each analysis (#126)
case when one or multiple assets return NA instead of a tibble is now properly tested and handled (#101)
Rasters are no longer temporary written to disk to omit a bug caused by applying mask/classify to an already existing raster file (#108, @Jo-Schie)
Bug with soilproperties set to NA caused by the function to return a data.frame instead of a tibble was fixed (#116)
both, treecoverloss_emissions
and treecover_area_and_emissions
now return
0 instead of NaN for observation years where now forest loss occurred (#120)
.make_global_grid()
now specifies the CRS when constructing the bounding box
and returns the grid in the specified CRS instead of Lat/Lon (#113)
.calc_active_fire_properties
now uses st_coordinates to retrieve locations
of fires (#119, @DavisVaughan)
tests for MacOS have been re-enabled (#131)
tests for downloading nasa_srtm
resource are skipped because the SSL certificate
of the online source has expired (#131)
extensive renaming of resources and indicators. These are handled gracefully until the next release (i.e. a warning is issued and names are replaced):
resources:
treecover2000
-> gfw_treecover
lossyear
-> gfw_lossyear
greenhouse
-> gfw_emissions
traveltime
-> nelson_et_al
nasagrace
-> nasa_grace
mintemperature
-> worldclim_min_temperature
maxtemperature
-> worldclim_max_temperature
precipitation
-> worldclim_precipitation
ecoregions
-> teow
mangrove
-> gmw
srtmdem
-> nasa_srtm
indicators:
treecover
-> treecover_area
emissions
-> treecoverloss_emissions
treeloss
-> treecover_area_and_emissions
chirpsprec
-> precipitation_chirps
accessibility
-> traveltime
popcount
-> population_count
wctmin
-> temperature_min_wc
wctmax
-> temperature_max_wc
wcprec
-> precipitation_wc
gmw
-> mangroves_area
teow
-> ecoregion
init_portfolio()
now sets the testing
attribute to FALSE by default.get_<resource>()
functions now return filenames early if testing
is set to TRUE.calc_<indicator>()
examples now copy files to the R temporal directory and are
wrapped in try()
to avoid errors/warnings on CRAN if an internet resource is not available.calc_tri()
and calc_elevation()
are now disabled on CRAN because
of the responsiveness of CIGAR servers.NEWS.md
file to track changes to the package.init_portfolio()
is used to initialize a portfolio object. The input must be
an sf object where all geometries are of type POLYGON
get_resources()
calc_indicators()
write_portfolio()
read_portfolio()
.
If users wish to download additional resources or calculate indicators, init_portfolio()
has to be called again.