{"id":17527830,"url":"https://github.com/hokagem/damagedlogginganalyzer","last_synced_at":"2026-05-03T17:34:49.276Z","repository":{"id":235831201,"uuid":"786997629","full_name":"HokageM/DamagedLoggingAnalyzer","owner":"HokageM","description":"A project about an analyzation of a statistic of damaged logging (wood) in Germany using Python.","archived":false,"fork":false,"pushed_at":"2024-05-17T17:50:06.000Z","size":35666,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-16T14:56:08.268Z","etag":null,"topics":["analysis","csv","csv-parser","k-fold-cross-validation","numpy","pandas","pandas-dataframe","pandas-python","polynomial-regression","scikit-learn","statistics","wood"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HokageM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-15T17:37:46.000Z","updated_at":"2025-04-14T11:31:14.000Z","dependencies_parsed_at":"2024-04-24T17:50:55.106Z","dependency_job_id":"7921d58e-4b0f-4731-9f72-f78fe94d8457","html_url":"https://github.com/HokageM/DamagedLoggingAnalyzer","commit_stats":null,"previous_names":["hokagem/damagedlogginganalyzer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/HokageM/DamagedLoggingAnalyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HokageM%2FDamagedLoggingAnalyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HokageM%2FDamagedLoggingAnalyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HokageM%2FDamagedLoggingAnalyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HokageM%2FDamagedLoggingAnalyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HokageM","download_url":"https://codeload.github.com/HokageM/DamagedLoggingAnalyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HokageM%2FDamagedLoggingAnalyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32578843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["analysis","csv","csv-parser","k-fold-cross-validation","numpy","pandas","pandas-dataframe","pandas-python","polynomial-regression","scikit-learn","statistics","wood"],"created_at":"2024-10-20T15:24:19.231Z","updated_at":"2026-05-03T17:34:49.259Z","avatar_url":"https://github.com/HokageM.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DamagedLoggingAnalyzer\n\n\u003cimg src=\"logo/logo.jpeg\" width=\"200\"\u003e\n\nA project about of analyzing a statistic of damaged logging wood in Germany using Python.\n\nThis is my individual project for the module **Research Software Engineering** in SS24.\nThe task was to analyze a dataset from [genesis.destatis](https://www-genesis.destatis.de/genesis/online?operation=abruftabelleBearbeiten\u0026levelindex=1\u0026levelid=1713202276894\u0026auswahloperation=abruftabelleAuspraegungAuswaehlen\u0026auswahlverzeichnis=ordnungsstruktur\u0026auswahlziel=werteabruf\u0026code=41261-0003\u0026auswahltext=\u0026werteabruf=starten)\nusing Python and to find interesting aspects and potential questions that could be explored using this data.\n\nIf you are only interested in the results, please jump to the section [Damaged Logging](#damaged-logging).\n\n# Installation\n\n```bash\ngit clone git@github.com:HokageM/DamagedLoggingAnalyzer.git\ncd DamagedLoggingAnalyzer\npip install .\n```\n\n# Usage\n\n## Commandline\n\n```bash\nusage: damaged_logg_analyzer [-h] [--version] [--calculate-most-dangerous-reasons] [--plot-reason-dependencies] [--plot-owner-dependencies] [--plot-temporal-dependencies-all] [--predict]\n                             [--out-dir OUT_DIR]\n                             CSV\n\nAnalyzes the data about damaged wood from the CSV file.\n\npositional arguments:\n  CSV                   Path to the CSV containing the statistic.\n\noptions:\n  -h, --help            show this help message and exit\n  --version             show program's version number and exit\n  --calculate-most-dangerous-reasons\n                        Calculates the most dangerous reasons for each specie.\n  --plot-reason-dependencies\n                        Create combined plots for each specie and owner combinations for all reasons. Plots will be saved in: output-path/Specie/all_reasons/Owner/plot.png.\n  --plot-owner-dependencies\n                        Create combined plots for each specie and reason combinations for all owners. Plots will be saved in: output-path/Specie/Reason/all_owners/plot.png.\n  --plot-temporal-dependencies-all\n                        Create plots for temporal dependencies for each specie, reason and owner combination. Plots will be saved in: output-path/Specie/Reason/Owner/plot.png. Note: use --plot-\n                        owner-dependencies and --plot-reason-dependencies.\n  --predict             Estimates a death count function using Polynomial Regression with K-Fold Cross Validation to predict the numbers for the year 2024. Plots will be saved in: output-\n                        path/Prediction_2024/Specie/Reasons/Owner/plot.png.Note: will created a new model for every specie, reason and owner combination.\n  --out-dir OUT_DIR     Output directory for the plots.\n```\n\n## Library\n\nThe following classes are available:\n\n```python\nfrom damagedlogginganalyzer.DamagedLoggingAnalyzer import DamagedLoggingAnalyzer\nfrom damagedlogginganalyzer.CSVAnalyzer import CSVAnalyzer\nfrom damagedlogginganalyzer.Plotter import Plotter\nfrom damagedlogginganalyzer.WoodOracle import WoodOracle\nfrom damagedlogginganalyzer.Oracle import Oracle\n```\n\nThe classes `CSVAnalyzer` and `Oracle` are independent of this project and can be used for other projects.\nMoreover, the classes `DamagedLoggingAnalyzer`, `WoodOracle` and `Plotter` are specific for this project / data set.\n\n# Damaged Logging\n\n**Note:** You can optionally read the notebook [story_of_this_project.ipynb](https://github.com/HokageM/DamagedLoggingAnalyzer/tree/main/notebooks/story_of_this_project.ipynb) to have an interactive experience with the project.\n\n## What is the dataset about?\n\nThe dataset contains statistics on forest wood harvesting due to various damages in Germany,\nlisted by year, type of wood species groups, and ownership types of forests. \n\nEach entry specifies the volume of wood harvested (in cubic meters) due to different causes\nsuch as wind/storm, snow/ice damage, insects, drought, and other reasons.\n\n## Why is this dataset interesting?\n\nHere are some interesting aspects and potential questions, which could explore using this data:\n\n**Temporal Trends**: \nHow has the damage-caused wood harvesting changed over the years? \nAre there increasing trends in certain types of damage like drought or insects, possibly linked to climate change?\nHow will the year 2024 look like in terms of the volume of wood harvested due to different causes?\n\n**Damage Types**: \nWhich type of damage causes the most wood harvesting? \nHow do different types of forests compare in their vulnerability to specific damage types?\n\n**Forest Management**: \nAre there noticeable differences in wood harvesting due to damage across different forest ownership types \n(e.g., state-owned vs. privately-owned forests)? This could reflect different management practices and their effectiveness.\n\n### Potential Questions (will not be answered in this project):\n\n**Impact of Extreme Weather**: \nAre there particular years with exceptionally high damage that could be correlated to extreme weather events or climate anomalies?\n\n**Economic and Ecological Impact**: \nWhat might be the economic impact of these losses? \nHow might these harvesting activities due to damages impact the ecological balance and biodiversity in these forests?\n\n## Temporal Trends\n**Question**:\nHow has the damage-caused wood harvesting changed over the years? \n\nI created individual plots for the total volume of wood harvested due to different reasons (drought, wind/storm, snow, insects, miscellaneous, total) and different owners over the years for different types of wood species.\nHere are some examples (the other plots can be found in the [plots](https://github.com/HokageM/DamagedLoggingAnalyzer/tree/main/plots)/specie/reason/owner/plot.png directory or can be generated with the following command:\n\n```bash\ndamaged_logg_analyzer data/DamagedLoggingWoodFixTable.csv --plot-temporal-dependencies-all --out-dir plots\n```\n\nDeaths of Oak and Red Oak caused by insects and owned by `Insgesamt` over the years in Germany:\n\n\u003cimg src=\"plots/Eiche_und_Roteiche/Insekten/Insgesamt/plot.png\" width=\"500\"\u003e\n\n\nDeaths of Pine caused by insects and owned by `Insgesamt` over the years in Germany:\n\n\u003cimg src=\"plots/Kiefer_und_L�rche/Insekten/Insgesamt/plot.png\" width=\"500\"\u003e\n\n\nAdditionally, I created combined plots for the different types of wood species.\n**Note:** In the following, I will only show the combined plots for the different types of wood species and owned by `Insgesamt`. The other plots can be found in the [plots](https://github.com/HokageM/DamagedLoggingAnalyzer/tree/main/plots)/specie/all_reasons/owner/plot.png directory or can be generated with the following command:\n\n```bash\ndamaged_logg_analyzer data/DamagedLoggingWoodFixTable.csv --plot-reason-dependencies --out-dir plots\n```\n\nTotal Oak and Red Oak deaths over the years in Germany:\n\n\u003cimg src=\"plots/Eiche_und_Roteiche/all_reasons/Insgesamt/plot.png\" width=\"500\"\u003e\n\nTotal Beech and Hardwood deaths over the years in Germany:\n\n\u003cimg src=\"plots/Buche_und_sonstiges_Laubholz/all_reasons/Insgesamt/plot.png\" width=\"500\"\u003e\n\nTotal Spruce deaths over the years in Germany:\n\n\u003cimg src=\"plots/Fichte_und_Tanne_und_Douglasie_und_sonstiges_Nadelholz/all_reasons/Insgesamt/plot.png\" width=\"500\"\u003e\n\nTotal Pine deaths over the years in Germany:\n\n\u003cimg src=\"plots/Kiefer_und_L�rche/all_reasons/Insgesamt/plot.png\" width=\"500\"\u003e\n\nTotal tree deaths over the years in Germany:\n\n\u003cimg src=\"plots/Insgesamt/all_reasons/Insgesamt/plot.png\" width=\"500\"\u003e\n\nAll in all, one can see that the deaths of all species due to the most reasons depend on the year and fluctuate between high and low values.\nHowever, the total deaths of all species are increasing over the years especially for the reasons `Sonstiges` (miscellaneous), which could be caused by fires, diseases, or other reasons.\nThe definition of `Sonstiges` is not clear in the dataset.\n\n**Question**:\nAre there increasing trends in certain types of damage like drought or insects, possibly linked to climate change?\n\nAll in all, the death of all species due to drought, snow, and insects can be modeled as linear (near constant) functions.\nPlease look in [Prediction_2024](https://github.com/HokageM/DamagedLoggingAnalyzer/tree/main/plots/Prediction_2024) for the function estimations.\n\nThe deaths of all species due to wind/storm depends on the year and fluctuate between high and low values.\nBut one can see a very high number of deaths due to wind/storm in the year 2006 and 2018.\n\nThe deaths of all species due to `Sonstiges` (miscellaneous) can be modeled quit good with a polynomial function and are increasing over the years.\n\nThe total deaths of all species are increasing over the years.\n\n**Question**:\nHow will the year 2024 look like in terms of the volume of wood harvested due to different causes?\n\nI used polynomial regression with k-fold cross validation to predict the volume of wood harvested due to different causes in the year 2024.\n**Note:** The prediction is based on the data from 2006 to 2023. All plots can be found in the [Prediction_2024](https://github.com/HokageM/DamagedLoggingAnalyzer/tree/main/plots/Prediction_2024) directory or can be generated with the following command:\n\n```bash\ndamaged_logg_analyzer data/DamagedLoggingWoodFixTable.csv --predict --out-dir path/to/output\n```\n\nThe death of all species due to \"Sonsitges\" (miscellaneous) can be modeled quit good with a polynomial function, e.g. for the Beech and Hardwood species group:\n\n\u003cimg src=\"plots/Prediction_2024/Buche_und_sonstiges_Laubholz/Sonstiges/Insgesamt/plot.png\" width=\"500\"\u003e\n\n**In some cases prediction does not make sense**, because the death do not follow a polynomial function and depend on other factors, e.g. death causes by insects:\n\n\u003cimg src=\"plots/Prediction_2024/Buche_und_sonstiges_Laubholz/Insekten/Insgesamt/plot.png\" width=\"500\"\u003e\n\n\nDeaths due to nature like wind/storm, snow, and drought can be modeled as linear functions, e.g. for the Beech and Hardwood species group.\n**Note**: One need to handle the outliers in the data, e.g. the death of the year 2018 for the Beech and Hardwood species group due to wind/storm, \nthis can be done by using a Ridge Regression model.\nThose outliers come from special events like storms, which are not predictable with the current model.\n\n\u003cimg src=\"plots/Prediction_2024/Eiche_und_Roteiche/Wind__Sturm/Insgesamt/plot.png\" width=\"500\"\u003e\n\n## Damage Types \n**Question**:\nWhich type of damage causes the most wood harvesting? \n\nThis is solved by calculating the maximum damage for each type of wood species group, which can be done with the following command:\n\n```bash\ndamaged_logg_analyzer data/DamagedLoggingWoodFixTable.csv --calculate-most-dangerous-reasons\n```\n\nThe maximum damage for each type of wood species group is:\n\n| Specie                                                 | Reason      | Amount |\n|--------------------------------------------------------|-------------|--------|\n| Eiche und Roteiche                                     | Wind/ Sturm | 2048   |\n| Buche und sonstiges Laubholz                           | Wind/ Sturm | 9124   |\n| Kiefer und L�rche                                      | Wind/ Sturm | 19806  |\n| Fichte und Tanne und Douglasie und sonstiges Nadelholz | Sonstiges   | 208725 |\n| Insgesamt                                              | Sonstiges   | 218181 |\n\n**Question**:\nHow do different types of forests compare in their vulnerability to specific damage types?\n\nThis is also solved by the following command:\n\n```bash\ndamaged_logg_analyzer data/DamagedLoggingWoodFixTable.csv --calculate-most-dangerous-reasons --plot-temporal-dependencies-all\n```\n\nAnalyzing the plots show that `Buche und sonstiges Laubholz` and `Eiche und Roteiche` have fewer deaths in any reason \ncompared to `Kiefer und L�rche` and `Fichte und Tanne und Douglasie und sonstiges Nadelholz`.\nThe death counts are up to 10 times higher for `Kiefer und L�rche` and `Fichte und Tanne und Douglasie und sonstiges Nadelholz`\ncompared to `Buche und sonstiges Laubholz` and `Eiche und Roteiche`.\n\n## Forest Management\n**Question**:\nAre there noticeable differences in wood harvesting due to damage across different forest ownership types \n(e.g., state-owned vs. privately-owned forests)? This could reflect different management practices and their effectiveness.\n\nThis is solved by the following command:\n\n```bash\ndamaged_logg_analyzer data/DamagedLoggingWoodFixTable.csv --plot-owner-dependencies\n```\n\nAnalyzing the plots show that the deaths due to different reasons are similar for the different owners. So it seems that the owner does not have a big impact on the death count.\nHere are some examples and the other plots can be found in the [plots](https://github.com/HokageM/DamagedLoggingAnalyzer/tree/main/plots)/specie/reason/all_owners/plot.png:\n\nDeaths of Oak and Red Oak caused by insects and owned by `Insgesamt` over the years in Germany:\n\n\u003cimg src=\"plots/Eiche_und_Roteiche/Insekten/all_owners/plot.png\" width=\"500\"\u003e\n\nDeaths of Pine caused by insects and owned by `Insgesamt` over the years in Germany:\n\n\u003cimg src=\"plots/Kiefer_und_L�rche/Insekten/all_owners/plot.png\" width=\"500\"\u003e\n\n# Contact Information\n\nIf you have any questions, suggestions, or concerns about this project, feel free to contact me:\n\n- **LinkedIn:** [Mike Trzaska](https://de.linkedin.com/in/mike-trzaska-b576a6201)\n- **GitHub:** [HokageM](https://github.com/HokageM)\n\n# Statistic about Damaged Logging\n\nFrom: [genesis.destatis](https://www-genesis.destatis.de/genesis/online?operation=abruftabelleBearbeiten\u0026levelindex=1\u0026levelid=1713202276894\u0026auswahloperation=abruftabelleAuspraegungAuswaehlen\u0026auswahlverzeichnis=ordnungsstruktur\u0026auswahlziel=werteabruf\u0026code=41261-0003\u0026auswahltext=\u0026werteabruf=starten)\n\nStatistic Number: 41261-0003\n\n# Citation\n\nIf you use this software, please cite it as described in the [CITATION.cff](CITATION.cff) file.\n\n\n# License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhokagem%2Fdamagedlogginganalyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhokagem%2Fdamagedlogginganalyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhokagem%2Fdamagedlogginganalyzer/lists"}