Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Global museum, survey, observation, and citizen-science occurrence records for building biodiversity maps and species-monitoring tools.
From source to product signal
GBIF indexes species occurrences published by museums, surveys, research programs, and observation networks. Start with one taxon, country, and recent period. Records reflect uneven sampling, can be duplicated, may have coordinate issues, and can generalize sensitive-species locations.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
import pandas as pd
import requests
match = requests.get(
"https://api.gbif.org/v1/species/match",
params={"name": "Danaus plexippus"},
timeout=30,
)
match.raise_for_status()
taxon_key = match.json()["usageKey"]
response = requests.get(
"https://api.gbif.org/v1/occurrence/search",
params={
"taxon_key": taxon_key,
"country": "US",
"year": "2024,2026",
"has_coordinate": "true",
"has_geospatial_issue": "false",
"limit": 100,
},
timeout=30,
)
response.raise_for_status()
occurrences = pd.json_normalize(response.json()["results"])
print(occurrences[["key", "eventDate", "decimalLatitude", "decimalLongitude", "datasetKey"]].head(20))Test a useful signal
Review recent U.S. monarch butterfly records with usable coordinates.
Global Biodiversity Information Facility is an intergovernmental source. Last verified 2026-08-13. Temporal coverage: historical collections and observations through current publishing.