Series collection
- from
- 2011-01-01=0
- to
- 2011-01-01=0
- min:
- 0
- max:
- 0
- avg:
- 0
- σ:
- 0
- from
- 2011-01-01=0
- to
- 2011-01-01=0
- min:
- 0
- max:
- 0
- avg:
- 0
- σ:
- 0
- from
- 2011-01-01=250,000
- to
- 2011-01-01=250,000
- min:
- 250,000
- max:
- 250,000
- avg:
- 250,000
- σ:
- 0
- from
- 2011-01-01=0.03
- to
- 2011-01-01=0.03
- min:
- 0.03
- max:
- 0.03
- avg:
- 0.03
- σ:
- 0
- from
- 2011-01-01=500,000
- to
- 2011-01-01=500,000
- min:
- 500,000
- max:
- 500,000
- avg:
- 500,000
- σ:
- 0
- from
- 2011-01-01=0.04
- to
- 2011-01-01=0.04
- min:
- 0.04
- max:
- 0.04
- avg:
- 0.04
- σ:
- 0
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 = []
# Barème de la contribution exceptionnelle sur les hauts revenus (CEHR), threshold 0
df1 = fetch_series("IPP/taxbenefit_tables/impot_revenu.contributions_exceptionnelles.contribution_exceptionnelle_hauts_revenus.0.threshold")
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]))
# Barème de la contribution exceptionnelle sur les hauts revenus (CEHR), rate 0
df2 = fetch_series("IPP/taxbenefit_tables/impot_revenu.contributions_exceptionnelles.contribution_exceptionnelle_hauts_revenus.0.rate")
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]))
# Barème de la contribution exceptionnelle sur les hauts revenus (CEHR), threshold 1
df3 = fetch_series("IPP/taxbenefit_tables/impot_revenu.contributions_exceptionnelles.contribution_exceptionnelle_hauts_revenus.1.threshold")
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]))
# Barème de la contribution exceptionnelle sur les hauts revenus (CEHR), rate 1
df4 = fetch_series("IPP/taxbenefit_tables/impot_revenu.contributions_exceptionnelles.contribution_exceptionnelle_hauts_revenus.1.rate")
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]))
# Barème de la contribution exceptionnelle sur les hauts revenus (CEHR), threshold 2
df5 = fetch_series("IPP/taxbenefit_tables/impot_revenu.contributions_exceptionnelles.contribution_exceptionnelle_hauts_revenus.2.threshold")
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]))
# Barème de la contribution exceptionnelle sur les hauts revenus (CEHR), rate 2
df6 = fetch_series("IPP/taxbenefit_tables/impot_revenu.contributions_exceptionnelles.contribution_exceptionnelle_hauts_revenus.2.rate")
df6["series_id"] = df6[["provider_code", "dataset_code", "series_code"]].agg('/'.join, axis=1)
dfs.append(df6)
# display(df6)
display(px.line(df6, x="period", y="value", title=df6.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()