0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

plotlyで収入と手取り、年金、保険料を可視化してみる

Last updated at Posted at 2025-02-15

やってみたこと

年収が1000万円の場合の手取りと年金・保険料のフローを可視化してみたかった
※そんなにもらってない。

使用した技術

  • Python
  • Jupyter
  • plotly

データ

ChatGPTに雑に聞いてみた
image.png

コード

import plotly.graph_objects as go
import plotly.io as pio
pio.renderers.default = 'notebook'

fig = go.Figure(data=[go.Sankey(
    node = dict(
      pad = 15,
      thickness = 20,
      line = dict(color = "black", width = 0.5),
      label = ["0給与", "1賞与", "2児童手当", "3投資収入", "4総収入", "5所得税", "6住民税", "7年金", "8健康保険", "9雇用保険", "10手取り", "11税・保険", "12大阪万博"],
      color = "blue"
    ),
    link = dict(
      source = [0, 1, 2, 3,11,11,11,11,11, 4, 4,5], 
      target = [4, 4, 4, 4, 5, 6, 7, 8, 9, 10,11,12],
      value =  [800, 200, 20, 10, 85,65,49,72,7, 752,278,0.3]
  ))])

fig.update_layout(title_text="年収が1000万円の場合の手取りと年貢のフロー", font_size=10)
fig.show()

結果

だいたい3割弱持っていかれる
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?