Releases: inbo/n2khab
Release list
n2khab 0.15.1
n2khab 0.15.0
Breaking changes
read_watersurfaces_hab()has lost its argumentinterpreted.
Its former defaultFALSEis the behaviour that is continued.
It was found (#221) that the rationale forinterpreted = TRUEwas based on wrong assumptions; occurrences coded as main type3130cannot be interpreted as one specific subtype.read_habitatmap_terr()andread_watersurfaces_hab()now always use the same element names in the returned list, regardless of the data source version.
(Before, old package behaviour was still imitated for some old data source versions, but this is not the best approach.)- The 'xxx_polygons' element in the returned list of
read_habitatmap_stdized(),read_habitatmap_terr()andread_watersurfaces_hab()gains two extra attribute columns since the newest data source versions (below):year_assessment(the year when the types in the polygon have been assessed) andmethod_assessment(the method used to assess the types in the polygon). read_habitatsprings(units_7220 = TRUE)now concatenates thesystem_typeandsourcevalues of the corresponding points.
New features
-
expand_types()now expands subtypes3130_aomand3130_nato their main type, following #221. -
The following new data source versions are now supported by the corresponding functions (#215; inbo/n2khab-preprocessing/pull/79):
habitatmap_2025(read_habitatmap())habitatmap_stdized_2025_v1(read_habitatmap_stdized())habitatmap_terr_2025_v1(read_habitatmap_terr())watersurfaces_hab_v7(read_watersurfaces_hab())watersurfaces_refpoints_v7(read_watersurfaces_refpoints())habitatstreams_2025(read_habitatstreams())habitatsprings_2025v2(read_habitatsprings())
Function documentation was updated accordingly.
Some noteworthy changes and fixes in data sources:read_watersurfaces_hab(): the argumentcollapseis ignored since data source versionwatersurfaces_hab_v7because the 'collapse' step is now part of the workflow to create the data source (solving issue #78).watersurfaces_hab_v7: duplication inside concatenated strings is fixed (solving issue #75).habitatmap_terr_2025_v1:- Less polygons have been regarded as 'exclusively aquatic' (hence excluded from the data set), by no longer using the phab sum to do this.
- Type
6230has been interpreted as6230_hmoifcode_origis"6230,6410".
-
read_habitatsprings()has gained an argumentfilter_systemto filter the system type in a conservative way, i.e. including system type 'unknown' if 'mire' or 'rivulet' are requested.
It also works with the concatenatedsystem_typecolumn forread_habitatsprings(units_7220 = TRUE).
n2khab 0.14.0
A new function read_watersurfaces_refpoints() has been added to read the watersurfaces_refpoints data source (#204).
watersurfaces_refpoints is a newly published processed data source (inbo/n2khab-preprocessing/pull/79; https://doi.org/10.5281/zenodo.18700793). Apart from the latest version watersurfaces_refpoints_v6, two older versions have have been made available at Zenodo and are also supported by the function. An interim version watersurfaces_refpoints_v6.1_interim is supported as well. Interim versions do not receive the same level of quality control. It is advised to use a regular version instead.
n2khab 0.13.0
Breaking change
-
read_watersurfaces_hab()has gained an argumentcollapse, which isTRUEby default (#203).
It reduces thewatersurfaces_typeselement of the list output to unique combinations ofpolygon_idandtype, hereby collapsing thecode_origandcertaincolumns as needed.- This form better reflects the user's needs.
Since this breaks previous behaviour, you may want to check for changed (improved?) results of existing code when using this version of {n2khab}.
If needed, usecollapse = FALSE. - Future versions of
watersurfaces_habare expected to implement this in the data source itself, but withinterpreted = TRUEfurther collapsing by the function remains necessary to maintain uniqueness bypolygon_idandtype.
Refer to inbo/n2khab-preprocessing/issues/78 for more information.
- This form better reflects the user's needs.
New features
- New function
read_favenv()to return favourable environmental ranges of types (#195). expand_types()gains an argumentmark(#198).
If set asTRUE, the logical columnshas_been_expandedandadded_by_expansionare added.
These mark rows as origin or destination of type expansion, respectively.- New utility
convert_line_endings()to maintain text file integrity (checksums) across platforms (#208).
See its documentation for advice on line endings management in combination with a distributed version control system like Git, or with text file generating functions such asgit2rdata::write_vc().
Support for interim data source versions
The following interim data source versions are now supported by the corresponding functions (#200):
habitatmap_stdized_2024_v99_interim(read_habitatmap_stdized())habitatmap_terr_2024_v99_interim(read_habitatmap_terr())watersurfaces_hab_v6.1_interim(read_watersurfaces_hab())
Function documentation was updated accordingly.
Interim versions are added only at the end of the version argument of the read functions, since they do not receive the same level of quality control.
Please note that it is advised to use a regular version of these data sources instead.
n2khab 0.12.0
Support for new data source versions
The following new data source versions are now supported by the corresponding functions (#192):
watersurfaces_2024(read_watersurfaces())watersurfaces_hab_v6(read_watersurfaces_hab())
n2khab 0.11.0
Support for new data source versions
The following new data source versions are now supported by the corresponding functions (#184):
habitatmap_2023(read_habitatmap())habitatmap_stdized_2023_v1(read_habitatmap_stdized())habitatmap_terr_2023_v1(read_habitatmap_terr())habitatstreams_2023(read_habitatstreams())watersurfaces_hab_v5(read_watersurfaces_hab())
Function documentation was updated accordingly.
Drop rbbvos+ from built-in data sources
- Type
rbbvos+has been considered too loosely defined, as an intermediate betweenrbbvosand6510_hua, and it has not been mapped consistently.
Hence this type is considered obsolete and it has been dropped from thetypesandnamelistdata sources (#182).
However do note that it exists in versions ofhabitatmapand derived data sources. expand_types()has been adjusted accordingly (#182).
Other updates
Including:
- the
fix_geomimplementation inread_watersurfaces()is now more efficient (#185); read_habitatmap()also gained afix_geomargument (#184);read_habitatsprings()now returns integer IDs as integers (#180);expand_types()with a grouped data frame is now more efficient (13d05ec);- several fixes (#186, 88f0e19).
n2khab 0.10.1
- Silently ignore errors from package {remotes} during package loading (56e9c06).
n2khab 0.10.0
Breaking change
read_GRTSmh(), read_GRTSmh_base4frac(), read_GRTSmh_diffres() and read_raster_runif() now return a SpatRaster object from {terra} by default (#173). Previous behaviour using {raster} can still be restored; see below. However do note that {raster} is a legacy package and {terra} is its successor.
New feature
The package can be configured using options() or corresponding environment variables. Current configuration state is returned by n2khab_options(). See ?n2khab_options for information on package configuration.
Two settings are now available:
- optionally use {raster} instead of {terra} (#173);
- optionally set a custom
n2khab_datapath, affecting all functions that need this path (#174).
Deprecated functions
read_schemes() and read_scheme_types() were moved to a new package {n2khabmon}. In {n2khab} they are still functional but deprecated, and will eventually disappear (#175). The accompanying data sources schemes and scheme_types have moved to {n2khabmon}. {n2khab} 0.10.0 will be the minimum version required by {n2khabmon}.
n2khab 0.9.1
n2khab 0.9.0
download_zenodo()has been improved (#169):- fixes in order to use the renewed Zenodo website;
- speedup the initiation of a multi-file download;
- set concurrent (parallel) downloading as default for multi-file records;
- add unit tests to regularly check that the function still works.
read_watersurfaces()gained extra capabilities (#168):- data source version
watersurfaces_v1.2is now supported; - a new
fix_geomargument allows to fix invalid or corrupt geometries on the fly.
This behaviour is turned off by default (see #60).
- data source version
- Package startup messages have been updated, including a check whether the latest release is being used (#170, 502c3a2).
- Internally, an update has been applied (9691ec2) to googlesheets authentication, used in updating the built-in textual data sources.
These data sources have not changed since previous release.