# -*- coding: utf-8 -*-

# This is a report using the data from IQAASL.
# IQAASL was a project funded by the Swiss Confederation
# It produces a summary of litter survey results for a defined region.
# These charts serve as the models for the development of plagespropres.ch
# Data is gathered by volunteers.
# Please remember all copyrights apply, please give credit when applicable
# The repo is maintained by the community effective January 01, 2022
# There is ample opportunity to contribute, learn and teach
# contact dev@hammerdirt.ch

# Dies ist ein Bericht, der die Daten von IQAASL verwendet.
# IQAASL war ein von der Schweizerischen Eidgenossenschaft finanziertes Projekt.
# Es erstellt eine Zusammenfassung der Ergebnisse der Littering-Umfrage für eine bestimmte Region.
# Diese Grafiken dienten als Vorlage für die Entwicklung von plagespropres.ch.
# Die Daten werden von Freiwilligen gesammelt.
# Bitte denken Sie daran, dass alle Copyrights gelten, bitte geben Sie den Namen an, wenn zutreffend.
# Das Repo wird ab dem 01. Januar 2022 von der Community gepflegt.
# Es gibt reichlich Gelegenheit, etwas beizutragen, zu lernen und zu lehren.
# Kontakt dev@hammerdirt.ch

# Il s'agit d'un rapport utilisant les données de IQAASL.
# IQAASL était un projet financé par la Confédération suisse.
# Il produit un résumé des résultats de l'enquête sur les déchets sauvages pour une région définie.
# Ces tableaux ont servi de modèles pour le développement de plagespropres.ch.
# Les données sont recueillies par des bénévoles.
# N'oubliez pas que tous les droits d'auteur s'appliquent, veuillez indiquer le crédit lorsque cela est possible.
# Le dépôt est maintenu par la communauté à partir du 1er janvier 2022.
# Il y a de nombreuses possibilités de contribuer, d'apprendre et d'enseigner.
# contact dev@hammerdirt.ch

# sys, file and nav packages:
import datetime as dt

# math packages:
import pandas as pd
import numpy as np
from scipy import stats
from statsmodels.distributions.empirical_distribution import ECDF

# charting:
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from matplotlib import ticker
from matplotlib import colors
from matplotlib.colors import LinearSegmentedColormap
from matplotlib.gridspec import GridSpec
import seaborn as sns

# home brew utitilties
import resources.sr_ut as sut
import resources.chart_kwargs as ck

# images and display
# from PIL import Image as PILImage
from IPython.display import Markdown as md
# from IPython.display import display

from myst_nb import glue

# set some parameters:
start_date = "2020-03-01"
end_date ="2021-05-31"
start_end = [start_date, end_date]
a_fail_rate = 50
unit_label = "p/100m"
a_color = "saddlebrown"

# colors for gradients and charts
cmap2 = ck.cmap2
colors_palette = ck.colors_palette

# colors for the individual survey areas
bassin_pallette = {"rhone":"dimgray", "aare":"salmon", "linth":"tan", "ticino":"steelblue", "reuss":"purple"}

# set the maps
bassin_map = "resources/maps/lakes_rivers_map.jpeg"

# define the feature level and components
this_level = "river_bassin"
comps = ["linth", "rhone", "aare", "ticino"]

# proper labels for charts and tables
comp_labels = {"linth":"Linth", "rhone":"Rhône", "aare":"Aare", "ticino":"Ticino", "reuss":"Reuss"}
top_name = ["All survey areas"]

# common aggregations
agg_pcs_quantity = {unit_label:"sum", "quantity":"sum"}
agg_pcs_median = {unit_label:"median", "quantity":"sum"}

# aggregation of dimensional data
agg_dims = {"total_w":"sum", "mac_plast_w":"sum", "area":"sum", "length":"sum"}

# columns needed
use_these_cols = ["loc_date" ,
                  "% buildings",
                  "% to trans", 
                  "% recreation",
                  "% ag",
                  "% woods",
                  "population",
                  this_level,
                  "water_name_slug",
                  "streets km",
                  "intersects",
                  "length",
                  "groupname",
                  "code"
                 ]

# get the data:
dfBeaches = pd.read_csv("resources/beaches_with_land_use_rates.csv")
dfCodes = pd.read_csv("resources/codes_with_group_names_2015.csv")
dfDims = pd.read_csv("resources/corrected_dims.csv")

# set the index of the beach data to location slug
dfBeaches.set_index("slug", inplace=True)

# make any adjustments to code definitions here:
dfCodes.set_index("code", inplace=True)

codes_to_change = [
    ["G74", "description", "Insulation foams"],
    ["G940", "description", "Foamed EVA for crafts and sports"],
    ["G96", "description", "Sanitary-pads/tampons, applicators"],
    ["G178", "description", "Metal bottle caps and lids"],
    ["G82", "description", "Expanded foams 2.5cm - 50cm"],
    ["G81", "description", "Expanded foams .5cm - 2.5cm"],
    ["G117", "description", "Expanded foams < 5mm"],
    ["G75", "description", "Plastic/foamed polystyrene 0 - 2.5cm"],
    ["G76", "description", "Plastic/foamed polystyrene 2.5cm - 50cm"],
    ["G24", "description", "Plastic lid rings"],
    ["G33", "description", "Lids for togo drinks plastic"],
    ["G3", "description", "Plastic bags, carier bags"],
    ["G204", "description", "Bricks, pipes not plastic"],
    ["G904", "description", "Plastic fireworks"],
    ["G211", "description", "Swabs, bandaging, medical"],
]

for x in codes_to_change:
    dfCodes = sut.shorten_the_value(x, dfCodes)

# the surveyor designated the object as aluminum instead of metal
dfCodes.loc["G708", "material"] = "Metal"

# make a map to the code descriptions
code_description_map = dfCodes.description

# make a map to the code materials
code_material_map = dfCodes.material

1. Lakes and rivers

Map of survey locations IQAASL March 2020 - May 2021.

_images/lakes_rivers_map.jpeg

Fig. 1.1

Figure 1.1: The survey locations were grouped by survey area for analysis. The size of the marker is set by the median survey total for that location.

1.1. Land use profile

The survey areas are grouped by river catchment systems, this report combines several catchment areas for analysis of regional trends:

  • Aare : Emme, Aare

  • Linth: Reuss, Linth, Limmat

  • Rhône: Rhône

  • Ticino: Ticino, Lago di Lugano, Laggo Maggiore

The land use profile is the percent of total area attributed to each land use category within a 1500m radius of each survey location.

  • % of land attributed to buildings

  • % of land attributed to agriculture

  • % of land attributed to forestry

  • % of land attributed to recreation

Streets are reported as the total number of kilometers of streets within the 1500m radius. Intersects are an ordinal ranking of the number of rivers/canals that intersect a lake within 1500m of the survey location.

The ratio of the number of samples completed at the different land use profiles is an indicator of the environmental and economic conditions that the samples were taken in.

For more information Land use profiles

Distribution of land use characteristics

# this is the data before the expanded fragmented plastics and foams are aggregated to Gfrags and Gfoams
before_agg = pd.read_csv("resources/checked_before_agg_sdata_eos_2020_21.csv")
before_agg["loc_date"] = list(zip(before_agg.location, before_agg["date"]))

# this is the aggregated survey data that is being used
fd = pd.read_csv(F"resources/checked_sdata_eos_2020_21.csv")
fd["loc_date"] = list(zip(fd.location, fd["date"]))

fd.rename(columns={"% to agg":"% ag", "% to recreation": "% recreation", "% to woods":"% woods", "% to buildings":"% buildings"}, inplace=True)

# explanatory variables
luse_exp = ["% buildings", "% recreation", "% ag", "% woods", "streets km", "intersects"]

# cumulative statistics for each code
code_totals = sut.the_aggregated_object_values(fd, agg=agg_pcs_median, description_map=code_description_map, material_map=code_material_map)    

dt_nw = fd.groupby(use_these_cols[:-2], as_index=False).agg({unit_label:"sum"})

sns.set_style("whitegrid")

fig, axs = plt.subplots(2, 3, figsize=(9,9), sharey="row")

for i, n in enumerate(luse_exp):
    # get the dist for each survey area here
    r = i%2
    c = i%3
    ax=axs[r,c]
    for element in comps:
        the_data = ECDF(dt_nw[dt_nw[this_level] == element][n].values)
        sns.lineplot(x=the_data.x, y=the_data.y, ax=ax, label=comp_labels[element], color=bassin_pallette[element])
    
    # get the dist for all here
    a_all_surveys =  ECDF(dt_nw[n].values)
    sns.lineplot(x=a_all_surveys.x, y=a_all_surveys.y, ax=ax, label="All surveys", color="magenta", linewidth=2.5)
 
    # get the median from the data
    the_median = np.median(dt_nw[n].values)
    
    # plot the median and drop horzontal and vertical lines
    ax.scatter([the_median], 0.5, color="red",s=50, linewidth=2, zorder=100, label="the median")
    ax.vlines(x=the_median, ymin=0, ymax=0.5, color="red", linewidth=2)
    ax.hlines(xmax=the_median, xmin=0, y=0.5, color="red", linewidth=2)
    
    # format the % of total on the xaxis:
    if i <= 3:
        if c == 0:            
            ax.set_ylabel("Ratio of samples", **ck.xlab_k)
        ax.xaxis.set_major_formatter(ticker.PercentFormatter(1.0, 0, "%"))        
    else:
        pass
    
    ax.set_xlabel(n, **ck.xlab_k)
    handles, labels = ax.get_legend_handles_labels()
    ax.get_legend().remove()
    ax.set_title(F"median: {(round(the_median, 2))}",fontsize=12, loc="left")

plt.tight_layout()
plt.subplots_adjust(top=.88, hspace=.35)
plt.suptitle("Land use within 1500m of the survey location", ha="center", y=1, fontsize=16)
fig.legend(handles, labels, bbox_to_anchor=(.53,.94), loc="center", ncol=6)

glue("eosluse", fig, display=False)
plt.close()
_images/lakes_rivers_6_0.png

Fig. 1.2

Figure 1.2: The survey locations in the Rhône and Linth survey areas had the greatest median amount of land attributed to buildings at 47% and 40% and the least amount attributed to woods at 5% and 8% respectively. The Aare survey area had the lowest median amount of land attributed to buildings at 16% and the greatest amount of land attributed to agriculture at 30%. The land attributed to recreation represents sports fields, public beaches and other public gathering places.

1.2. Cumulative totals by survey area

# aggregate the dimensional data
dims_parameters = dict(this_level=this_level, 
                       locations=fd.location.unique(), 
                       start_end=start_end, 
                       agg_dims=agg_dims)

dims_table = sut.gather_dimensional_data(dfDims, **dims_parameters)

dt_all = fd.groupby(["loc_date","location",this_level, "city","date"], as_index=False).agg({unit_label:"sum", "quantity":"sum"})

for name in dims_table.index:
    dims_table.loc[name, "samples"] = fd[fd[this_level] == name].loc_date.nunique()
    dims_table.loc[name, "quantity"] =fd[fd[this_level] == name].quantity.sum()

# add proper names for display
dims_table["Survey area"] = dims_table.index.map(lambda x: comp_labels[x])
dims_table.set_index("Survey area", inplace=True)
   
# get the sum of all survey areas
dims_table.loc["All survey areas"]= dims_table.sum(numeric_only=True, axis=0)

# for display
dims_table.sort_values(by=["quantity"], ascending=False, inplace=True)
dims_table.rename(columns={"samples":"samples","quantity":"items", "total_w":"total kg", "mac_plast_w":"plastic kg", "area":"m²", "length":"meters"}, inplace=True)

# format kilos and text strings
dims_table["plastic kg"] = dims_table["plastic kg"]/1000
dims_table[["m²", "meters", "samples", "items"]] = dims_table[["m²", "meters", "samples", "items"]].applymap(lambda x: "{:,}".format(int(x)))
dims_table[["plastic kg", "total kg"]] = dims_table[["plastic kg", "total kg"]].applymap(lambda x: "{:.2f}".format(x))

# make table
data = dims_table.reset_index()

fig, axs = plt.subplots(figsize=(len(data.columns)*1.5,len(data)*.8))
sut.hide_spines_ticks_grids(axs)

table_one = sut.make_a_table(axs, data.values, colLabels=data.columns, colWidths=[.22, *[.13]*6],a_color=a_color)
table_one.get_celld()[(0,0)].get_text().set_text(" ")
table_one.set_fontsize(14)

plt.tight_layout()
glue("eos_summary_sarea", fig, display=False)
plt.close()
_images/lakes_rivers_9_0.png

Fig. 1.3

Figure 1.3: Dimensional result totals for all survey areas. The Aare survey area had the greatest number of samples and the least number of total objects collected.

1.3. Survey results all objects

Distribution of survey results. Values are presented as the number of pieces identified per 100 meters (p/100 m).

# the surveys to chart
dt_all["date"] = pd.to_datetime(dt_all["date"], format="%Y-%m-%d")
fd_n_samps = dt_all.loc_date.nunique()
fd_dindex = dt_all.set_index("date")

# monthly median survey total
monthly_plot = fd_dindex[unit_label].resample("M").median()

# scale the chart as needed to accomodate for extreme values
y_lim = 95
y_limit = np.percentile(dt_all[unit_label], y_lim)

# months locator, can be confusing
# https://matplotlib.org/stable/api/dates_api.html
months_loc = mdates.MonthLocator(interval=1)
months_fmt = mdates.DateFormatter("%b")
# days = mdates.DayLocator(interval=7)

fig, axs = plt.subplots(1,2, figsize=(10,5))

rate = "Monthly"

line_label = "monthly median"

ax = axs[0]
sns.scatterplot(data=fd_dindex, x="date", y=unit_label, hue=this_level, palette=bassin_pallette, alpha=0.8, ax=ax)

sns.lineplot(data=monthly_plot, x=monthly_plot.index, y=monthly_plot, color="magenta", label=line_label, ax=ax)

ax.set_ylim(0,y_limit)

ax.set_xlabel("")
ax.set_ylabel(unit_label, **ck.xlab_k14)

ax.xaxis.set_major_formatter(months_fmt)
ax.get_legend().remove()

axtwo = axs[1]
lake_dts = fd.groupby([this_level, "loc_date"], as_index=False)[unit_label].sum()

for i, a_name in enumerate(fd[this_level].unique()):
    label=comp_labels[a_name]
    
    a_ecdf = ECDF(lake_dts[lake_dts[this_level] == a_name][unit_label].values)
    
    sns.lineplot(x=a_ecdf.x, y=a_ecdf.y, color=bassin_pallette[a_name], ax=axtwo, label=label)

r_bassin = ECDF(dt_all[unit_label].values)

sns.lineplot(x=r_bassin.x, y=r_bassin.y, color="magenta", label=top_name[0], linewidth=2, ax=axtwo)

axtwo.set_xlabel(unit_label, **ck.xlab_k14)
axtwo.set_ylabel("Ratio of samples", **ck.xlab_k14)

plt.tight_layout()

glue("eosscatter", fig, display=False)
plt.close()
_images/lakes_rivers_12_0.png

Fig. 1.4

Figure 1.4: Left; All survey totals from 2020-03 through 2021-05 grouped by survey area and aggregated to the monthly median. Values greater than 2324.3p/100m are not shown. Right: The empirical cumulative distribution of the survey totals.

Summary data and material types

# get the basic statistics from pd.describe
cs = dt_all[unit_label].describe().round(2)

# add project totals
cs["total objects"] = dt_all.quantity.sum()

# change the names
csx = sut.change_series_index_labels(cs, sut.create_summary_table_index(unit_label, lang="EN"))

combined_summary = sut.fmt_combined_summary(csx, nf=[])

fd_mat_totals = sut.the_ratio_object_to_total(code_totals)
fd_mat_totals = sut.fmt_pct_of_total(fd_mat_totals)
fd_mat_totals = sut.make_string_format(fd_mat_totals)

# applly new column names for printing
cols_to_use = {"material":"Material","quantity":"Quantity", "% of total":"% of total"}
fd_mat_t = fd_mat_totals[cols_to_use.keys()].values

# make tables
fig, axs = plt.subplots(1,2, figsize=(8,6))

# summary table
# names for the table columns
a_col = ["All survey areas", "total"]

axone = axs[0]
sut.hide_spines_ticks_grids(axone)

table_two = sut.make_a_table(axone, combined_summary,  colLabels=a_col, colWidths=[.5,.25,.25],  bbox=[0,0,1,1], **{"loc":"lower center"})
table_two.get_celld()[(0,0)].get_text().set_text(" ")
table_two.set_fontsize(14)

# material table
axtwo = axs[1]
axtwo.set_xlabel(" ")
sut.hide_spines_ticks_grids(axtwo)

table_three = sut.make_a_table(axtwo, fd_mat_t,  colLabels=list(cols_to_use.values()), colWidths=[.4, .3,.3],  bbox=[0,0,1,1], **{"loc":"lower center"})
table_three.get_celld()[(0,0)].get_text().set_text(" ")
table_three.set_fontsize(14)

plt.tight_layout()
glue("summarymaterial", fig, display=False)
plt.close()
_images/lakes_rivers_15_0.png

Fig. 1.5

Figure 1.5: Left: Summary of survey totals for all survey areas. Right: Material type and percent of total for all survey areas.

1.4. The most common objects

The most common objects are the ten most abundant by quantity AND/OR objects identified in at least 50% of all surveys.

# the top ten by quantity
most_abundant = code_totals.sort_values(by="quantity", ascending=False)[:10]

# the most common
most_common = code_totals[code_totals["fail rate"] >= a_fail_rate ].sort_values(by="quantity", ascending=False)

# merge with most_common and drop duplicates
m_common = pd.concat([most_abundant, most_common]).drop_duplicates()

# get percent of total
m_common_percent_of_total = m_common.quantity.sum()/code_totals.quantity.sum()

# format values for table
m_common["item"] = m_common.index.map(lambda x: code_description_map.loc[x])
m_common["% of total"] = m_common["% of total"].map(lambda x: F"{x}%")
m_common["quantity"] = m_common.quantity.map(lambda x: "{:,}".format(x))
m_common["fail rate"] = m_common["fail rate"].map(lambda x: F"{x}%")
m_common[unit_label] = m_common[unit_label].map(lambda x: F"{np.ceil(x)}")

# final table data
cols_to_use = {"item":"Item","quantity":"quantity", "% of total":"% of total", "fail rate":"fail rate", unit_label:unit_label}
all_survey_areas = m_common[cols_to_use.keys()].values

fig, axs = plt.subplots(figsize=(9,len(m_common)*.6))

sut.hide_spines_ticks_grids(axs)

table_four = sut.make_a_table(axs, all_survey_areas,  colLabels=list(cols_to_use.values()), colWidths=[.52, .12,.12,.12, .12],  bbox=[0,0,1,1], **{"loc":"lower center"})
table_four.get_celld()[(0,0)].get_text().set_text(" ")
table_four.set_fontsize(14)

plt.tight_layout()
glue("mcommoneos", fig, display=False)
plt.close()
_images/lakes_rivers_18_0.png

Fig. 1.6

Figure 1.6: The most common objects for all survey areas. The fail rate is the number of times an object was identified with respect to the number of surveys. Combined, the most common objects represent 68% of total objects found.

Most common objects median p/100m by survey area

# aggregated survey totals for the most common codes for all the survey areas
# aggregate the code totals by survey and then get the median value per survey
m_common_st = fd[fd.code.isin(m_common.index)].groupby([this_level, "loc_date","code"], as_index=False).agg(agg_pcs_quantity)
m_common_ft = m_common_st.groupby([this_level, "code"], as_index=False)[unit_label].median()

# proper name of water feature for display
m_common_ft["f_name"] = m_common_ft[this_level].map(lambda x: comp_labels[x])

# map the desctiption to the code
m_common_ft["item"] = m_common_ft.code.map(lambda x: code_description_map.loc[x])

# pivot that
m_c_p = m_common_ft[["item", unit_label, "f_name"]].pivot(columns="f_name", index="item")

# quash the hierarchal column index
m_c_p.columns = m_c_p.columns.get_level_values(1)

# the aggregated totals of all the data
a_s_a = fd[fd.code.isin(m_common.index)].groupby(["water_name_slug", "loc_date", "code"], as_index=False).agg(agg_pcs_quantity)
a_s_a_cols = sut.aggregate_to_code(a_s_a, code_description_map,name=top_name[0])

ad_t_ten = pd.concat([m_c_p, a_s_a_cols], axis=1).sort_values(by=top_name[0], ascending=False)

# chart that
fig, ax  = plt.subplots(figsize=(len(ad_t_ten.columns)*.9,len(ad_t_ten)*.9))
axone = ax

sns.heatmap(ad_t_ten, ax=axone, cmap=cmap2, annot=True, annot_kws={"fontsize":12}, fmt=".1f", square=True, cbar=False, linewidth=.1, linecolor="white")

axone.set_xlabel("")
axone.set_ylabel("")
axone.tick_params(labelsize=14, which="both", axis="both")

plt.setp(axone.get_xticklabels(), rotation=90)

glue("mcommonpcs", fig, display=False)
plt.close()
_images/lakes_rivers_21_0.png

Fig. 1.7

Figure 1.7: The median p/100m of the most common objects for all survey areas. The rates at which the most common objects are identified are different for each survey area.

Most common objects monthly average

# collect the survey results of the most common objects
m_common_m = fd[(fd.code.isin(m_common.index))].groupby(["loc_date","date","code", "groupname"], as_index=False).agg(agg_pcs_quantity)
m_common_m["date"] = pd.to_datetime(m_common_m["date"], format="%Y-%m-%d")
m_common_m.set_index("date", inplace=True)


# set the order of the chart, group the codes by groupname columns
an_order = m_common_m.groupby(["code","groupname"], as_index=False).quantity.sum().sort_values(by="groupname")["code"].values

# a manager dict for the monthly results of each code
mgr = {}

# get the monhtly results for each code:
for a_group in an_order:
    # resample by month
    a_plot = m_common_m[(m_common_m.code==a_group)][unit_label].resample("M").mean().fillna(0)
    this_group = {a_group:a_plot}
    mgr.update(this_group)

months={
    0:"Jan",
    1:"Feb",
    2:"Mar",
    3:"Apr",
    4:"May",
    5:"Jun",
    6:"Jul",
    7:"Aug",
    8:"Sep",
    9:"Oct",
    10:"Nov",
    11:"Dec"
}

# convenience function to lable x axis
def new_month(x):
    if x <= 11:
        this_month = x
    else:
        this_month=x-12    
    return this_month

fig, ax = plt.subplots(figsize=(9,7))

# define a bottom
bottom = [0]*len(mgr["G27"])

# the monhtly survey average for all objects and locations
monthly_fd = dt_all.copy()
monthly_fd.set_index("date", inplace=True)
m_fd = monthly_fd[unit_label].resample("M").mean().fillna(0)

# define the xaxis
this_x = [i for i,x in  enumerate(m_fd.index)]

# plot the monthly total survey average
ax.bar(this_x, m_fd.to_numpy(), color=a_color, alpha=0.2, linewidth=1, edgecolor="teal", width=1, label="Monthly survey average") 

# plot the monthly survey average of the most common objects
for i, a_group in enumerate(an_order): 
    
    # define the axis
    this_x = [i for i,x in  enumerate(mgr[a_group].index)]
    
    # collect the month
    this_month = [x.month for i,x in enumerate(mgr[a_group].index)]
    
    # if i == 0 laydown the first bars
    if i == 0:
        ax.bar(this_x, mgr[a_group].to_numpy(), label=a_group, color=colors_palette[a_group], linewidth=1, alpha=0.6 ) 
    # else use the previous results to define the bottom
    else:
        bottom += mgr[an_order[i-1]].to_numpy()        
        ax.bar(this_x, mgr[a_group].to_numpy(), bottom=bottom, label=a_group, color=colors_palette[a_group], linewidth=1, alpha=0.8)
        
# collect the handles and labels from the legend
handles, labels = ax.get_legend_handles_labels()

# set the location of the x ticks
ax.xaxis.set_major_locator(ticker.FixedLocator([i for i in np.arange(len(this_x))]))
ax.set_ylabel(unit_label, **ck.xlab_k14)

# label the xticks by month
axisticks = ax.get_xticks()
labelsx = [months[new_month(x-1)] for x in  this_month]
plt.xticks(ticks=axisticks, labels=labelsx)

# make the legend
# swap out codes for descriptions
new_labels = [code_description_map.loc[x] for x in labels[1:]]
new_labels = new_labels[::-1]

# insert a label for the monthly average
new_labels.insert(0,"Monthly survey average")
handles = [handles[0], *handles[1:][::-1]]
    
ax.set_title("")    
plt.legend(handles=handles, labels=new_labels, bbox_to_anchor=(.5, -.05), loc="upper center",  ncol=2, fontsize=14)      
glue("monthlyeos", fig, display=False)
plt.close()
_images/lakes_rivers_24_0.png

Fig. 1.8

Figure 1.8: Monthly average survey result as p/100m of the most common objects for all survey areas.

1.5. Survey results and land use

The survey results with respect to land use at the national level are discussed in detail in The land use profile and Shared responsibility.

1.6. Utility of the objects found

The utility type is based on the utilization of the object prior to it being discarded or item description if the original use is undetermined. Identified objects are classified into one of the predefined categories. The categories are grouped according to utilization or item description.

  • wastewater: items released from water treatment plants includes items likely toilet flushed

  • micro plastics (< 5mm): fragmented plastics and pre-production plastic resins

  • infrastructure: items related to construction and maintenance of buildings, roads and water/power supplies

  • food and drink: all materials related to consuming food and drink

  • agriculture: primarily industrial sheeting i.e., mulch and row covers, greenhouses, soil fumigation, bale wraps. Includes hard plastics for agricultural fencing, flowerpots etc.

  • tobacco: primarily cigarette filters, includes all smoking related material

  • recreation: objects related to sports and leisure i.e., fishing, hunting, hiking etc.

  • packaging non food and drink: packaging material not identified as food, drink nor tobacco related

  • plastic fragments: plastic pieces of undetermined origin or use

  • personal items: accessories, hygiene and clothing related

See the annex for the complete list of objects identified, includes descriptions and group classification. The section Code groups describes each code group in detail and provides a comprehensive list of all objects in a group.

All survey areas utility of objects found % of total by survey area. Fragmented objects with no clear identification remain classified by size:

# code groups aggregated by survey for each survey area
groups = ["loc_date","groupname"]
cg_t = fd.groupby([this_level,"loc_date", "groupname"], as_index=False).agg(agg_pcs_quantity)

# aggregate all that for each survey area
cg_t = cg_t.groupby([this_level, "groupname"], as_index=False).agg({unit_label:"median", "quantity":"sum", "loc_date":"nunique"})

# quantity per water survey area
cg_tq = cg_t.groupby(this_level).quantity.sum()

# assign survey area total to each record
for a_feature in cg_tq.index:
    cg_t.loc[cg_t[this_level] == a_feature, "f_total"] = cg_tq.loc[a_feature]

# get the percent of total for each group for each survey area
cg_t["pt"] = (cg_t.quantity/cg_t.f_total).round(2)

# pivot that
data_table = cg_t.pivot(columns=this_level, index="groupname", values="pt")

data_table[top_name[0]] = sut.aggregate_to_group_name(fd, unit_label=unit_label, column="groupname", name=top_name[0], val="pt")

data_table.rename(columns={x:comp_labels[x] for x in data_table.columns[:-1]}, inplace=True)

fig, ax = plt.subplots(figsize=(10,10))

axone = ax
sns.heatmap(data_table , ax=axone, cmap=cmap2, annot=True, annot_kws={"fontsize":12}, cbar=False, fmt=".0%", linewidth=.1, square=True, linecolor="white")

axone.set_xlabel("")
axone.set_ylabel("")
axone.tick_params(labelsize=14, which="both", axis="both", labeltop=False, labelbottom=True)

plt.setp(axone.get_xticklabels(), rotation=90, fontsize=14)
plt.setp(axone.get_yticklabels(), rotation=0, fontsize=14)
glue("utility", fig, display=False)

plt.close()
_images/lakes_rivers_29_0.png

Fig. 1.9

Figure 1.9: The utility of objects as a % of total for all the survey areas.

# median p/50m solve cg_t for unit_label
data_table = cg_t.pivot(columns=this_level, index="groupname", values=unit_label)

# column for all the data
a = fd.groupby(["groupname", "loc_date"], as_index=False)[unit_label].sum()
a[top_name[0]] = a[unit_label]
a = a.groupby("groupname")[top_name[0]].median()

# stick that together
data = pd.concat([data_table, a], axis=1)

# format for display
data.rename(columns={x:comp_labels[x] for x in data.columns[:-1]}, inplace=True)

fig, ax = plt.subplots(figsize=(10,10))

axone = ax
sns.heatmap(data , ax=axone, cmap=cmap2, annot=True, annot_kws={"fontsize":12}, fmt="g", cbar=False, linewidth=.1, square=True, linecolor="white")

axone.set_xlabel("")
axone.set_ylabel("")
axone.tick_params(labelsize=14, which="both", axis="both", labeltop=False, labelbottom=True)

plt.setp(axone.get_xticklabels(), rotation=90, fontsize=14)
plt.setp(axone.get_yticklabels(), rotation=0, fontsize=14)

glue("utility2", fig, display=False)

plt.close()
_images/lakes_rivers_32_0.png

Fig. 1.10

Figure 1.10: The Rhône survey area has the highest median values for the most common objects. However, as a percentage of total, abundant items related to tobacco, food and drink are less than infrastructure related objects.

1.7. Rivers

rivers = fd[fd.w_t == "r"].copy()
r_smps = rivers.groupby(["loc_date", "date", "location", "water_name_slug"], as_index=False).agg(agg_pcs_quantity)
l_smps = fd[fd.w_t == "l"].groupby(["loc_date","date","location", "water_name_slug"], as_index=False).agg(agg_pcs_quantity)

cs = r_smps[unit_label].describe().round(2)

# add project totals
cs["total objects"] = r_smps.quantity.sum()

# change the names
csx = sut.change_series_index_labels(cs, sut.create_summary_table_index(unit_label, lang="EN"))

combined_summary = sut.fmt_combined_summary(csx, nf=[])

# make the charts
fig = plt.figure(figsize=(11,6))

aspec = fig.add_gridspec(ncols=11, nrows=3)

ax = fig.add_subplot(aspec[:, :6])

line_label = F"{rate} median:{top_name[0]}"

sns.scatterplot(data=l_smps, x="date", y=unit_label, color="black", alpha=0.4, label="Lake surveys", ax=ax)
sns.scatterplot(data=r_smps, x="date", y=unit_label, color="red", s=34, ec="white",label="River surveys", ax=ax)

ax.set_ylim(-10,y_limit)

ax.set_xlabel("")
ax.set_ylabel(unit_label, **ck.xlab_k14)

ax.xaxis.set_major_locator(months_loc)
ax.xaxis.set_major_formatter(months_fmt)

a_col = [top_name[0], "total"]

axone = fig.add_subplot(aspec[:, 7:])
sut.hide_spines_ticks_grids(axone)

table_five = sut.make_a_table(axone, combined_summary,  colLabels=a_col, colWidths=[.5,.25,.25],  bbox=[0,0,1,1], **{"loc":"lower center"})
table_five.get_celld()[(0,0)].get_text().set_text(" ")
table_five.set_fontsize(14)

glue("rivers", fig, display=False)

plt.close()
_images/lakes_rivers_35_0.png

Fig. 1.11

Figure 1.11: Left: All survey areas river survey totals, 2020-03 through 2021-05, n=55. Values greater than 2324.3p/100m 98% not shown. Right: Summary data.

Most common objects

# the most common items rivers
r_codes = rivers.groupby("code").agg({"quantity":"sum", "fail":"sum", unit_label:"median"})
r_codes["fail rate"] = (r_codes.fail/r_smps.loc_date.nunique()*100).round(2)

# top ten
r_byq = r_codes.sort_values(by="quantity", ascending=False)[:10]

# most common
r_byfail = r_codes[r_codes["fail rate"] >= a_fail_rate]
r_common = list(set(r_byq) | set(r_byfail))

r_mc = pd.concat([r_byfail, r_byq]).drop_duplicates()
# format for display
r_mc["item"] = r_mc.index.map(lambda x: code_description_map.loc[x])
r_mc.sort_values(by="quantity", ascending=False, inplace=True)

r_mc["% of total"]=((r_mc.quantity/r_codes.quantity.sum())*100).round(2)
r_mc["% of total"] = r_mc["% of total"].map(lambda x: F"{x}%")
r_mc["quantity"] = r_mc.quantity.map(lambda x: "{:,}".format(x))
r_mc["fail rate"] = r_mc["fail rate"].map(lambda x: F"{x}%")
r_mc[unit_label] = r_mc[unit_label].map(lambda x: F"{np.ceil(x)}")

cols_to_use = {"item":"Item","quantity":"Quantity"}
r_mc.rename(columns=cols_to_use, inplace=True)

data=r_mc[["Item","Quantity", "% of total", "fail rate", unit_label]]

fig, axs = plt.subplots(figsize=(11,len(data)*.6))

sut.hide_spines_ticks_grids(axs)

table_six = sut.make_a_table(axs, data.values,  colLabels=data.columns, colWidths=[.52, .12,.12,.12, .12],  bbox=[0,0,1,1], **{"loc":"lower center"})
table_six.get_celld()[(0,0)].get_text().set_text(" ")
table_six.set_fontsize(14)


plt.tight_layout()
glue("rivers2", fig, display=False)
plt.close()
_images/lakes_rivers_38_0.png

Fig. 1.12

Figure 1.12: The most common objects from river surveys. Diapers - wipes and plastic bags are not present in the most common objects when lakes are considered.

1.8. Annex

1.8.1. Fragmented foams and plastics by size group

These are the components of Gfoam and Gfrags, objects labled “Expanded foams” are grouped with Gfoam the rest are grouped under Gfrags.

All survey areas fragmented plastics and foamed plastics by size, median p/100m, number of pieces, and percent of total.

# collect the data before aggregating foams for all locations in the survye area
# group by loc_date and code
# Combine the different sizes of fragmented plastics and styrofoam
# the codes for the foams
some_foams = ["G81", "G82", "G83", "G74"]

# the codes for the fragmented plastics
some_frag_plas = list(before_agg[before_agg.groupname == "plastic pieces"].code.unique())

fd_frags_foams = before_agg[(before_agg.code.isin([*some_frag_plas, *some_foams]))&(before_agg.location.isin(fd.location.unique()))].groupby(["loc_date","code"], as_index=False).agg(agg_pcs_quantity)
fd_frags_foams = fd_frags_foams.groupby("code").agg({unit_label:"median", "quantity":"sum"})

# add code description and format for printing
fd_frags_foams["item"] = fd_frags_foams.index.map(lambda x: code_description_map.loc[x])
fd_frags_foams["% of total"] = (fd_frags_foams.quantity/fd.quantity.sum()*100).round(2)
fd_frags_foams["% of total"] = fd_frags_foams["% of total"].map(lambda x: F"{x}%")
fd_frags_foams["quantity"] = fd_frags_foams["quantity"].map(lambda x: F"{x:,}")

# table data
data = fd_frags_foams[["item",unit_label, "quantity", "% of total"]]

fig, axs = plt.subplots(figsize=(len(data.columns)*2.1,len(data)*.6))
sut.hide_spines_ticks_grids(axs)

table_seven = sut.make_a_table(axs, data.values,  colLabels=data.columns, colWidths=[.6, .13, .13, .13],a_color=a_color)
table_seven.get_celld()[(0,0)].get_text().set_text(" ")
table_seven.set_fontsize(14)

plt.tight_layout()
plt.show()
_images/lakes_rivers_42_0.png

1.8.2. Organizations:

  1. Precious Plastic Léman

  2. Association pour la Sauvegarde du Léman

  3. Geneva international School

  4. Solid waste engineering: École polytechnique fédéral Lausanne

  5. Summit foundation

  6. University of Raperswill

  7. Hackuarium

1.8.3. Municipalities, lakes and rivers with surveys

lakes = dfBeaches.loc[(dfBeaches.index.isin(fd.location.unique()))&(dfBeaches.water == "l")]["water_name"].unique()
rivers = dfBeaches.loc[(dfBeaches.index.isin(fd.location.unique()))&(dfBeaches.water == "r")]["water_name"].unique()

# gather the municpalities and the population:
fd_pop_map = dfBeaches.loc[fd.location.unique()][["city","population"]].copy()
fd_pop_map.drop_duplicates(inplace=True)
fd_pop_map.set_index("city", drop=True, inplace=True)
munis_joined = ", ".join(sorted(fd_pop_map.index))

muni_string = F"""**The municipalities in this report:**\n\n >{munis_joined}
"""
md(muni_string)

The municipalities in this report:

Aarau, Allaman, Ascona, Beatenberg, Bellinzona, Bern, Biel/Bienne, Boudry, Bourg-en-Lavaux, Brienz (BE), Brissago, Brugg, Brügg, Burgdorf, Bönigen, Cheyres-Châbles, Cudrefin, Dietikon, Erlach, Estavayer, Freienbach, Gals, Gambarogno, Gebenstorf, Genève, Gland, Glarus Nord, Grandson, Hauterive (NE), Hünenberg, Kallnach, Köniz, Küsnacht (ZH), La Tour-de-Peilz, Lausanne, Lavey-Morcles, Le Landeron, Leuk, Ligerz, Locarno, Lugano, Luterbach, Lüscherz, Merenschwand, Minusio, Montreux, Neuchâtel, Nidau, Port, Préverenges, Quarten, Rapperswil-Jona, Richterswil, Riddes, Rubigen, Saint-Gingolph, Saint-Sulpice (VD), Salgesch, Schmerikon, Sion, Solothurn, Spiez, Stäfa, Thun, Tolochenaz, Unterengstringen, Unterseen, Versoix, Vevey, Vinelz, Walenstadt, Walperswil, Weesen, Weggis, Yverdon-les-Bains, Zug, Zürich

lakes_joined = ", ".join(sorted(lakes))

lake_string = F"""**The lakes in this report:**\n\n >{lakes_joined}
"""
md(lake_string)

The lakes in this report:

Bielersee, Brienzersee, Lac Léman, Lago Maggiore, Lago di Lugano, Neuenburgersee, Quatre Cantons, Thunersee, Walensee, Zugersee, Zurichsee

The rivers in this report:

Aare, Aare|Nidau-Büren-Kanal, Cassarate, Dorfbach, Emme, Escherkanal, Jona, La Thièle, Limmat, Linthkanal, Maggia, Reuss, Rhône, Schüss, Seez, Sihl, Ticino

# summary statistics:
# number of samples
fd_n_samps = len(dt_all)
# quantity
fd_n_obj = fd.quantity.sum()
# number of locations
fd_n_locs = fd.location.nunique()
# number of cities
fd_n_munis = len(fd_pop_map.index)
# populations
fd_effected_population = fd_pop_map.sum()
# list of locations
fd_locs = fd.location.unique()
# list of survey keys
fd_samps = fd.loc_date.unique()

obj_string = "{:,}".format(fd_n_obj)
surv_string = "{:,}".format(fd_n_samps)
pop_string = "{:,}".format(int(fd_effected_population[0]))

date_quantity_context = F"For the period between {start_date[:-3]} and {end_date[:-3]}, {obj_string } objects were removed and identified in the course of {surv_string} surveys."
geo_context = F"Those surveys were conducted at {fd_n_locs} different locations."
admin_context = F"There are {fd_n_munis} different municipalities represented in these results with a combined population of approximately {pop_string}."
md(F"{date_quantity_context} {geo_context } {admin_context}")

For the period between 2020-03 and 2021-05, 54,744 objects were removed and identified in the course of 386 surveys. Those surveys were conducted at 143 different locations. There are 77 different municipalities represented in these results with a combined population of approximately 1,735,991.

The survey locations

# display the survey locations
pd.set_option("display.max_rows", None)

disp_columns = ["latitude", "longitude", "city"]
disp_beaches = dfBeaches.loc[fd_locs][disp_columns]
disp_beaches.reset_index(inplace=True)
disp_beaches.rename(columns={"slug":"location"}, inplace=True)
disp_beaches.set_index("location", inplace=True, drop=True)

disp_beaches
latitude longitude city
location
maladaire 46.446296 6.876960 La Tour-de-Peilz
preverenges 46.512690 6.527657 Préverenges
caprino 45.987963 8.986241 Lugano
foce-del-cassarate 46.002411 8.961477 Lugano
lido 46.002004 8.962156 Lugano
lugano-centro 46.002627 8.950724 Lugano
spiaggia-parco-ciani 46.002510 8.960820 Lugano
via-brunari-spiaggia 46.202350 9.016910 Bellinzona
golene-gudo 46.170655 8.946657 Bellinzona
isole-di-brissago-porto 46.132760 8.735030 Brissago
magadino-lido 46.149349 8.855663 Gambarogno
rivapiana 46.172079 8.813255 Minusio
via-mirasole-spiaggia 46.199530 9.014930 Bellinzona
aare-port 47.116170 7.269550 Port
limmat_dietikon_keiserp 47.407989 8.409540 Dietikon
schutzenmatte 47.057666 7.634001 Burgdorf
zugerseecholler_cham_blarerm 47.178216 8.480013 Zug
la-petite-plage 46.785054 6.656877 Yverdon-les-Bains
vidy-ruines 46.516221 6.596279 Lausanne
baby-plage-geneva 46.208558 6.162923 Genève
grand-clos 46.387746 6.843686 Saint-Gingolph
weissenau-neuhaus 46.676583 7.817528 Unterseen
evole-plage 46.989477 6.923920 Neuchâtel
oberi-chlihochstetten 46.896025 7.532114 Rubigen
plage-de-serriere 46.984850 6.913450 Neuchâtel
vierwaldstattersee_weggis_schoberls_1 47.044532 8.418569 Weggis
vierwaldstattersee_weggis_schoberls_2 47.043953 8.417308 Weggis
vierwaldstattersee_weggis_schoberls_3 47.029957 8.410801 Weggis
mullermatte 47.133339 7.227907 Biel/Bienne
limmat_unterengstringen_oggierbuhrer 47.409400 8.446933 Unterengstringen
limmat_zuerich_wagnerc 47.403496 8.477770 Zürich
limmat_zurich_mortensena_meiera 47.400252 8.485411 Zürich
quai-maria-belgia 46.460156 6.836718 Vevey
sihl_zuerich_eggerskoehlingera 47.381898 8.538328 Zürich
bielersee_vinelz_fankhausers 47.038398 7.108311 Vinelz
erlach-camping-strand 47.047159 7.097854 Erlach
anarchy-beach 46.447216 6.859612 La Tour-de-Peilz
gasi-strand 47.128442 9.110831 Weesen
rastplatz-stampf 47.215177 8.844286 Rapperswil-Jona
zuerichsee_richterswil_benkoem_2 47.217646 8.698713 Richterswil
sentiero-giro-del-golf-spiaggia 46.145770 8.790430 Ascona
vira-gambarogno 46.143343 8.838759 Gambarogno
canale-saleggi 46.200625 9.015853 Bellinzona
gummligrabbe 46.989290 7.250730 Kallnach
mannewil 46.996382 7.239024 Kallnach
lavey-les-bains-2 46.207726 7.011685 Lavey-Morcles
schusspark-strand 47.146500 7.268620 Biel/Bienne
walensee_walenstadt_wysse 47.121828 9.299552 Walenstadt
pfafikon-bad 47.206766 8.774182 Freienbach
zurichsee_kusnachterhorn_thirkell-whitej 47.317685 8.576860 Küsnacht (ZH)
plage-de-cheyres 46.818689 6.782256 Cheyres-Châbles
leuk-mattenstrasse 46.314754 7.622521 Leuk
thun-strandbad 46.739939 7.633520 Thun
zurichsee_wollishofen_langendorfm 47.345890 8.536155 Zürich
pont-sous-terre 46.202960 6.131577 Genève
oben-am-see 46.744451 8.049921 Brienz (BE)
thunersee_spiez_meierd_1 46.704437 7.657882 Spiez
cully-plage 46.488887 6.741396 Bourg-en-Lavaux
preverenges-le-sout 46.508905 6.534526 Préverenges
la-pecherie 46.463919 6.385732 Allaman
villa-barton 46.222350 6.152500 Genève
untertenzen 47.115260 9.254780 Quarten
zurcher-strand 47.364200 8.537420 Zürich
oyonne 46.456682 6.852262 La Tour-de-Peilz
lavey-la-source 46.200804 7.021866 Lavey-Morcles
lavey-les-bains 46.205159 7.012722 Lavey-Morcles
spackmatt 47.223749 7.576711 Luterbach
luscherz-plage 47.047955 7.151242 Lüscherz
strandboden-biel 47.132510 7.233142 Biel/Bienne
jona-river-rastplatz 47.216100 8.844430 Rapperswil-Jona
reuss_hunenberg_eberhardy 47.232976 8.401012 Hünenberg
reuss_ottenbach_schoenenbergerl 47.278354 8.394224 Merenschwand
zuerichsee_staefa_hennm 47.234643 8.769881 Stäfa
signalpain 46.786200 6.647360 Yverdon-les-Bains
baby-plage-ii-geneve 46.208940 6.164330 Genève
pointe-dareuse 46.946190 6.870970 Boudry
les-glariers 46.176736 7.228925 Riddes
nidau-strand 47.127196 7.232613 Nidau
tiger-duck-beach 46.518256 6.582546 Saint-Sulpice (VD)
linthdammweg 47.131790 9.091910 Weesen
mols-rocks 47.114343 9.288174 Quarten
seeflechsen 47.130223 9.103400 Glarus Nord
seemuhlestrasse-strand 47.128640 9.295100 Walenstadt
muhlehorn-dorf 47.118448 9.172124 Glarus Nord
zuerichsee_waedenswil_colomboc_1 47.219547 8.691961 Richterswil
camp-des-peches 47.052812 7.074053 Le Landeron
delta-park 46.720078 7.635304 Spiez
le-pierrier 46.439727 6.888968 Montreux
pecos-plage 46.803590 6.636650 Grandson
beich 47.048495 7.200528 Walperswil
aare_suhrespitz_badert 47.405669 8.066018 Aarau
tschilljus 46.304399 7.580262 Salgesch
sundbach-strand 46.684386 7.794768 Beatenberg
wycheley 46.740370 8.048640 Brienz (BE)
aare_koniz_hoppej 46.934588 7.458170 Köniz
camping-gwatt-strand 46.727140 7.629620 Thun
bern-tiergarten 46.933157 7.452004 Bern
boiron 46.491030 6.480162 Tolochenaz
rocky-plage 46.209737 6.164952 Genève
lacleman_gland_lecoanets 46.402811 6.281959 Gland
route-13 46.162521 8.782579 Locarno
murg-bad 47.115307 9.215691 Quarten
schmerikon-bahnhof-strand 47.224780 8.944180 Schmerikon
aabach 47.220989 8.940365 Schmerikon
la-thiele_le-mujon_confluence 46.775340 6.630900 Yverdon-les-Bains
nouvelle-plage 46.856646 6.848428 Estavayer
baye-de-montreux-g 46.430834 6.908778 Montreux
les-vieux-ronquoz 46.222049 7.361664 Sion
sihl_zuerich_eichenbergerd 47.339588 8.516697 Zürich
versoix 46.289194 6.170569 Versoix
augustmutzenbergstrandweg 46.686640 7.689760 Spiez
parc-des-pierrettes 46.515215 6.575531 Saint-Sulpice (VD)
plage-de-st-sulpice 46.513265 6.570977 Saint-Sulpice (VD)
aare_bern_gerberm 46.989363 7.452098 Bern
brugg-be-buren-bsg-standort 47.122220 7.281410 Brügg
kusnachter-dorfbach-tobelweg-1-4 47.317770 8.588258 Küsnacht (ZH)
ruisseau-de-la-croix-plage 46.813920 6.774700 Cheyres-Châbles
ligerz-strand 47.083979 7.135894 Ligerz
hafeli 46.690283 7.898592 Bönigen
aare-solothurn-lido-strand 47.196949 7.521643 Solothurn
bern-fahrstrasse 46.975866 7.444210 Bern
gals-reserve 47.046272 7.085007 Gals
ascona-traghetto-spiaggia 46.153882 8.768480 Ascona
pacha-mama-gerra 46.123473 8.783508 Gambarogno
gerra-gambarogno 46.123366 8.785786 Gambarogno
san-nazzaro-gambarogno 46.130443 8.798657 Gambarogno
hauterive-petite-plage 47.010797 6.980304 Hauterive (NE)
flibach-river-right-bank 47.133742 9.105461 Weesen
aare-limmatspitz 47.501060 8.237371 Gebenstorf
aare_brugg_buchie 47.494855 8.236558 Brugg
linth_route9brucke 47.125730 9.117340 Glarus Nord
seez_spennwiesenbrucke 47.114948 9.310123 Walenstadt
bain-des-dames 46.450507 6.858092 La Tour-de-Peilz
luscherz-two 47.047519 7.152829 Lüscherz
impromptu_cudrefin 46.964496 7.027936 Cudrefin
vira-spiaggia-left-of-river 46.142900 8.838407 Gambarogno
linth_mollis 47.131370 9.094768 Glarus Nord
seez 47.119830 9.300251 Walenstadt
tolochenaz 46.497509 6.482875 Tolochenaz
limmat_zuerich_suterdglauserp 47.394539 8.513443 Zürich
aare_post 47.116665 7.271953 Port
aare_bern_scheurerk 46.970967 7.452586 Bern
strandbeiz 47.215862 8.843098 Rapperswil-Jona

The inventory

complete_inventory = code_totals[code_totals.quantity>0][["item", "groupname", "quantity", "% of total","fail rate"]]
complete_inventory.sort_values(by="quantity", ascending=False)
item groupname quantity % of total fail rate
code
G27 Cigarette filters tobacco 8485 15.50 87
Gfrags Fragmented plastics plastic pieces 7400 13.52 86
Gfoam Expanded polystyrene infrastructure 5563 10.16 68
G30 Food wrappers; candy, snacks food and drink 3325 6.07 85
G67 Industrial sheeting agriculture 2534 4.63 69
G200 Glass drink bottles, pieces food and drink 2136 3.90 65
G112 Industrial pellets (nurdles) micro plastics (< 5mm) 1968 3.59 30
G74 Insulation foams infrastructure 1702 3.11 53
G95 Cotton bud/swab sticks waste water 1406 2.57 50
G117 Expanded foams < 5mm micro plastics (< 5mm) 1209 2.21 25
G89 Plastic construction waste infrastructure 992 1.81 52
G941 Packaging films nonfood or unknown packaging non food 894 1.63 38
G178 Metal bottle caps and lids food and drink 700 1.28 52
G25 Tobacco; plastic packaging, containers tobacco 649 1.19 46
G21 Drink lids food and drink 623 1.14 37
G106 Plastic fragments angular <5mm micro plastics (< 5mm) 592 1.08 20
G98 Diapers - wipes waste water 588 1.07 26
G24 Plastic lid rings food and drink 541 0.99 42
G177 Foil wrappers, aluminum foil food and drink 521 0.95 47
G10 Food containers single use foamed or plastic food and drink 448 0.82 31
G23 Lids unidentified packaging non food 423 0.77 35
G156 Paper fragments packaging non food 420 0.77 32
G35 Straws and stirrers food and drink 419 0.77 42
G70 Shotgun cartridges recreation 391 0.71 21
G31 Lollypop sticks food and drink 381 0.70 37
G73 Foamed items & pieces (non packaging/insulatio... recreation 335 0.61 23
G33 Lids for togo drinks plastic food and drink 328 0.60 34
G32 Toys and party favors recreation 320 0.58 38
G904 Plastic fireworks recreation 301 0.55 28
G3 Plastic bags, carier bags packaging non food 285 0.52 18
G22 Lids for chemicals, detergents (non-food) infrastructure 257 0.47 19
G211 Swabs, bandaging, medical personal items 256 0.47 31
G922 Labels, bar codes packaging non food 252 0.46 27
G66 Straps/bands; hard, plastic package fastener infrastructure 248 0.45 32
G100 Medical; containers/tubes/ packaging waste water 244 0.45 28
G923 Tissue, toilet paper, napkins, paper towels personal items 241 0.44 25
G103 Plastic fragments rounded <5mm micro plastics (< 5mm) 238 0.43 3
G921 Ceramic tile and pieces infrastructure 231 0.42 13
G96 Sanitary-pads/tampons, applicators waste water 215 0.39 18
G50 String < 1cm recreation 205 0.37 29
G153 Cups, food containers, wrappers (paper) food and drink 201 0.37 19
G125 Balloons and balloon sticks recreation 170 0.31 20
G91 Biomass holder waste water 162 0.30 19
G159 Corks food and drink 162 0.30 21
G38 Coverings; plastic packaging, sheeting for pro... unclassified 160 0.29 4
G940 Foamed EVA for crafts and sports recreation 158 0.29 7
G208 Glass or ceramic fragments > 2.5 cm unclassified 145 0.26 10
G186 Industrial scrap infrastructure 141 0.26 15
G213 Paraffin wax recreation 138 0.25 13
G165 Ice cream sticks, toothpicks, chopsticks food and drink 126 0.23 15
G204 Bricks, pipes not plastic infrastructure 125 0.23 9
G155 Fireworks paper tubes and fragments recreation 124 0.23 6
G93 Cable ties; steggel, zip, zap straps infrastructure 121 0.22 16
G149 Paper packaging packaging non food 121 0.22 8
G152 Cigarette boxes, tobacco related paper/cardboard tobacco 120 0.22 13
G90 Plastic flower pots agriculture 119 0.22 14
G137 Clothing, towels & rags personal items 118 0.22 13
G908 Tape; electrical, insulating infrastructure 117 0.21 15
G203 Tableware ceramic or glass, cups, plates, pieces food and drink 115 0.21 11
G936 Sheeting ag. greenhouse film agriculture 110 0.20 12
G34 Cutlery, plates and trays food and drink 109 0.20 16
G905 Hair clip, hair ties, personal accessories pl... personal items 105 0.19 18
G198 Other metal pieces < 50cm infrastructure 104 0.19 16
G914 Paperclips, clothespins, plastic utility items personal items 99 0.18 12
G131 Rubber bands personal items 94 0.17 16
G191 Wire and mesh agriculture 90 0.16 12
G28 Pens, lids, mechanical pencils etc. personal items 88 0.16 13
G115 Foamed plastic <5mm micro plastics (< 5mm) 88 0.16 4
G124 Other plastic or foam products unclassified 87 0.16 8
G87 Tape, masking/duct/packing infrastructure 87 0.16 14
G148 Cardboard (boxes and fragments) packaging non food 85 0.16 8
G928 Ribbons and bows personal items 84 0.15 8
G26 Cigarette lighters tobacco 83 0.15 14
G146 Paper, cardboard packaging non food 82 0.15 6
G175 Cans, beverage food and drink 76 0.14 11
G157 Paper packaging non food 66 0.12 6
G7 Drink bottles < = 0.5L food and drink 65 0.12 9
G4 Small plastic bags; freezer, zip-lock etc. packaging non food 64 0.12 8
G142 Rope , string or nets recreation 62 0.11 10
G135 Clothes, footware, headware, gloves personal items 61 0.11 9
G105 Plastic fragments subangular <5mm micro plastics (< 5mm) 59 0.11 2
G927 String trimmer line, used to cut grass, weeds,... infrastructure 57 0.10 8
G201 Jars, includes pieces food and drink 55 0.10 7
G942 Plastic shavings from lathes, CNC machining unclassified 53 0.10 8
G194 Cables, metal wire(s) often inside rubber or p... infrastructure 52 0.09 10
G939 Flowers, plants plastic personal items 49 0.09 6
G20 Caps and lids packaging non food 48 0.09 6
G65 Buckets agriculture 48 0.09 6
G943 Fencing agriculture, plastic agriculture 47 0.09 5
G144 Tampons waste water 46 0.08 3
G48 Rope, synthetic recreation 46 0.08 8
G134 Other rubber unclassified 45 0.08 8
G210 Other glass/ceramic unclassified 43 0.08 3
G170 Wood (processed) agriculture 43 0.08 6
G937 Pheromone baits for vineyards agriculture 38 0.07 4
G101 Dog feces bag personal items 37 0.07 8
G917 Terracotta balls unclassified 36 0.07 4
G59 Fishing line monofilament (angling) recreation 35 0.06 6
G944 Pellet mass from injection molding unclassified 34 0.06 0
G2 Bags packaging non food 32 0.06 4
G12 Cosmetics, non-beach use personal care containers personal items 31 0.06 5
G207 Octopus pots unclassified 30 0.05 0
G126 Balls recreation 30 0.05 5
G901 Mask medical, synthetic personal items 29 0.05 6
G918 Safety pins, paper clips, small metal utility ... personal items 28 0.05 5
G931 Tape-caution for barrier, police, construction... infrastructure 28 0.05 3
G99 Syringes - needles personal items 28 0.05 6
G919 Nails, screws, bolts etc. infrastructure 27 0.05 3
G158 Other paper items packaging non food 27 0.05 2
G167 Matches or fireworks recreation 26 0.05 2
G933 Bags, cases for accessories; glasses, electron... personal items 26 0.05 4
G6 Bottles and containers, plastic non food/drink packaging non food 25 0.05 2
G154 Newspapers or magazines personal items 25 0.05 2
G161 Processed timber agriculture 24 0.04 4
G182 Fishing; hooks, weights, lures, sinkers etc. recreation 23 0.04 3
G8 Drink bottles > 0.5L food and drink 23 0.04 3
G145 Other textiles personal items 22 0.04 4
G114 Films <5mm micro plastics (< 5mm) 22 0.04 1
G43 Tags fishing or industry (security tags, seals) recreation 21 0.04 2
G930 Foam earplugs personal items 20 0.04 4
G133 Condoms incl. packaging waste water 20 0.04 4
G68 Fiberglass fragments infrastructure 20 0.04 4
G929 Electronics and pieces; sensors, headsets etc. personal items 20 0.04 4
G176 Cans, food food and drink 19 0.03 3
G925 Packets: desiccant/ moisture absorbers, plasti... packaging non food 19 0.03 4
G938 Toothpicks, dental floss plastic food and drink 18 0.03 4
G926 Chewing gum, often contains plastics food and drink 18 0.03 3
G36 Bags/sacks heavy duty plastic for 25 Kg or mor... agriculture 18 0.03 2
G118 Small industrial spheres <5mm micro plastics (< 5mm) 17 0.03 2
G123 Polyurethane granules < 5mm micro plastics (< 5mm) 17 0.03 0
G11 Cosmetics for the beach, e.g. sunblock recreation 17 0.03 3
G64 Fenders unclassified 16 0.03 1
G119 Sheetlike user plastic (>1mm) micro plastics (< 5mm) 16 0.03 1
G49 Rope > 1cm recreation 14 0.03 2
G113 Filaments <5mm micro plastics (< 5mm) 14 0.03 1
G197 Other metal infrastructure 13 0.02 3
G199 Other metal pieces > 50cm infrastructure 13 0.02 1
G29 Combs, brushes and sunglasses personal items 13 0.02 3
G195 Batteries - household personal items 12 0.02 2
G128 Tires and belts unclassified 12 0.02 2
G916 Pencils and pieces personal items 12 0.02 2
G136 Shoes personal items 11 0.02 2
G37 Mesh bags personal items 11 0.02 2
G906 coffee capsules aluminum food and drink 10 0.02 1
G900 Gloves latex personal protective equipment personal items 10 0.02 2
G61 Other fishing related recreation 9 0.02 2
G913 Pacifier personal items 8 0.01 2
G104 Plastic fragments subrounded <5mm micro plastics (< 5mm) 7 0.01 1
G40 Gloves household/gardening personal items 7 0.01 1
G122 Plastic fragments ( >1mm) micro plastics (< 5mm) 7 0.01 0
G19 Car parts unclassified 7 0.01 1
G129 Inner tubes and rubber sheets unclassified 7 0.01 1
G17 Injection gun cartridge infrastructure 7 0.01 1
G141 Carpet unclassified 6 0.01 1
G5 Generic plastic bags packaging non food 6 0.01 1
G181 Tableware metal; cups, cutlery etc. food and drink 6 0.01 1
G171 Other wood < 50cm agriculture 6 0.01 1
G97 Toilet fresheners waste water 6 0.01 1
G915 Reflectors, plastic mobility items personal items 6 0.01 1
G151 Cartons, Tetrapacks food and drink 6 0.01 1
G147 Paper bags packaging non food 6 0.01 1
G107 Cylindrical pellets < 5mm micro plastics (< 5mm) 6 0.01 1
G903 Hand sanitizer containers & packets personal items 5 0.01 1
G92 Bait containers recreation 5 0.01 1
G71 Shoes sandals personal items 5 0.01 1
G138 Shoes and sandals personal items 5 0.01 1
G108 disk pellets <5mm micro plastics (< 5mm) 5 0.01 1
G172 Other wood > 50cm agriculture 4 0.01 1
G945 Razor blades personal items 4 0.01 1
G53 Nets and pieces < 50cm recreation 4 0.01 0
G52 Nets and pieces recreation 4 0.01 1
G907 coffee capsules plastic food and drink 4 0.01 1
G39 Gloves personal items 4 0.01 0
G111 Spheruloid pellets < 5mm micro plastics (< 5mm) 4 0.01 1
G62 Floats for nets unclassified 4 0.01 0
G13 Bottles, containers, drums to transport, store... agriculture 4 0.01 0
G202 Light bulbs unclassified 3 0.01 0
G174 Aerosol spray cans infrastructure 3 0.01 0
G41 Glove industrial/professional agriculture 3 0.01 0
G934 Sandbag, plastic for flood, erosion control etc.. agriculture 3 0.01 0
G143 Sails and canvas recreation 3 0.01 0
G63 Buoys recreation 3 0.01 0
G140 Bags, burlap, hessian, jute or hemp agriculture 3 0.01 0
G179 Disposable BBQs food and drink 3 0.01 0
G116 Granules <5mm micro plastics (< 5mm) 3 0.01 0
G109 Flat pellets <5mm micro plastics (< 5mm) 3 0.01 0
G14 Engine oil bottles unclassified 3 0.01 0
G139 Backpacks personal items 3 0.01 0
G902 Mask medical, cloth personal items 3 0.01 0
G102 Flip-flops personal items 3 0.01 0
G150 Milk cartons, tetrapack food and drink 3 0.01 0
G999 No objects found on this survey unclassified 2 0.00 0
G55 Fishing line (entangled) recreation 2 0.00 0
G935 Walking stick pads and pieces, often elastomer... personal items 2 0.00 0
G932 Bio-beads, micro plastic for wastewater treatm... waste water 2 0.00 0
G173 Other unclassified 2 0.00 0
G185 Middle size containers unclassified 2 0.00 0
G188 Other cans < 4 L infrastructure 2 0.00 0
G190 Paint cans infrastructure 2 0.00 0
G214 Oil/tar infrastructure 2 0.00 0
G132 Bobbers (fishing) recreation 2 0.00 0
G166 Paint brushes infrastructure 1 0.00 0
G94 Table cloth recreation 1 0.00 0
G84 CD or CD box personal items 1 0.00 0
G196 Large metallic objects unclassified 1 0.00 0
G9 Cleaner, chemical bottles & containers infrastructure 1 0.00 0
G183 Fish hook remains recreation 1 0.00 0
G60 Light sticks recreation 1 0.00 0
G51 Fishing net recreation 1 0.00 0
G193 car parts and batteries unclassified 1 0.00 0