A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

GlaThiDa

Glacier Thickness Database.
https://gitlab.com/wgms/glathida

Category: Cryosphere
Sub Category: Glacier and Ice Sheets

Keywords

collaboration database datapackage glacier glaciology global

Last synced: about 3 hours ago
JSON representation

Repository metadata

Glacier Thickness Database (GlaThiDa) https://www.gtn-g.ch/data_catalogue_glathida

README.md

glathida Glacier Thickness Database

Worldwide dataset of glacier thickness observations aggregated from literature review, data submissions, and published data.

Versions

Note that the data structure has changed (see documentation). Tables T, TT, and TTT are now glacier, band, and point. An additional survey table makes it possible to submit point measurements without a corresponding entry in glacier.

Contribute

Bug reports, data submissions, and other issues can be posted to the issue tracker at https://gitlab.com/wgms/glathida/-/issues. Submitters are encouraged to validate their data before submission (see the Developer guide further below).

Submission: as issue

For users who are not familiar with Git, data can be submitted as an issue.

  • Create a new issue: https://gitlab.com/wgms/glathida/-/issues/new
  • In the Choose a template dropdown, select Data submission.
  • Fill out and follow the instructions in the issue template.
  • Link to your data or attach it directly to the issue. Ideally, the data should be a spreadsheet or CSV files with column names and values as described in the documentation.
  • Click Create issue.

Your submission will be reviewed by a maintainer, who will create a merge request.

Submission: as merge request

Users familiar with Git are encouraged to submit a merge request directly.

  • Fork the repository.
  • Create a new branch in your fork.
  • Add data to a new subdirectory of submissions (for example, submissions/{investigator name}-{survey or publication year}-{glacier name}). Data should be CSV files structured as described in the documentation.
  • Modify or remove existing data (in /data) as needed.
  • Create a merge request.

Continuous integrations tests will automatically check your submission. If they fail, you are encouraged to commit further changes until they pass. The merge request will be reviewed by a maintainer and hopefully merged!

Developer guide

Clone the repository and move into the directory.

git clone https://gitlab.com/wgms/glathida.git
cd glathida

Create the glathida conda environment and activate it.

conda env create --file environment.yaml
conda activate glathida

Run tests on the metadata (datapackage.yaml) and data (data/*).

pytest

Or test a data submission.

python -m tests.check_submission path/to/submission
# For example:
# python -m tests.check_submission data/24k-glacier-2019

User guide (Python)

Read data

The legacy (v3) data is stored as CSV files directly in the data subdirectory (e.g. data/point.csv), but new data is stored in subdirectories of data (for example, data/24k-glacier-2019/point.csv). To read all data as unified tables, the provided helpers.read_data function can be used. This assumes the glathida Python environment has been activated (see above).

from tests import helpers

dfs = helpers.read_data()
dfs.keys()
# dict_keys(['glacier', 'point', 'survey', 'band'])

Otherwise, the following can be used in a typical Python environment.

from collections import defaultdict
from pathlib import Path

import pandas as pd


paths = Path('data').rglob('*.csv')
dfs = defaultdict(list)
for path in paths:
  df = pd.read_csv(path, low_memory=False)
  dfs[path.stem].append(df)
dfs = {
  name: pd.concat(df_list, ignore_index=True)
  for name, df_list in dfs.items()
}

Assign RGI ID to points

Assumes the data are already loaded in dfs as above.

import geopandas as gpd

# Convert points DataFrame to a GeoDataFrame
df = dfs['point']
points = gpd.GeoDataFrame(
  df, geometry=gpd.points_from_xy(df['longitude'], df['latitude'], crs=4326)
)

# Read RGI inventory
rgi = gpd.read_file('path/to/rgi')

# Add RGI ID to points using spatial indexing (for speed)
# NOTE: points.sjoin(rgi, how='left', predicate='within') may be as fast
# NOTE: Assumes RGI ID is in column 'rgi_id' (v7). Use 'RGIId' for v6.
points['rgi_id'] = None
i_rgi, i_points = points.sindex.query(rgi.geometry, predicate='intersects')
points.loc[points.index[i_points], 'rgi_id'] = rgi.iloc[i_rgi]['RGIId'].values

Owner metadata


Committers metadata

Last synced: 6 months ago

Total Commits: 202
Total Committers: 1
Avg Commits per committer: 202.0
Development Distribution Score (DDS): 0.0

Commits in past year: 34
Committers in past year: 1
Avg Commits per committer in past year: 34.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
ezwelty e****y@g****m 202

Committer domains:


Issue and Pull Request metadata

Last synced: 6 months ago

Total issues: 20
Total pull requests: 11
Average time to close issues: about 1 year
Average time to close pull requests: 10 months
Total issue authors: 3
Total pull request authors: 2
Average comments per issue: 0.85
Average comments per pull request: 0.55
Merged pull request: 0
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://gitlab.com/wgms/glathida

Top Issue Authors

  • ezwelty (18)
  • fmaussion (1)
  • grabmelchior (1)

Top Pull Request Authors

  • ezwelty (10)
  • bpelto (1)

Top Issue Labels

  • enhancement (11)
  • discussion (7)
  • submission (1)

Top Pull Request Labels

  • enhancement (3)
  • bug (3)

Score: 2.5649493574615367