MedSens: Mediterranean Marine Species Abundance (Reef Check Italia)¶
Category: Marine Biodiversity · Size: 2.3 MB · Format: ZIP License: CC-BY-4.0 · Zenodo record · Data sheet on the CSDH
Abundance of 25 Mediterranean marine species collected by volunteer divers under the Reef Check Mediterranean protocol, used to compute the MedSens biotic index.
The data is mounted read-only at /srv/data/medsens-mediterranean/.
Save anything you produce in your personal folder (~/).
What's in the dataset¶
from pathlib import Path
DATA = Path('/srv/data/medsens-mediterranean')
for f in sorted(DATA.rglob('*')):
if f.is_file():
print(f"{f.relative_to(DATA)} ({f.stat().st_size/1e6:,.1f} MB)")
MedSens_data 20230423.zip (2.3 MB)
Explore the ZIP¶
The dataset comes compressed. We list its contents without extracting; if it contains CSVs, pandas can read them straight from inside the ZIP. Remember: /srv/data is read-only — if you need to extract, do it into your folder (~/).
import zipfile
import pandas as pd
zips = sorted(DATA.rglob('*.zip'))
z = zipfile.ZipFile(zips[0])
print('Using:', zips[0].name)
names = z.namelist()
print(f'{len(names)} files inside; first 20:')
for n in names[:20]:
print(' ', n)
csv_inside = [n for n in names if n.lower().endswith('.csv')]
if csv_inside:
df = pd.read_csv(z.open(csv_inside[0]), nrows=100_000, low_memory=False)
display(df.head())
Using: MedSens_data 20230423.zip 5 files inside; first 20: MedSens_data.prj MedSens_data.qml MedSens_data.shp MedSens_data.shx MedSens_data.dbf
Your turn¶
This is just the starting point. Some ideas:
- Check the dataset challenge on its CSDH data sheet.
- Work on a copy: right-click the file → Duplicate (or Save Notebook As…). Your changes only live in your Hub space — they're never pushed to GitHub.
- Edited this notebook and want the original back? Use the Restore cell
below (or the
restore.ipynbnotebook). - Questions and results: on the platform forum.
Attribution: data from MedSens: Mediterranean Marine Species Abundance (Reef Check Italia), license CC-BY-4.0. Notebook from the Citizen Science Data Hub (CSDH) — Fundación Ibercivis.
# ⚠️ RESTORE: this DISCARDS YOUR CHANGES to this notebook and resets it to the original.
# 1. Uncomment the line below (remove the #) 2. Run this cell
# 3. Then: menu File → Reload Notebook from Disk
# !git -C ~/citizen-science-data fetch -q origin && git -C ~/citizen-science-data checkout origin/main -- medsens-mediterranean.ipynb && echo "Restored. Now: File → Reload Notebook from Disk"