Skip to content

Commit

Permalink
adding geopandas
Browse files Browse the repository at this point in the history
  • Loading branch information
hammerdirt committed Jun 9, 2024
1 parent c3b2c34 commit 719448c
Show file tree
Hide file tree
Showing 82 changed files with 2,223 additions and 4,419 deletions.
Binary file modified _build/.doctrees/bern.doctree
Binary file not shown.
Binary file modified _build/.doctrees/cantonal_report.doctree
Binary file not shown.
Binary file modified _build/.doctrees/environment.pickle
Binary file not shown.
Binary file removed _build/.doctrees/gpt_data.doctree
Binary file not shown.
Binary file added _build/.doctrees/project.doctree
Binary file not shown.
Binary file modified _build/.doctrees/titlepage.doctree
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
204 changes: 108 additions & 96 deletions _build/html/_sources/bern.ipynb

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions _build/html/_sources/cantonal_report.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
(gridforecaster)=
# Grid forecast

We consider that forecasting or predicting is the process of making statements about events that have yet to occurr. In this case we are using historical results to form our opinion about the probability of an event in the future. The event we considering is rather pedestrian:
We consider that forecasting or predicting is the process of making statements about events that have yet to occurr. In this case we are using historical results to form our opinion about the probability of an event in the future. The event we are considering is rather pedestrian:

> What will I find at the beach today, given what has been found at __other similar__ beaches or what was found at the beach in the past ?
Which means that our estimation of the objects we are likely to find is based on our own experience as well as the experience of others under similar conditions. This reasoning does not tell us about the reason why the object has bypassed the elaborate system put in place to prevent it from ending up on the beach.

We do, however, identify quantifiable vectors that certainly contain the cause. The vectors come directly from the official topographical map for the territory. As a result locations can be grouped according to the magnitude of the vector that has been derived from the topographical map. By comparing local results to national results with a quantifiable vector we have a very efficient way to combine experiences beyond a geographic limit. Thus we can estimate the comparison from one location using the results from locations that have similar attributes but not geographically related.

Here we show how the `gridforecast` module works. Specifically the different methods of the `gridforecast.MulitnomialDirichlet` class. It is a grid aproximation in Bayesien framework. We start the process with conditional probability, make the connection with Bayes` theorem and finish with the conjugate relationship Dirichlet-Multinomial. The application to survey data is implemented in scipy and numpy.
Which means that the estimation of the most common objects we are likely to find is based on our own experience as well as the experience of others under similar conditions.

Our first consideration, however, is wether or not our research question is comensurate with our assumptions of the model. Otherwise no amount of mathematical manipulation will persuade a reasonable individual that an outstanding or extreme result is probable when there is no evidence that rises to the same level.

Expand Down
1,013 changes: 0 additions & 1,013 deletions _build/html/_sources/gpt_data.ipynb

This file was deleted.

92 changes: 92 additions & 0 deletions _build/html/_sources/project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Proposal

The challenge in front of us is to transform the observations into accurate and actionable information for two different purposes. There is the administration of the territory and identification of priorities with regard to plastics in the environment. Once the priorities have been established, the relevant data must now be communicated to the targeted population. In the first use case, which is a decision support role, we do not want to simplify/aggregate the data in such a way that the stake holders appreciation of the subject is reduced.

Therefore, we propose a haromnised reporting system that is administered by regional or national NGOS in collaboration with an academic partner with the stated goal of producing reliable reports for the public administration and others who communicate on such matters. This allows administrations to identify priorities and set baseline values according to agreed upon and observed indicators.

The first report proved that a relatively small team could cover a large territory with the correct technology. This remains the case. That is why we see this project, in its current itteration, specifically attractive to stakeholders with an internal data-science team. Stakeholders with experience in python or R will feel right at home in the development environment and will be the source of many improvements. For those interested in learning the basics, we are here to coach them and help them in their projects.

The proposal is thus to establish a hub that is dedicated to the collection, cleaning, aggregating and distribution of litter density data. The distribution of the data has the primary goal of producing decision support products to local administrations. Producing a harmonised reporting structure will allow administrations to identify priorities in a quantitative manner and place local survey results in the context of cantonal or national levels.

## Goals

> * Develop a reporting and research tool for stakeholders in the waste management, life cycle assessment and environmental monitoring sectors.
> * Increase capacity of stakeholders to monitor and report observations according to the current standard in the federal report using open source tools.
> * Assisst in the reduction and prevention of plastics in the environment
:::{dropdown} Deliverables: three year contract
1. 700 samples
2. Revised updated federal report
3. New cantonal and municipal reports
4. Cloud service for cantonal and municipal reporting
5. Article for publication
:::

:::{dropdown} Objectives
1. Collect 400 - 500 samples in a 12 month period
* reduce the number of items reported as _fragmented_ or _Gfrags_
1. This value can range from 20% - 30% of the total items collected
* include polymer identification for a subset of samples
1. Subset should support an academic publication
2. Subset should support a regional assessment of polymer types
* Increase knowledge sharing between surveyors
* Capacity building for surveyors

2. Increase the number of associations competent to collect and report data
* Develop one association on Lac de Constance or Zurichsee
* Develop training materials and protocols with ASL

3. Strucutre report specifically for cantonal and municipal reporting
* Revise and improve the current report
* Consider the format of the report given cantonal requirements (attached)

4. Build upon previous research and reports
* Continue to develop modeling and parameter estimation for litter density
* Focus on topographical features and densities
* Consider polymer types and densities

5. Define groups of objects of interest with stakeholders
* single use plastics
* agricultural plastics
* construction plastics
* industrial plastics

6. Develop a cloud first infrastructure and chat agent
* Move all data and software assests to Infrastructure as a Service (IaaS)
* Develop machine learning and artificial intelligence pipelines for data analysis
* Develop Automated programming interfaces (APIs) for data collection and reporting
* Develop a user interface for data collection and reporting
* Deploy chat agent
:::

:::{dropdown} Benchmarks
1. Year one: Proposed updates and revisions to the fedral report. Prposed model for cantonal and municipal reporting.
* Formal research proposal for polymer identification
* Formal research proposal for topographical features
* Functioning prototype of cloud service
* 100 samples collected
* stakeholder meeting
2. Year two:
* Assesment of software and data collection
* Revised report with current data
* Update on capacity building
* End of year two:
1. Presentation of revised report with current data
2. Summary of capacity building
3. 400 samples
3. stakeholder meeting
3. Year three:
* Presentation of feedback
* stakeholder meeting
* Proposed changes to app and report
* Final report:
1. implementation of feeedback
2. 200 samples
3. cloud service for cantonal and municipal reporting

:::


## Interested ?

Interested administrations or other potential financial partners should contact roger at hammerdirt.
41 changes: 21 additions & 20 deletions _build/html/_sources/titlepage.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# The litter assistant

::::{grid}
:gutter: 0

:::{grid-item-card}

:::{grid-item}

This is the proposed format and layout for an up-dated survey of the trash along swiss rivers, lakes and hiking trails. We have created reports for five cantons and one that provides a _federal perspective_. The data is real.

There have been developments in the domain of beach litter reporting since the first federal project. The Guide for Monitoring Litter on European seas was updated in 2023, the code system has changed for classifying objects and in May 2024 a guide for monitoring and removing plastics from inland waters was released.

Developments in the fields of machine learning (ML) and artificial intelligence (AI) give us new ways to assess the results of surveys and synthesise the current research. Topics of interest for those charged with reducing or preventing plastics in the environment.

:::

:::{grid-item-card}

```{image} resources/hammerdirt.png
Expand All @@ -20,33 +25,29 @@
::::
::::{grid}

:::{grid-item-card}
:::{grid-item}
__We have been busy__


:::
:::{grid-item}
__Associated projects__

* https://github.com/hammerdirt-analyst/IQAASL-End-0f-Sampling-2021
* https://github.com/hammerdirt-analyst/cantonal_reports
* https://github.com/hammerdirt-analyst/solid-waste-team
* https://github.com/hammerdirt-analyst/landuse
* plastock project with [ASL](https://asleman.org/)
* [plastock project with ASL](https://asleman.org/)
* https://github.com/hammerdirt-analyst/finding-one-object

:::
:::{grid-item-card}

:::
::::
The UX and final app structure can be tested here (! the llm is not yet attached): [litter assisstant](https://litterassistant.streamlit.app/)

Interested contributors can check the repo: https://github.com/hammerdirt-analyst/litterassistant
The assistants function is to assist the researcher in placing the current litter survey results within the context of their own projects. This includes conducting analysis that is not considered in the federal report. Another example is defining reports on administrative boundaries that are not considered in the federal report.

The _checking the assistant_ section is where users can check the data and methods of the assistant.

```{note}
We have reproduced the figures in all the reports produced thus far. We are now training the model to defaults so
that clients have access to a standardised display of the results.
```

:::{grid-item}
:columns: 12

## Questions
__THE TEAM__

contact analyst at hammerdirt
Shannon Erismann, Montserrat Filella, Téo Gursoy, Christian Ludwig, Roger Erismann, Bettina Siegenthaler
:::
::::
8 changes: 4 additions & 4 deletions _build/html/a_report_class.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Land use class" href="landuse_class.html" />
<link rel="prev" title="Use cases" href="display_reports.html" />
<link rel="prev" title="Project proposal" href="project.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
</head>
Expand Down Expand Up @@ -143,10 +143,10 @@
<div class="bd-toc-item navbar-nav active">
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Data and reporting</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="gpt_data.html">Checking the assistant</a></li>
<li class="toctree-l1"><a class="reference internal" href="bern.html">Canton Bern</a></li>
<li class="toctree-l1"><a class="reference internal" href="vaud.html">Canton Vaud</a></li>
<li class="toctree-l1"><a class="reference internal" href="display_reports.html">Use cases</a></li>
<li class="toctree-l1"><a class="reference internal" href="project.html">Project proposal</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Methods and classes</span></p>
<ul class="current nav bd-sidenav">
Expand Down Expand Up @@ -716,12 +716,12 @@ <h3>Material report<a class="headerlink" href="#material-report" title="Permalin
<div class="footer-article-item"><!-- Previous / next buttons -->
<div class="prev-next-area">
<a class="left-prev"
href="display_reports.html"
href="project.html"
title="previous page">
<i class="fa-solid fa-angle-left"></i>
<div class="prev-next-info">
<p class="prev-next-subtitle">previous</p>
<p class="prev-next-title">Use cases</p>
<p class="prev-next-title">Project proposal</p>
</div>
</a>
<a class="right-next"
Expand Down
Loading

0 comments on commit 719448c

Please sign in to comment.