{"id":13948369,"url":"https://gitlab.com/wgms/glathida","last_synced_at":"2025-07-20T10:30:39.753Z","repository":{"id":57771744,"uuid":"14130804","full_name":"wgms/glathida","owner":"wgms","description":"Glacier Thickness Database (GlaThiDa)\r\nhttps://www.gtn-g.ch/data_catalogue_glathida\r\n","archived":false,"fork":false,"pushed_at":null,"size":null,"stargazers_count":2,"open_issues_count":11,"forks_count":2,"subscribers_count":null,"default_branch":"main","last_synced_at":"2025-05-09T18:32:06.372Z","etag":null,"topics":["collaboration","database","datapackage","glacier","glaciology","global"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://gitlab.com/uploads/-/system/project/avatar/14130804/wgms-logo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-03T21:02:18.461Z","updated_at":"2025-02-06T10:21:58.356Z","dependencies_parsed_at":"2022-09-04T09:21:57.527Z","dependency_job_id":null,"html_url":"https://gitlab.com/wgms/glathida","commit_stats":null,"previous_names":[],"tags_count":5,"template":null,"template_full_name":null,"purl":"pkg:gitlab/wgms/glathida","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/wgms%2Fglathida","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/wgms%2Fglathida/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/wgms%2Fglathida/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/wgms%2Fglathida/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners/wgms","download_url":"https://gitlab.com/wgms/glathida/-/archive/main/glathida-main.zip","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/wgms%2Fglathida/sbom","host":{"name":"gitlab.com","url":"https://gitlab.com","kind":"gitlab","repositories_count":4518950,"owners_count":6979,"icon_url":"https://github.com/gitlab.png","version":null,"created_at":"2022-05-30T11:31:42.605Z","updated_at":"2024-07-18T11:24:13.055Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners"}},"keywords":["collaboration","database","datapackage","glacier","glaciology","global"],"created_at":"2024-08-08T05:01:21.589Z","updated_at":"2025-07-20T10:30:39.699Z","avatar_url":"https://gitlab.com/uploads/-/system/project/avatar/14130804/wgms-logo.png","language":null,"funding_links":[],"categories":["Cryosphere"],"sub_categories":["Glacier and Ice Sheets"],"readme":"# `glathida` Glacier Thickness Database\n\nWorldwide dataset of glacier thickness observations aggregated from literature review, data submissions, and published data.\n\n## Versions\n\n- `v3.1.0`: The latest published version of `glathida` is available from the GTN-G website (https://doi.org/10.5904/wgms-glathida-2020-10). It is described in:\n\n  - Welty et al. (2020). _Worldwide version-controlled database of glacier thickness observations_. Earth System Science Data, 12, 3039–3055. https://doi.org/10.5194/essd-12-3039-2020\n\n- `v4-beta`: The next version is in development and available from this GitLab repository (https://gitlab.com/wgms/glathida). There is yet no timeline for publication of this version.\n\nNote that the data structure has changed (see [documentation](https://gitlab.com/wgms/glathida/-/blob/main/documentation.md#data-structure)). 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`. \n\n## Contribute\n\nBug 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](https://gitlab.com/wgms/glathida#developer-guide) further below).\n\n### Submission: as issue\n\nFor users who are not familiar with Git, data can be submitted as an issue.\n\n- Create a new issue: https://gitlab.com/wgms/glathida/-/issues/new\n- In the `Choose a template` dropdown, select `Data submission`.\n- Fill out and follow the instructions in the issue template.\n- 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](https://gitlab.com/wgms/glathida/-/blob/main/documentation.md#data-structure).\n- Click `Create issue`.\n\nYour submission will be reviewed by a maintainer, who will create a merge request.\n\n### Submission: as merge request\n\nUsers familiar with Git are encouraged to submit a merge request directly.\n\n- Fork the repository.\n- Create a new branch in your fork.\n- 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](https://gitlab.com/wgms/glathida/-/blob/main/documentation.md#data-structure).\n- Modify or remove existing data (in `/data`) as needed.\n- Create a merge request.\n\nContinuous 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!\n\n## Developer guide\n\nClone the repository and move into the directory.\n\n```sh\ngit clone https://gitlab.com/wgms/glathida.git\ncd glathida\n```\n\nCreate the `glathida` [conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) environment and activate it.\n\n```sh\nconda env create --file environment.yaml\nconda activate glathida\n```\n\nRun tests on the metadata (`datapackage.yaml`) and data (`data/*`).\n\n```sh\npytest\n```\n\nOr test a data submission.\n\n```sh\npython -m tests.check_submission path/to/submission\n# For example:\n# python -m tests.check_submission data/24k-glacier-2019\n```\n\n## User guide (Python)\n\n### Read data\n\nThe 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).\n\n```py\nfrom tests import helpers\n\ndfs = helpers.read_data()\ndfs.keys()\n# dict_keys(['glacier', 'point', 'survey', 'band'])\n```\n\nOtherwise, the following can be used in a typical Python environment.\n\n```py\nfrom collections import defaultdict\nfrom pathlib import Path\n\nimport pandas as pd\n\n\npaths = Path('data').rglob('*.csv')\ndfs = defaultdict(list)\nfor path in paths:\n  df = pd.read_csv(path, low_memory=False)\n  dfs[path.stem].append(df)\ndfs = {\n  name: pd.concat(df_list, ignore_index=True)\n  for name, df_list in dfs.items()\n}\n```\n\n### Assign RGI ID to points\n\nAssumes the data are already loaded in `dfs` as above.\n\n```py\nimport geopandas as gpd\n\n# Convert points DataFrame to a GeoDataFrame\ndf = dfs['point']\npoints = gpd.GeoDataFrame(\n  df, geometry=gpd.points_from_xy(df['longitude'], df['latitude'], crs=4326)\n)\n\n# Read RGI inventory\nrgi = gpd.read_file('path/to/rgi')\n\n# Add RGI ID to points using spatial indexing (for speed)\n# NOTE: points.sjoin(rgi, how='left', predicate='within') may be as fast\n# NOTE: Assumes RGI ID is in column 'rgi_id' (v7). Use 'RGIId' for v6.\npoints['rgi_id'] = None\ni_rgi, i_points = points.sindex.query(rgi.geometry, predicate='intersects')\npoints.loc[points.index[i_points], 'rgi_id'] = rgi.iloc[i_rgi]['RGIId'].values\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fwgms%2Fglathida","html_url":"https://awesome.ecosyste.ms/projects/gitlab.com%2Fwgms%2Fglathida","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fwgms%2Fglathida/lists"}