Skip to content


MarINvaders: Full/alien species distributions for a single species or a whole ecoregion.

The is the entry point to the marINvaders code base providing the to top-level classes:

  • Species
  • MarinLife

For both, the algorithm collects species data from OBIS and connect to distribution of the species using WoRMS, NatCon and (optional) IUCN data sources. It uses geo-spatial regions based on MEOW ECOS merged with MRGID (used by WoRMS source) from different shape-files.

More about data processing can be found at and documentation (

  • Species Class representing a single species.</>
  • MarineLife Class representing the marine life in selected MEOW eco-region.</>
  • marine_ecoregions(**kwargs) (geoPandas) Filter meow eco-regions using keywords arguments selectors.</>
  • plot(eco_code, show) (matplotlib plot figure) Plot world map with selected MEOW eco region</>


Filter meow eco-regions using keywords arguments selectors.


The values of selectors are processed as regexp.

  • kwargs Selectors to filter using regexp. The selectors as a kwargs keys are:
    - ECO_CODE int or list of int
    - REALM
Returns (geoPandas)

Information on all selected eco-regions


marinvaders.main.Species(aphia_id, gisd_file=None)

Class representing a single species.

  • _obis (pandas.DataFrame) Result from OBIS API request for this species
  • all_occurrences (pandas.DataFrame (property)) All eco-regions which report presence of the species.
  • aphia_id (int) Aphia ID of species (using WoRMS classification).
  • reported_as_alien (pandas.DataFrame (property)) Marine eco-regions where the species is reported as alien based on WoRMS, NatCon and GISD (optional) sources
  • plot(show) (matplotlib plot figure) Plot species object.</>


Plot species object.

  • show (boolean, optional) If true, calls to show the figure (default).

marinvaders.main.MarineLife(eco_code, gisd_file=None, redlist_file=None)

Class representing the marine life in selected MEOW eco-region.

It finds which species present, which are aliens, and find all observations of the alien species in other eco regions based on OBIS source.

  • _alien_observations (pandas.DataFrame) Observations of all species reported as alien
  • _obis (pandas.DataFrame) Obis reports of species for this region.
  • alien_species Return aliens species in currently selected eco-region.</>
  • aliens (pandas.DataFrame (property)) All alien species in teh eco-region
  • all_species (pandas.DataFrame (property)) All species present in the eco-region
  • all_species List of all unique species.</>
  • eco_code (int) MEOW eco code of the selected region
  • specify_redlist_data(redlist_file, result_attribute_name) Specify location of the red list data file (assessments.csv)</>

specify_redlist_data(redlist_file, result_attribute_name='affected_by_invasive')

Specify location of the red list data file (assessments.csv)

The redlist data should contain a list of species affected by invasive species (see documentation on how to obtain this list from the IUCN webpage).

The species data is then crossreferenced against the species found in the eco-region. A list of all species affected by invasive species in this eco-region is then available in the attribute specified in the parameter 'result_attribute_name' ('affected_by_invasive' by default).

  • redlist_file (pathlib.Path or str) The path to the redlist assessments.csv file. If set to None, the previously read redlist data will be removed and the result attribute will no longer be available.
  • result_attribute_name (str, optional) Result attribute name

marinvaders.main.plot(eco_code, show=True)

Plot world map with selected MEOW eco region

  • eco_code (int or Species obj) If int is set as eco_code the plot will try to get eco region from MEOW and plot it. If no eco region is found for the int eco_code the function will raise ValueError.
  • show (boolean, optional) If true, calls to show the figure (default).
  • Value Error When eco-region for the eco_code was not found.