Next changeset 1:b79faea33a8a (2024-02-24) |
Commit message:
planemo upload for repository https://github.com/jeremyfix/medenv commit 6068531bc50297a9c8f2c24e748d7d791fe5f2ba |
added:
med_environ.py med_environ.xml test-data/expected-output.tsv test-data/reef_life_subset.tsv |
b |
diff -r 000000000000 -r f82f266381be med_environ.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/med_environ.py Thu Feb 15 20:01:29 2024 +0000 |
[ |
@@ -0,0 +1,107 @@ +# coding: utf-8 + +# Standard imports +import argparse +import os +import pathlib +from datetime import datetime + +# External imports +import medenv + +import pandas as pd + + +def environment_observation( + row, + fetcher, + lat_key, + long_key, + depth_key, + date_key, + tol_spatial_coordinates, + verbose, +): + lat0 = ( + row[lat_key] - tol_spatial_coordinates / 2.0, + row[lat_key] + tol_spatial_coordinates / 2.0, + ) + long0 = ( + row[long_key] - tol_spatial_coordinates / 2.0, + row[long_key] + tol_spatial_coordinates / 2.0, + ) + depth = row[depth_key] + date = datetime.strptime(row[date_key], "%Y-%m-%dT%H:%M:%SZ") + + values, info_values = fetcher.get_values(date, (long0, lat0), depth) + + if verbose: + print( + f"Was fetching for date={date}, long={long0}, lat={lat0}," + f"depth={depth} and got {values} at the coordinates {info_values}" + ) + for fname, fvalue in values.items(): + row[fname] = fvalue + return row + + +def environment_dataset(args): + # Note: galaxy is given us, for boolean parameters, the string + # "true" or the string "false" that we need to convert to a bool + verbose = True if args.verbose == "true" else False + + if args.keyfile is not None and os.path.exists(args.keyfile): + with open(args.keyfile, "r") as fh: + key_lines = fh.readlines() + cmems_username = key_lines[0].split(":")[1].strip() + cmems_password = key_lines[1].split(":")[1].strip() + os.environ["CMEMS_USERNAME"] = cmems_username + os.environ["CMEMS_PASSWORD"] = cmems_password + + features = args.variables.split(",") + fetcher = medenv.Fetcher(features, reduction="mean") + + # Loads the input dataset + df = pd.read_csv(args.datafile, sep="\t") + lat_key = df.columns[args.lat_key] + long_key = df.columns[args.long_key] + depth_key = df.columns[args.depth_key] + date_key = df.columns[args.date_key] + print(lat_key, long_key, depth_key, date_key) + + df = df.apply( + environment_observation, + args=( + fetcher, + lat_key, + long_key, + depth_key, + date_key, + args.tol_spatial_coordinates, + verbose, + ), + axis=1, + ) + + df.to_csv(args.out_file, header=True, index=False, sep="\t") + + +def __main__(): + parser = argparse.ArgumentParser() + parser.add_argument("--datafile", type=pathlib.Path, required=True) + parser.add_argument("--out_file", type=pathlib.Path, required=True) + parser.add_argument("--lat_key", type=int, required=True) + parser.add_argument("--long_key", type=int, required=True) + parser.add_argument("--date_key", type=int, required=True) + parser.add_argument("--depth_key", type=int, required=True) + parser.add_argument("--variables", type=str, required=True) + parser.add_argument("--tol_spatial_coordinates", type=float, required=True) + parser.add_argument("--keyfile", type=pathlib.Path, default=None) + parser.add_argument("--verbose", type=str, default=False) + args = parser.parse_args() + + environment_dataset(args) + + +if __name__ == "__main__": + __main__() |
b |
diff -r 000000000000 -r f82f266381be med_environ.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/med_environ.xml Thu Feb 15 20:01:29 2024 +0000 |
[ |
b'@@ -0,0 +1,157 @@\n+<tool id="iabiodiv_smartbiodiv_med_environ" name="Adds environment variables" version="0.0.1" profile="22.05">\n+ <description>\n+ From Copernicus and etopo given geolocalized and timestamped observations\n+ </description>\n+ <requirements>\n+ <requirement type="package" version="2.1.3">pandas</requirement>\n+ <requirement type="package" version="4.9.3">lxml</requirement>\n+ <requirement type="package" version="1.0.4">medenv</requirement>\n+ </requirements>\n+ <creator>\n+ <person givenName="J\xc3\xa9r\xc3\xa9my" familyName="Fix" url="http://www.github.com/jeremyfix/" email="jeremy.fix@centralesupelec.fr"/>\n+ </creator>\n+ <command><![CDATA[\n+ #set $cmems_username = $__user__.extra_preferences.get(\'cmems_username\', "")\n+ #if $cmems_username != ""\n+ cp \'$cmems_credentials\' ~/.medenvkey &&\n+ #end if\n+\n+python \'$__tool_directory__/med_environ.py\'\n+ --datafile \'${input}\'\n+ --out_file \'${out_file}\'\n+ --lat_key \'${lat_key}\'\n+ --long_key \'${long_key}\'\n+ --date_key \'${date_key}\'\n+ --depth_key \'${depth_key}\'\n+ --variables \'${env_variables}\'\n+ --tol_spatial_coordinates \'${tol_spatial_coordinates}\'\n+ --keyfile ~/.medenvkey\n+ --verbose \'${verbose}\'\n+ ]]></command>\n+ <configfiles>\n+ <configfile name="cmems_credentials"><![CDATA[\n+ #set $cmems_username = $__user__.extra_preferences.get(\'cmems_username\', "")\n+ #set $cmems_password = $__user__.extra_preferences.get(\'cmems_password\', "")\n+ cmems_username: $cmems_username\n+ cmems_password: $cmems_password\n+ ]]></configfile>\n+ </configfiles>\n+ <inputs>\n+ <param name="input" type="data" format="tabular" label="Input dataset"/>\n+ <param name="env_variables" type="select" label="Which variables to add" multiple="true">\n+ <option value="temperature">temperature</option>\n+ <option value="salinity">salinity</option>\n+ <option value="phytoplankton-carbon-biomass">Mole concentration of phytoplankton expressed as carbon in sea water (phyc)</option>\n+ <option value="chlorophyl-a">chlorophyl-a (CHL, mg/m3)</option>\n+ <option value="nitrate">nitrate (NO3, mmol/M3)</option>\n+ <option value="phosphate">phosphate (PO4, mmol/m3)</option>\n+ <option value="ammonium">ammonium (NH4, mmol/m3)</option>\n+ <option value="net-primary-production">Net primary production of biomass expressed as carbon per unit volume in sea water (nppv, [mg/m3/day])</option>\n+ <option value="oxygen">Mole concentration of dissolved molecular oxygen in sea water (O2, [mmol/m3])</option>\n+ <option value="ph">Sea water ph reported on total scale (ph) </option>\n+ <option value="dissolved-inorganic-carbon">Mole concentration of dissolved inorganic carbon in sea water (dissic, [mol/m3])</option>\n+ <option value="alkalinity">alkalinity (talk)</option>\n+ <option value="bathymetry">bathymetry</option>\n+ <option value="northward-water-velocity">Northward water velocity</option>\n+ <option value="eastward-water-velocity">Eastward water velocity</option>\n+ <option value="sea-surface-temperature">sea surface temperature</option>\n+ <option value="sea-surface-salinity">sea surface salinity</option>\n+ <option value="sea-surface-above-geoid">sea surface above geoid</option>\n+ <option value="surface-partial-pressure-co2">surface partial pressure CO2</option>\n+ <option value="surface-co2-flux">surface CO2 flux</option>\n+ <option value="mixed-layer-thickness">mixed layer thickness</option>\n+ </param>\n+ <param name="lat_key" label="The key of the column for the latitude" type="data_column" data_ref="input" use_header_names="true"/>\n+ <param name="long_key" label="The key of the column for the longitude" type="data_'..b'ts>\n+ <outputs>\n+ <data format="tabular" name="out_file" metadata_source="input" label="Dataset augmented with the environmental variables"/>\n+ </outputs>\n+ <tests>\n+ <test expect_num_outputs="1">\n+ <param name="input" value="reef_life_subset.tsv"/>\n+ <param name="env_variables" value="bathymetry"/> <!-- This test is requesting etopo only -->\n+ <param name="lat_key" value="8"/>\n+ <param name="long_key" value="9"/>\n+ <param name="tol_spatial_coordinates" value="0.2"/>\n+ <param name="depth_key" value="11"/>\n+ <param name="date_key" value="10"/>\n+ <param name="verbose" value="False"/>\n+ <output name="out_file" file="expected-output.tsv">\n+ <assert_contents>\n+ <has_n_lines n="100"/>\n+ <has_n_columns n="21"/>\n+ </assert_contents>\n+ </output>\n+ </test>\n+ </tests>\n+ <help>\n+\n+ **What it does**\n+\n+ This tool allows you to augment your dataset by adding some environmental variables grabbed from CMEMS, etopo, and woa. It is a galaxy tool built on the medenv python package available at https://github.com/jeremyfix/medenv.\n+\n+ It will augment the dataset with environmental variables as provided by copernicus and etopo based on the informations coming from an "observation file". This version of the tool gets environmental data from etopo for the bathymetry and otherwise copernicus mediterranean products.\n+\n+ We expect the dataset you provide to contain the coordinates of the observation: latitude, longitude, depth, and time. The time is expected in ISO 8601: YYYY-MM-DDTHH:MM:SSZ\n+\n+ The `cmems_username` and `cmems_password` are required only if you want to add variables provided by CMEMS. These must be defined in "User -> Preferences -> Manage Information"\n+\n+ The CMEMS data are collected from the following products :\n+\n+ - med-cmcc: https://resources.marine.copernicus.eu/product-detail/MEDSEA_MULTIYEAR_PHY_006_004/INFORMATION\n+ - med-ogs: https://resources.marine.copernicus.eu/product-detail/MEDSEA_MULTIYEAR_BGC_006_008/INFORMATION\n+\n+ The bathymetry is obtained with the ETOPO at : \n+\n+ - https://www.ngdc.noaa.gov/mgg/global/relief/ETOPO1/data/bedrock/grid_registered/netcdf/ETOPO1_Bed_g_gmt4.grd.gz\n+\n+ We request data around the point with a given tolerance and average the collected values. The medenv package does not force that averaging and could return a raster. A later update of the Galaxy tool could take this into account.\n+\n+ The features you can request are the following, some indexed by depth :\n+\n+ - "bathymetry", (etopo)\n+ - "temperature",\n+ - "salinity",\n+ - "chlorophyl-a",\n+ - "nitrate",\n+ - "phosphate",\n+ - "ammonium",\n+ - "phytoplankton-carbon-biomass",\n+ - "oxygen",\n+ - "net-primary-production",\n+ - "ph",\n+ - "alkalinity",\n+ - "dissolved-inorganic-carbon",\n+ - "northward-water-velocity",\n+ - "eastward-water-velocity".\n+\n+ and others not indexed by depth : \n+\n+ - "mixed-layer-thickness",\n+ - "sea-surface-temperature",\n+ - "sea-surface-salinity",\n+ - "sea-surface-above-geoid",\n+ - "surface-partial-pressure-co2",\n+ - "surface-co2-flux".\n+\n+ ** Copernicus credentials **\n+\n+ To request Copernicus, you need to have an account on the https://resources.marine.copernicus.eu platform.\n+ Then, you need to provide your credentials in the user-preference section of Galaxy.\n+\n+ </help>\n+ <citations>\n+ <citation type="bibtex">@misc{medenvGithubRepository,\n+ title = "MedEnv",\n+ author = "{Jeremy Fix}",\n+ howpublished = "\\url{https://github.com/jeremyfix/medenv}",\n+ year = 2023\n+ }\n+ </citation>\n+ </citations>\n+</tool>\n' |
b |
diff -r 000000000000 -r f82f266381be test-data/expected-output.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/expected-output.tsv Thu Feb 15 20:01:29 2024 +0000 |
b |
b'@@ -0,0 +1,100 @@\n+FID\tKey\tSurveyID\tCountry\tEcoregion\tRealm\tSiteCode\tSite\tSiteLat\tSiteLong\tSurveyDate\tDepth\tPhylum\tClass\tFamily\tTaxon\tBlock\tTotal\tDiver\tgeom\tbathymetry\n+M1_DATA.213611\t213611\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6.0\tChordata\tActinopterygii\tAtherinidae\tAtherina hepsetus\t2\t30\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.213612\t213612\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6.0\tChordata\tActinopterygii\tSparidae\tDiplodus sargus\t2\t19\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.213613\t213613\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6.0\tChordata\tActinopterygii\tSparidae\tOblada melanura\t2\t1\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.213614\t213614\t912342200\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.0\tChordata\tActinopterygii\tAtherinidae\tAtherina hepsetus\t1\t16\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.213615\t213615\t912342200\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.0\tChordata\tActinopterygii\tSparidae\tDiplodus sargus\t1\t18\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.213616\t213616\t912342200\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.0\tChordata\tActinopterygii\tSparidae\tDiplodus vulgaris\t2\t4\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.213617\t213617\t912342200\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.0\tChordata\tActinopterygii\tSparidae\tOblada melanura\t1\t29\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.213618\t213618\t912342201\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.1\tChordata\tActinopterygii\tSparidae\tDiplodus annularis\t1\t3\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.213619\t213619\t912342201\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.1\tChordata\tActinopterygii\tSparidae\tDiplodus vulgaris\t1\t10\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.213668\t213668\t912342201\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.1\tChordata\tActinopterygii\tMullidae\tMullus surmuletus\t2\t1\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.213669\t213669\t912342201\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.1\tChordata\tActinopterygii\tLabridae\tSymphodus tinca\t1\t1\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.220617\t220617\t912342198\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT1\tDue Sorella\t43.54\t13.63\t2012-08-29T14:00:00Z\t6.0\tChordata\tActinopterygii\tSparidae\tDiplodus annularis\t1\t3\tBS\tPOINT (13.63 43.54)\t-1\n+M1_DATA.220644\t220644\t912342198\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT1\tDue Sorella\t43.54\t13.63\t2012-08-29T14:00:00Z\t6.0\tChordata\tActinopterygii\tSparidae\tDiplodus sargus\t2\t16\tBS\tPOINT (13.63 43.54)\t-1\n+M1_DATA.220645\t220645\t912342198\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT1\tDue Sorella\t43.54\t13.63\t2012-08-29T14:00:00Z\t6.0\tChordata\tActinopterygii\tMullidae\tMullus surmuletus\t1\t1\tBS\tPOINT (13.63 43.54)\t-1\n+M1_DATA.220646\t220646\t912342198\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT1\tDue Sorella\t43.54\t13.63\t2012-08-29T14:00:00Z\t6.0\tChordata\tActinopterygii\tLabridae\tSymphodus ocellatus\t1\t2\tBS\tPOINT (13.63 43.54)\t-1\n+M1_DATA.220647\t220647\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6.0\tChordata\tActinopterygii\tAtherinidae\tAtherina hepsetus\t1\t5\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.220648\t220648\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6.0\tChordata\tActinopterygii\tSparidae\tBoops boops\t2\t25\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.220649\t220649\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6.0\tChordata\tActinopterygii\tSparidae\tDiplodus annularis\t1\t9\tBS\tPOINT (13.63 43.55)\t1\n+M1_DATA.220650\t220650\t912342199\tItaly\tAdriat'..b'Sparisoma cretense\t1\t1\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273049\t273049\t912344160\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED30\tHatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t13.0\tChordata\tActinopterygii\tLabridae\tThalassoma pavo\t1\t125\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273050\t273050\t912344160\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED30\tHatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t13.0\tChordata\tActinopterygii\tTripterygiidae\tTripterygion delaisi\t1\t1\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273051\t273051\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tPomacentridae\tChromis chromis\t2\t59\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273052\t273052\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tLabridae\tCoris julis\t2\t8\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273053\t273053\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tSparidae\tDiplodus cervinus\t2\t2\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273054\t273054\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tSerranidae\tEpinephelus marginatus\t1\t1\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273055\t273055\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tGobiidae\tGobius bucchichi\t1\t15\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273056\t273056\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tSparidae\tOblada melanura\t2\t2\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273057\t273057\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tPempheridae\tPempheris vanicolensis\t1\t5\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273058\t273058\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tSiganidae\tSiganus rivulatus\t2\t39\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273059\t273059\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tLabridae\tThalassoma pavo\t1\t48\tGJE\tPOINT (35.1 33.09)\t-8\n+M1_DATA.273060\t273060\t912344162\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tPomacentridae\tChromis chromis\t2\t57\tGJE\tPOINT (35.08 33.04)\t-7\n+M1_DATA.273061\t273061\t912344162\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tLabridae\tCoris julis\t1\t39\tGJE\tPOINT (35.08 33.04)\t-7\n+M1_DATA.273062\t273062\t912344162\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tHolocentridae\tSargocentron rubrum\t1\t17\tGJE\tPOINT (35.08 33.04)\t-7\n+M1_DATA.273063\t273063\t912344162\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tSiganidae\tSiganus rivulatus\t1\t1\tGJE\tPOINT (35.08 33.04)\t-7\n+M1_DATA.273064\t273064\t912344162\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t10.0\tChordata\tActinopterygii\tScaridae\tSparisoma cretense\t2\t5\tGJE\tPOINT (35.08 33.04)\t-7\n+M1_DATA.273092\t273092\t912344163\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t11.0\tChordata\tActinopterygii\tPomacentridae\tChromis chromis\t1\t10\tGJE\tPOINT (35.08 33.04)\t-7\n+M1_DATA.273093\t273093\t912344163\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t11.0\tChordata\tActinopterygii\tSparidae\tDiplodus vulgaris\t1\t4\tGJE\tPOINT (35.08 33.04)\t-7\n' |
b |
diff -r 000000000000 -r f82f266381be test-data/reef_life_subset.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/reef_life_subset.tsv Thu Feb 15 20:01:29 2024 +0000 |
b |
b'@@ -0,0 +1,100 @@\n+FID\tKey\tSurveyID\tCountry\tEcoregion\tRealm\tSiteCode\tSite\tSiteLat\tSiteLong\tSurveyDate\tDepth\tPhylum\tClass\tFamily\tTaxon\tBlock\tTotal\tDiver\tgeom\n+M1_DATA.213611\t213611\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6\tChordata\tActinopterygii\tAtherinidae\tAtherina hepsetus\t2\t30\tBS\tPOINT (13.63 43.55)\n+M1_DATA.213612\t213612\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6\tChordata\tActinopterygii\tSparidae\tDiplodus sargus\t2\t19\tBS\tPOINT (13.63 43.55)\n+M1_DATA.213613\t213613\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6\tChordata\tActinopterygii\tSparidae\tOblada melanura\t2\t1\tBS\tPOINT (13.63 43.55)\n+M1_DATA.213614\t213614\t912342200\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5\tChordata\tActinopterygii\tAtherinidae\tAtherina hepsetus\t1\t16\tBS\tPOINT (13.63 43.55)\n+M1_DATA.213615\t213615\t912342200\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5\tChordata\tActinopterygii\tSparidae\tDiplodus sargus\t1\t18\tBS\tPOINT (13.63 43.55)\n+M1_DATA.213616\t213616\t912342200\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5\tChordata\tActinopterygii\tSparidae\tDiplodus vulgaris\t2\t4\tBS\tPOINT (13.63 43.55)\n+M1_DATA.213617\t213617\t912342200\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5\tChordata\tActinopterygii\tSparidae\tOblada melanura\t1\t29\tBS\tPOINT (13.63 43.55)\n+M1_DATA.213618\t213618\t912342201\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.1\tChordata\tActinopterygii\tSparidae\tDiplodus annularis\t1\t3\tBS\tPOINT (13.63 43.55)\n+M1_DATA.213619\t213619\t912342201\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.1\tChordata\tActinopterygii\tSparidae\tDiplodus vulgaris\t1\t10\tBS\tPOINT (13.63 43.55)\n+M1_DATA.213668\t213668\t912342201\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.1\tChordata\tActinopterygii\tMullidae\tMullus surmuletus\t2\t1\tBS\tPOINT (13.63 43.55)\n+M1_DATA.213669\t213669\t912342201\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t5.1\tChordata\tActinopterygii\tLabridae\tSymphodus tinca\t1\t1\tBS\tPOINT (13.63 43.55)\n+M1_DATA.220617\t220617\t912342198\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT1\tDue Sorella\t43.54\t13.63\t2012-08-29T14:00:00Z\t6\tChordata\tActinopterygii\tSparidae\tDiplodus annularis\t1\t3\tBS\tPOINT (13.63 43.54)\n+M1_DATA.220644\t220644\t912342198\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT1\tDue Sorella\t43.54\t13.63\t2012-08-29T14:00:00Z\t6\tChordata\tActinopterygii\tSparidae\tDiplodus sargus\t2\t16\tBS\tPOINT (13.63 43.54)\n+M1_DATA.220645\t220645\t912342198\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT1\tDue Sorella\t43.54\t13.63\t2012-08-29T14:00:00Z\t6\tChordata\tActinopterygii\tMullidae\tMullus surmuletus\t1\t1\tBS\tPOINT (13.63 43.54)\n+M1_DATA.220646\t220646\t912342198\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT1\tDue Sorella\t43.54\t13.63\t2012-08-29T14:00:00Z\t6\tChordata\tActinopterygii\tLabridae\tSymphodus ocellatus\t1\t2\tBS\tPOINT (13.63 43.54)\n+M1_DATA.220647\t220647\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6\tChordata\tActinopterygii\tAtherinidae\tAtherina hepsetus\t1\t5\tBS\tPOINT (13.63 43.55)\n+M1_DATA.220648\t220648\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6\tChordata\tActinopterygii\tSparidae\tBoops boops\t2\t25\tBS\tPOINT (13.63 43.55)\n+M1_DATA.220649\t220649\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z\t6\tChordata\tActinopterygii\tSparidae\tDiplodus annularis\t1\t9\tBS\tPOINT (13.63 43.55)\n+M1_DATA.220650\t220650\t912342199\tItaly\tAdriatic Sea\tTemperate Northern Atlantic\tIT2\tLa Vela\t43.55\t13.63\t2012-09-22T14:00:00Z'..b'rn Atlantic\tMED30\tHatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t13\tChordata\tActinopterygii\tScaridae\tSparisoma cretense\t1\t1\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273049\t273049\t912344160\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED30\tHatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t13\tChordata\tActinopterygii\tLabridae\tThalassoma pavo\t1\t125\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273050\t273050\t912344160\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED30\tHatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t13\tChordata\tActinopterygii\tTripterygiidae\tTripterygion delaisi\t1\t1\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273051\t273051\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tPomacentridae\tChromis chromis\t2\t59\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273052\t273052\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tLabridae\tCoris julis\t2\t8\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273053\t273053\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tSparidae\tDiplodus cervinus\t2\t2\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273054\t273054\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tSerranidae\tEpinephelus marginatus\t1\t1\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273055\t273055\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tGobiidae\tGobius bucchichi\t1\t15\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273056\t273056\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tSparidae\tOblada melanura\t2\t2\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273057\t273057\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tPempheridae\tPempheris vanicolensis\t1\t5\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273058\t273058\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tSiganidae\tSiganus rivulatus\t2\t39\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273059\t273059\t912344161\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED31\tNorth Hatuna\t33.09\t35.1\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tLabridae\tThalassoma pavo\t1\t48\tGJE\tPOINT (35.1 33.09)\n+M1_DATA.273060\t273060\t912344162\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tPomacentridae\tChromis chromis\t2\t57\tGJE\tPOINT (35.08 33.04)\n+M1_DATA.273061\t273061\t912344162\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tLabridae\tCoris julis\t1\t39\tGJE\tPOINT (35.08 33.04)\n+M1_DATA.273062\t273062\t912344162\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tHolocentridae\tSargocentron rubrum\t1\t17\tGJE\tPOINT (35.08 33.04)\n+M1_DATA.273063\t273063\t912344162\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tSiganidae\tSiganus rivulatus\t1\t1\tGJE\tPOINT (35.08 33.04)\n+M1_DATA.273064\t273064\t912344162\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t10\tChordata\tActinopterygii\tScaridae\tSparisoma cretense\t2\t5\tGJE\tPOINT (35.08 33.04)\n+M1_DATA.273092\t273092\t912344163\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t11\tChordata\tActinopterygii\tPomacentridae\tChromis chromis\t1\t10\tGJE\tPOINT (35.08 33.04)\n+M1_DATA.273093\t273093\t912344163\tIsrael\tLevantine Sea\tTemperate Northern Atlantic\tMED32\tSegavion\t33.04\t35.08\t2014-06-28T14:00:00Z\t11\tChordata\tActinopterygii\tSparidae\tDiplodus vulgaris\t1\t4\tGJE\tPOINT (35.08 33.04)\n' |