# h3sdm 0.1.4

## Bug fixes
* `h3sdm_pa()` now transforms presence records to the CRS of the H3 grid
  before joining, fixing an error when the grid is in a projected CRS.

# h3sdm 0.1.3

## New functions
* `h3sdm_aoa()` estimates the Dissimilarity Index (DI) and the Area of
  Applicability (AOA) for spatial prediction models, based on Meyer &
  Pebesma (2021).

## Improvements
* `h3sdm_get_grid()` now preserves the CRS of the input `sf_object`.
  Previously, the function always returned the grid in WGS84 (EPSG:4326)
  regardless of the input CRS. Now, if the AOI is in a projected CRS,
  the output grid will be reprojected to match it. The internal H3
  computation still uses WGS84 as required by the H3 system.
* `h3sdm_predict()` internal comments translated to English and
  `@seealso` updated to include `h3sdm_aoa()`.

# h3sdm 0.1.2

## Improvements
* `h3sdm_fit_model()` now automatically detects model mode (classification or regression),
  enabling count-based models (Poisson, Negative Binomial) with appropriate metrics
  (RMSE, R², MAE) without requiring manual configuration.

* `h3sdm_fit_model()` and `h3sdm_predict()` now automatically detect model mode
  (classification or regression), enabling count-based models (Poisson, Negative
  Binomial) without manual configuration. Full backward compatibility maintained.

* `h3sdm_get_records()` now supports `"biodatacr"` as an optional provider,
  querying occurrence records from BiodataCR (Costa Rica) via the `rbiodatacr`
  package. `h3sdm_pa()` inherits this support automatically through its
  `providers` argument. `rbiodatacr` is listed as a suggested dependency.

# h3sdm 0.1.1

## New functions

* `h3sdm_pa_from_records()`: generates a presence/pseudo-absence dataset from
  user-provided records. Accepts a `data.frame` or `sf` object with coordinates
  in WGS84 (EPSG:4326). Supports optional filtering by a `geospatialKosher`
  column to remove records with questionable spatial quality.

* `h3sdm_count_from_records()`: generates a hexagonal grid with count-based
  response variables (species richness, total detections, or individual abundance)
  from user-provided records. Accepts a `data.frame` or `sf` object. Supports
  optional filtering by presence column, confidence threshold, and date range.

## Changes to existing functions

* `h3sdm_recipe()`: added `response_col` parameter (default `"presence"`) to
  support count-based response variables. Use `response_col = "count"` when
  working with data generated by `h3sdm_count_from_records()`.

* `h3sdm_recipe_gam()`: added `response_col` parameter (default `"presence"`)
  with the same behavior as `h3sdm_recipe()`. Also added documentation examples
  for both presence/absence and count-based models.

* `h3sdm_workflow_gam()`: updated documentation to clarify the use of
  `set_mode("classification")` for presence/absence models and
  `set_mode("regression")` with `family = poisson()` for count-based models.

* `h3sdm_workflow()`: updated documentation to clarify model mode selection
  for presence/absence and count-based models.

* `h3sdm_workflows()`: updated documentation to clarify model mode selection
  for presence/absence and count-based models.

# h3sdm 0.1.0

* Initial CRAN submission.


