Series collection
- from
- 2017=7,650
- to
- 2023=8,273.64
- min:
- 7,650
- max:
- 8,273.64
- avg:
- 7,965.456
- σ:
- 205.862
- from
- 2017=11,475
- to
- 2023=12,410.46
- min:
- 11,475
- max:
- 12,410.46
- avg:
- 11,948.184
- σ:
- 308.793
- from
- 2018=18,000
- to
- 2023=18,859.08
- min:
- 18,000
- max:
- 18,859.08
- avg:
- 18,336.735
- σ:
- 336.729
- from
- 1998-01-01=50,000
- to
- 2001-01-01=7,650
- min:
- 7,650
- max:
- 50,000
- avg:
- 28,825
- σ:
- 21,175
- from
- 2019-01-01=93,510
- to
- 2019-01-01=93,510
- min:
- 93,510
- max:
- 93,510
- avg:
- 93,510
- σ:
- 0
Series code | 2017 | 2018 | 2019 | 2022 | 2023 |
---|---|---|---|---|---|
[impot_revenu.calcul_revenus_imposables.exo_maire_autres.abattement_elus_locaux.mandat_unique] | 7650 | 7896 | 7934.4 | 8073.24 | 8273.64 |
[impot_revenu.calcul_revenus_imposables.exo_maire_autres.abattement_elus_locaux.mandats_multiples] | 11475 | 11844 | 11901.6 | 12109.86 | 12410.46 |
[impot_revenu.calcul_revenus_imposables.exo_maire_autres.abattement_elus_locaux.specifique_communes_moins_3500_hab] | - | 18000 | 18085.68 | 18402.18 | 18859.08 |
Series code | 1998-01-01 | 2001-01-01 | 2019-01-01 |
---|---|---|---|
[impot_revenu.calcul_revenus_imposables.exo_maire_autres.abattement_journalistes.abattement] | 50000 | 7650 | - |
[impot_revenu.calcul_revenus_imposables.exo_maire_autres.abattement_journalistes.plafond] | - | - | 93510 |
This Python snippet uses the DBnomics Python client to download the series of your cart and plot each of them with a line chart.
This is a starting point that you can customize. Plotly is used here, however any other chart library can be used.
You can start by copying it to a Jupyter Notebook , for example.
If you add series to your cart, you will need to copy-paste the new lines of the source code.
import plotly.express as px
import pandas as pd
from dbnomics import fetch_series
dfs = []
# L'élu local exerce un mandat unique
df1 = fetch_series("IPP/taxbenefit_tables/impot_revenu.calcul_revenus_imposables.exo_maire_autres.abattement_elus_locaux.mandat_unique")
df1["series_id"] = df1[["provider_code", "dataset_code", "series_code"]].agg('/'.join, axis=1)
dfs.append(df1)
# display(df1)
display(px.line(df1, x="period", y="value", title=df1.series_id[0]))
# L'élu local exerce plusieurs mandats
df2 = fetch_series("IPP/taxbenefit_tables/impot_revenu.calcul_revenus_imposables.exo_maire_autres.abattement_elus_locaux.mandats_multiples")
df2["series_id"] = df2[["provider_code", "dataset_code", "series_code"]].agg('/'.join, axis=1)
dfs.append(df2)
# display(df2)
display(px.line(df2, x="period", y="value", title=df2.series_id[0]))
# L'élu l'est d'une commune de moins de 3500 habitants (quel que soit son nombre de mandats)
df3 = fetch_series("IPP/taxbenefit_tables/impot_revenu.calcul_revenus_imposables.exo_maire_autres.abattement_elus_locaux.specifique_communes_moins_3500_hab")
df3["series_id"] = df3[["provider_code", "dataset_code", "series_code"]].agg('/'.join, axis=1)
dfs.append(df3)
# display(df3)
display(px.line(df3, x="period", y="value", title=df3.series_id[0]))
# Montant de l'abattement
df4 = fetch_series("IPP/taxbenefit_tables/impot_revenu.calcul_revenus_imposables.exo_maire_autres.abattement_journalistes.abattement")
df4["series_id"] = df4[["provider_code", "dataset_code", "series_code"]].agg('/'.join, axis=1)
dfs.append(df4)
# display(df4)
display(px.line(df4, x="period", y="value", title=df4.series_id[0]))
# Plafond des revenus éligibles à l'abattement
df5 = fetch_series("IPP/taxbenefit_tables/impot_revenu.calcul_revenus_imposables.exo_maire_autres.abattement_journalistes.plafond")
df5["series_id"] = df5[["provider_code", "dataset_code", "series_code"]].agg('/'.join, axis=1)
dfs.append(df5)
# display(df5)
display(px.line(df5, x="period", y="value", title=df5.series_id[0]))
df_all = pd.concat(dfs)
fig = px.line(df_all, x="period", y="value", color="series_code", title="All the cart")
fig.update_layout(legend={"xanchor": "right", "yanchor": "bottom"})
fig.show()