# Development Version
===============

# BIEN 1.2.7
===============
## BUG FIXES
* Update to internal function BIEN_sql to make sure dbClearResults is called.
* Removed dependcies on raster, rgeos, and fasterize
* fixed error that can occur when generating citations for traits
* Updated internal functions to fail gracefully when database connections fail.

## NEW FEATURES
* Added only.geovalid argument to BIEN_occurrence_country
* Added only.geovalid argument to BIEN_occurrence_family
* Updated error messages regarding query execuation with more granularity
* Removed ORDER BY statements to optimize query speed
* Updated code to download in batches, providing at least some measure of progress update (should also help with some timeout issues on large queries)
* Added an internal function BIEN_metadata_data_dictionaries to provide metadata about some of the fields.
* Updated dependency to include R >= 4.1.0, since the code uses |>

# BIEN 1.2.6
===============
## NEW FEATURES
* Migrating from using raster and sp to terra and sf.  Raster is still retained for use with fasterize (which does not currently support terra).
* Replaced functions ending in "..._spatialpolygons" with equivalents ending in "..._sf".

# BIEN 1.2.5
===============
## NEW FEATURES
* added the option "only.geovalid" to some functions to allow downloading of non-geovalid observations
* for BIEN_occurrence_species, setting "observation_type = T" will now return all observation types
* Replaced the argument "only.new.word", which was binary YES/NO, with "new.world", which is trinary, allowing users to download records globally (new.world=NULL), only in the New World (new.world=T), or only in the Old World (new.world = F).

## BUG FIXES
* Modified internal function .BIEN_sql to prevent errors occurring in the case of internet outage or query/database inconsistencies.

# BIEN 1.2.4
===============
## NEW FEATURES
* Now returning elevation information for BIEN_occurrence_... queries when political.boundaries = T

# BIEN 1.2.4
===============
## NEW FEATURES
* BIEN database updated to 4.1
* Updated functions to utilize new validations (e.g. is_centroid)
* Added BIEN_trait_country function
* BIEN_occurrence_box now offers the ability to constrain records by species and/or genus.
* Added function BIEN_phylogeny_label_nodes().
* Now excluding locations known to be cultivated by default (using is_location_cultivated field)
* Added new functions BIEN_ranges_species_bulk, BIEN_ranges_shapefiles_to_skinny, and BIEN_ranges_skinny_ranges_to_richness_raster
* Changes SQL queries to omit an "ORDER BY" clause in order to speed things up

## BUG FIXES
* Fixed bug that occaisionally occured with trait citations.
* Fixed bug caused by documentation for argument '...' in BIEN_metadata_match. (PR#16223, see <https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16223>)

# BIEN 1.2.3
===============
## NEW FEATURES
* BIEN database updated to 4.0
* Updated code to work with updated BIEN4.0 database structure.
* Some functions now return slightly different fields, please take note!
* Added functionality to notify users of important updates and upcoming updates to the database.

## BUG FIXES
* Fixed rare bug arising when specifying a "limit" in functions relying on spatialpolygons


# BIEN 1.2.1
===============
## NEW FEATURES
* Added BIEN_stem_sampling_protocol()

## BUG FIXES
* Updated example directories to use file.path() to construct OS-independent paths
* Fixed a bug in BIEN_plot_sampling_protocol causing it to fail to return records for certain sampling protocols.

# BIEN 1.1.1
===============
## NEW FEATURES
* Added ability to retrieve trait data citations through BIEN_metadata_citation.
* Added ability to exclude known introduced species
* Added option to return additional data pertaining to collection and identification
* Added ability to download readable citation information for trait data.
* Added a new vignette tutorial, "BIEN_tutorial", which walks users through some of the functions
* Functions that query by political name can now utilize shorthand codes from geonames.org

## OTHER NEWS
* Trait data was increased by nearly an order of magnitude
* We currently have nearly 1 million trait records (25 million if you include height and diameter data from plots)
* Trait units and names have been standardized
* Functions names containing "...shapefile" have been changed to "...spatialpolygons" to make the names more accurate
* The `shapefile` arguments have been renamed `spatialpolygons`, again for increased accuracy

## BUG FIXES
* Fixed issue with BIEN_occurrence_shapefile()
* Updated test structure to comply with standard practices
* Modified function documentation to use templates

===============
# BIEN 1.1.0
===============
## NEW FEATURES

* Added BIEN_stem_family
* Added BIEN_stem_genus
* Added BIEN_ranges_list
* Can now use BIEN_occurrences_records_per_species to get a count of records for specified species
* Added BIEN_metadata_citation

## OTHER NEWS

* Added testing via "testthat" package
* Made .BIEN_sql an internal function
* Updated BIEN_trait functions to use new agg_traits schema
* Added many more traits to the database.

===============
# BIEN 1.0.0
===============

## NEW FEATURES

* released to CRAN