GRIIS checklist class
- class b3alien.griis.CheckList(filePath: str)[source]
Bases:
objectLoad a GRIIS checklist from GBIF.
- Parameters:
filepath (str) – Path to the distribution.txt file of the checklist.
- Returns:
A checklist object containing the list of species.
- Return type:
griis.Checklist
- _add_species(new_species)[source]
Add new species to the checklist.
- Parameters:
new_species (list) – A list of speciesKey(s) to add to the checklist.
- Return type:
None
GRIIS checklist functions
- b3alien.griis.do_taxon_matching(dirPath)[source]
Match keys between taxon.txt and distribution.txt
- Parameters:
dirPath (str) – Path to the directory of the checklist
- Return type:
Saves a new checklist file ‘merged_distr.txt’ in the checklist directory
- b3alien.griis.get_speciesKey(sciname)[source]
Resolve a scientific name to its GBIF taxonKey. If the name is a genus, retrieve all species under that genus. :param sciname: The scientific name to resolve. :type sciname: str
- Returns:
A list of resolved speciesKey(s) or [“Uncertain”] if unresolved.
- Return type:
list
- b3alien.griis.get_species_under_genus(taxon_key)[source]
Get all the keys of the species listed under a specific genus.
- Parameters:
taxon_key (int) – The GBIF taxonKey of the genus.
- Returns:
A list of speciesKey(s) under the specified genus.
- Return type:
list
- b3alien.griis.read_checklist(filePath, cl_type='detailed', locality='Belgium')[source]
Read a GRIIS checklist and extract speciesKey(s) and time series of species numbers over time. :param filePath: Path to the directory of the checklist (must contain distribution.txt and taxon.txt if cl
type is not ‘detailed’).
- Parameters:
cl_type (str) – Type of checklist: ‘detailed’ (with eventDate) or ‘simple’ ( without eventDate, requires taxon.txt and distribution.txt).
locality (str) – The locality to filter on (default is ‘Belgium’).
- Returns:
A tuple containing: - list of speciesKey(s) in the checklist - pd.DataFrame with columns ‘introDate’ and ‘cumulative_total’ representing the
cumulative number of species over time.
- Return type:
tuple
- b3alien.griis.split_event_date(eventDate)[source]
Interprete the event date as introduction date and date of last seen, when this information is available in the checklist.
- Parameters:
eventDate (str) – Text string of eventDate
- Returns:
A series containing introduction date (‘intro’) and date last seen (‘outro’)
- Return type:
pd.Series