Metadata-Version: 2.4
Name: sdmdata
Version: 0.1.2
Summary: A library for Species Distribution Modeling data retrieval from GBIF, iNaturalist, and SpeciesLink APIs.
Author: Ane Simões
Author-email: anes.2017@alunos.utfpr.edu.br
License: MIT
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pytest
Requires-Dist: pandas
Requires-Dist: requests
Requires-Dist: python-dotenv
Requires-Dist: pygbif
Requires-Dist: pyinaturalist
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary


# USAGE.md

## Overview

**sdmdata** is a library designed to facilitate data management and processing for scientific and research applications.

## Getting Started

### Installation

```bash
pip install sdmdata
```

### Basic Usage

```python
import sdmdata

# Example: Download occurrences from GBIF, iNaturalist, and SpeciesLink - INaturalist doesn't require any authentication.
sdmdata.save_specieslink_apikey(apikey)
sdmdata.save_gbif_credentials(user, email, pwd)
species_names = ["Panthera onca", "Lynx rufus"]
df = sdmdata.get_occurrences(
    species_names,
    country="Brazil",
    year_range=(2000, 2020),
)

```
## Functions
- `get_occurrences(species_names, country=None, year_range=None, lat_min=None, lat_max=None, lon_min = None, lon_max = None, 
    includeGbif = True, includeInaturalist = True, includeSpeciesLink = True)`: Fetches occurrence data for the specified species from GBIF, iNaturalist, and SpeciesLink (you can choose the source), with optional filters for country, year range, and latitude bounds.
- `get_species_autocomplete(name)`: Retrieves a list of species suggestions from GBIF based on the provided name.
- `save_gbif_credentials(user, email, pwd)`: Saves GBIF user credentials for authenticated requests.
- `save_specieslink_apikey(apikey)`: Saves the API key for SpeciesLink requests.
- `delete_gbif_credentials()`: Deletes stored GBIF user credentials.
- `delete_specieslink_apikey()`: Deletes the stored SpeciesLink API key.

