Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function to retrieve GBIF species and convert formats. #97

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

osgeokr
Copy link

@osgeokr osgeokr commented Aug 13, 2023

My suggestion is to utilize the GBIF API to directly use the SDM (Species Distribution Model) of elapid. By searching for the desired species and downloading it as a CSV or converting it to the GeoPackage format, the elapid would become more user-friendly.

import elapid as ela

# Download GBIF Data
species_name = "Pitta nympha"
country_code = "KR"
output_file = "pitta_nympha_data.csv"
ela.utils.download_gbif_data(species_name, country_code, output_file)

# Convert Format from CSV to GeoPackage
input_csv = "pitta_nympha_data.csv"
output_gpkg = "pitta_nympha_data.gpkg"
ela.utils.csv_to_gpkg(input_csv, output_gpkg)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant