Skip to content

Releases: inbo/n2khab

n2khab 0.15.1

Choose a tag to compare

@florisvdh florisvdh released this 01 Jul 09:33
v0.15.1
2c7c7ac

Hotfix

  • read_watersurfaces(): fix name of the most recent version of watersurfaces.

n2khab 0.15.0

Choose a tag to compare

@florisvdh florisvdh released this 23 Jun 09:17
v0.15.0
d9e1c1b

Breaking changes

  • read_watersurfaces_hab() has lost its argument interpreted.
    Its former default FALSE is the behaviour that is continued.
    It was found (#221) that the rationale for interpreted = TRUE was based on wrong assumptions; occurrences coded as main type 3130 cannot be interpreted as one specific subtype.
  • read_habitatmap_terr() and read_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() and read_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) and method_assessment (the method used to assess the types in the polygon).
  • read_habitatsprings(units_7220 = TRUE) now concatenates the system_type and source values of the corresponding points.

New features

  • expand_types() now expands subtypes 3130_aom and 3130_na to 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 argument collapse is ignored since data source version watersurfaces_hab_v7 because 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 6230 has been interpreted as 6230_hmo if code_orig is "6230,6410".
  • read_habitatsprings() has gained an argument filter_system to 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 concatenated system_type column for read_habitatsprings(units_7220 = TRUE).

n2khab 0.14.0

Choose a tag to compare

@florisvdh florisvdh released this 20 Feb 13:40
v0.14.0
8550729

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

Choose a tag to compare

@florisvdh florisvdh released this 19 Dec 20:33
v0.13.0
3d6b868

Breaking change

  • read_watersurfaces_hab() has gained an argument collapse, which is TRUE by default (#203).
    It reduces the watersurfaces_types element of the list output to unique combinations of polygon_id and type, hereby collapsing the code_orig and certain columns 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, use collapse = FALSE.
    • Future versions of watersurfaces_hab are expected to implement this in the data source itself, but with interpreted = TRUE further collapsing by the function remains necessary to maintain uniqueness by polygon_id and type.

    Refer to inbo/n2khab-preprocessing/issues/78 for more information.

New features

  • New function read_favenv() to return favourable environmental ranges of types (#195).
  • expand_types() gains an argument mark (#198).
    If set as TRUE, the logical columns has_been_expanded and added_by_expansion are 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 as git2rdata::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

Choose a tag to compare

@florisvdh florisvdh released this 10 Jan 19:34
v0.12.0
8be10bb

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

Choose a tag to compare

@florisvdh florisvdh released this 03 Oct 17:25
v0.11.0
74bce51

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 between rbbvos and 6510_hua, and it has not been mapped consistently.
    Hence this type is considered obsolete and it has been dropped from the types and namelist data sources (#182).
    However do note that it exists in versions of habitatmap and derived data sources.
  • expand_types() has been adjusted accordingly (#182).

Other updates

Including:

  • the fix_geom implementation in read_watersurfaces() is now more efficient (#185);
  • read_habitatmap() also gained a fix_geom argument (#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

Choose a tag to compare

@florisvdh florisvdh released this 04 Dec 14:57
v0.10.1
2c2af9b
  • Silently ignore errors from package {remotes} during package loading (56e9c06).

n2khab 0.10.0

Choose a tag to compare

@florisvdh florisvdh released this 01 Dec 18:28
v0.10.0
93cb7ec

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_data path, 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

Choose a tag to compare

@florisvdh florisvdh released this 24 Nov 13:33
v0.9.1
2f33a03
  • Added workaround for a note during package installation (d300e4a).
  • Package startup message: improve recommended code to update package (793e303).

n2khab 0.9.0

Choose a tag to compare

@florisvdh florisvdh released this 22 Nov 18:47
v0.9.0
ca6f60e
  • 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.2 is now supported;
    • a new fix_geom argument allows to fix invalid or corrupt geometries on the fly.
      This behaviour is turned off by default (see #60).
  • 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.