{"id":25817291,"url":"https://github.com/landscapegeoinformatics/lc_metrics_resources","last_synced_at":"2025-06-29T09:04:46.044Z","repository":{"id":128475255,"uuid":"214106161","full_name":"LandscapeGeoinformatics/lc_metrics_resources","owner":"LandscapeGeoinformatics","description":"Collection of scripts to compute large scale landscape metrics","archived":false,"fork":false,"pushed_at":"2019-10-12T13:36:43.000Z","size":1668,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T12:47:07.612Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LandscapeGeoinformatics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-10T06:38:59.000Z","updated_at":"2021-01-14T16:26:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9ec1843-9fed-460e-a400-2ee13b8b82e6","html_url":"https://github.com/LandscapeGeoinformatics/lc_metrics_resources","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/LandscapeGeoinformatics/lc_metrics_resources","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LandscapeGeoinformatics%2Flc_metrics_resources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LandscapeGeoinformatics%2Flc_metrics_resources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LandscapeGeoinformatics%2Flc_metrics_resources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LandscapeGeoinformatics%2Flc_metrics_resources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LandscapeGeoinformatics","download_url":"https://codeload.github.com/LandscapeGeoinformatics/lc_metrics_resources/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LandscapeGeoinformatics%2Flc_metrics_resources/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262566829,"owners_count":23329681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-28T06:33:49.134Z","updated_at":"2025-06-29T09:04:46.037Z","avatar_url":"https://github.com/LandscapeGeoinformatics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lc_metrics_resources\n\nCollection of scripts to compute large scale landscape metrics.\n\nFor several examples working on the whole Amazon region we had several very similar scirpt and running configurations.\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/LandscapeGeoinformatics/lc_metrics_resources/master?filepath=interactive-example.ipynb)\n[![DOI](https://zenodo.org/badge/214106161.svg)](https://zenodo.org/badge/latestdoi/214106161)\n\nMost importanly Python packages: `numpy`, `scipy`, `pandas`, `gdal`,`rasterio` and for emailing `sendgrid` (see examplary `conda`-based `environment.yml` file)\n\nIn each example folder there are several scripts that make up the experiment: a shell script (`calc_lcmodel_stats_test.sh` and `run.sh`) for sending calculation to background process via e.g. the Unix/Linux `nohup` command. Then the main python script (`second_stats_amz_prode_yearly.py` and `stats_runner.py` scripts respectively) that imports `lcmodel` and prepares and loads the raster into the required labelled numpy array structure. Also the metrics are selected in the main scripts. Finally, calculated metrics are collated into a `pandas` dataframe and saved into a .csv file.\nFor emailsending after a long-running calculation on Google Cloud platform we used `sendgrid`, as shown in the `demo_send_email.py` script, which would be invoked after the main Python script via the shell script. For that you need an own API key in the line `sg = sendgrid.SendGridAPIClient(\"xxx\")`\n\n## Attribution for LecoS\n\nThe core module `lcmodel.py` is based on Martin Jung's [LecoS](https://github.com/Martin-Jung/LecoS) - a Land cover statistics plugin for QGIS - which uses a Connected Component to calculates landscape metrics. The use can choose to calculate single or several metrics for the raster classes.\n\nLecoS Reference:\nMartin Jung, LecoS — A python plugin for automated landscape ecology analysis, Ecological Informatics, Volume 31, January 2016, Pages 18-21, ISSN 1574-9541, http://dx.doi.org/10.1016/j.ecoinf.2015.11.006.\n\nLicence:\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flandscapegeoinformatics%2Flc_metrics_resources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flandscapegeoinformatics%2Flc_metrics_resources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flandscapegeoinformatics%2Flc_metrics_resources/lists"}