1- Extract the data information from the GBIF 's API
2 - Create the collection in MongoDB Compass
3 - Create de API
4 - Perform a CLustering Anlysis 5 - Plot some results
API folder
: contains the main file of the API and all the files necessary for its operation
Notebooks folder
: data access script for the API, connection with Mongo, creation of maps and figures, clustering model
Output folder
: contains all the data files that have been generated throughout the project
Images folders
: contains some descriptive figures of the API content
To store all the date we used a MongaDBCompass. The database is made up of one collection that will receive or give the information through the API. Next I show a table of the information contained in the database and how the codes that you will receive when you make the requests
API information | Name in request |
---|---|
Latitude | Lat |
Longitude | Long |
Vernacule name | common_name |
Latin name | species |
Kingdom | kingdom |
Class | class |
Family | family |
Genus | genus |
Locality | location |
Province | province |
Autonomous Community | community |
This project is part of the final project of the Ironhack Data Analytics Bootcamp. The main objective of this API is to improve accessibility to the data and information that are usually found dispersed, in different formats and with difficult access. The data of the different domains of knowledge that refer to biodiversity (taxonomy, phylogenetics, morphology, ecology) have been scattered in various formats, in natural history collections and in observational reports field, as well as in the scientific literature and in various reports from those who manage aspects related to biodiversity, that is, the called gray literature. The main objective of this project is support efforts to understand diversity biological system of the country and favor the access of this information to people who are fond of nature..
"/province" --> GET method. To obtain all the information about locality. All the species that you can see in this location
"/province/comun --> GET method. To obtain all the species that you can find in a given locality
"/province/month" --> GET method. To obtain all the species that you can find in a given month
"/insert" --> POST method. to insert new species. Where it is mandatory that you indicate the location where you are (the name of town or city, the common name of the species, the scientific name, which class it belongs to and the date.
"/delete" --> POST method. Delete a given data. It is mandatory to introduce the _id
"/look" --> POST method. GET method. Returns the 10 localities closest to yo for see any species.
"/map" --> GET-POST method. returns a heatmap for a given taoxomic group.
To read all the species of a given province
("http://127.0.0.1:5000/province")
Returns:
[{'_id': '6044ec0734b38296f136b6af'},
{'locality': 'Acantilados Jarama'},
{'species': 'Fringilla coeleb'},
{'common_name': 'Common Chaffinch'}]
To read information for a given species in a specific province
("http://127.0.0.1:5000/province/comun")
Returns:
[{'_id': '6044ec0734b38296f136b6b9'},
{'locality': 'Embalse de Pinilla'},
{'species': 'Podiceps cristatus'},
{'common_name': 'Somormujo lavanco'}]
To read infomation for a given species in a specific month
("http://127.0.0.1:5000/province/month")
Returns:
[{"_id": {"$oid": "6049058ec744a637acfeca3f"},
"locality": "Acantilados Jarama",
"species": "Fringilla coelebs",
"common_name": "Common Chaffinch"}]
This graph shows the number of data that has been added to the database by years for each of the classes of animals in the API. In general, it is observed that over the years more species have been added to our database, with the exception of Birds, which has decreased over the years.
The following figures show a characterization of the main predictor variables (maximum temperature, minimum temperature, elevation and precipitation) of the physical conditions for each of the localities that we include in the database.
Maximum temperature
Minimum temperature
Elevation
Precipitation
requirements.txt