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?

介護人口推移データを分析し、傾向と対策を練る

Last updated at Posted at 2024-12-05

はじめに

前職で介護士をしていた際に、介護士の人口不足を実感しました。
なので、機械学習で学んだ技術を使って、介護士と要介護者の人口推移を可視化し、その中で見えた傾向を分析結果としてまとめていこうと思います。

解決したい社会問題

介護士と要介護者の将来の割合を予測する。

実行環境

パソコン: Windows
開発環境: Google Coraboratory
言語: python
ライブラリ: Pandas、 Numpy、 Matplotlib

分析するデータ

以下のデータを利用して分析結果をまとめます。

A.D. CareRecipients Caregivers
2000 244 54.9
2001 280 63.5
2002 326 72.4
2003 368 84.9
2004 402 96.4
2005 425 108.6
2006 442 114.1
2007 449 119.6
2008 462 123.3
2009 477 136.3
2010 498 142.7
2011 520 150.9
2012 546 163.0
2013 576 170.8
2014 598 176.5
2015 616 183.9
2016 629 189.9
2017 641 195.1
2018 654 203.0
2019 667 210.6
2020 676 211.9
2021 688 214.9
2022 697 215.4

分析の流れ

・データの確認
・データの可視化
・予測データの作成
・予測データの可視化

データの確認

必要なライブラリをインポートします

実行したコード

# ライブラリのインポート
# No.1
# ライブラリのインポート
import pandas as pd
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import seaborn as sns
import numpy as np
from sklearn.linear_model import LinearRegression

使用するデータを読み込みます

実行したコード

# No.2
# csvデータの読み込み
df = pd.read_csv('/content/NursingData.csv')

読み込んだデータを確認します

実行したコード

# No.3
# 読み込んだデータの全体像を確認
df

実行結果

A.D. CareRecipients Caregivers
2000 244 54.9
2001 280 63.5
2002 326 72.4
2003 368 84.9
2004 402 96.4
2005 425 108.6
2006 442 114.1
2007 449 119.6
2008 462 123.3
2009 477 136.3
2010 498 142.7
2011 520 150.9
2012 546 163.0
2013 576 170.8
2014 598 176.5
2015 616 183.9
2016 629 189.9
2017 641 195.1
2018 654 203.0
2019 667 210.6
2020 676 211.9
2021 688 214.9
2022 697 215.4

データの可視化

データを用いて折れ線グラフを作成します

実行したコード

# No.4
# グラフサイズの調整
plt.figure(figsize=(12, 6))

# 折れ線グラフの作成
plt.plot(df['A.D.'], df['CareRecipients'], label='CareRecipients')
plt.plot(df['A.D.'], df['Caregivers'], label='Caregivers')

# ラベル名の設定
plt.title('CareRecipients and Caregivers Over Years')
plt.xlabel('A.D.')
plt.ylabel('Number of People(in tens of thousands)')

# データの可視化
plt.legend()
plt.show()

実行した結果

スクリーンショット 2024-09-04 232159.png

可視化したデータから得られた情報

・2000年の要介護者と介護士の差が190万人なのと比べて、2022年の要介護者と介護士の数の差は482万人と、292万人も増加している
・2000年と2022年の上昇率は要介護者が約2.85倍なのに対して、介護士は約3.92倍でより高い上昇率をもっている

予測データの作成

ARIMAモデルを使用して将来のデータの推移を予測します

実行したコード

# No.5
# ARIMAモデルによる予測
model_recipients = ARIMA(df['CareRecipients'], order=(1, 1, 1))
model_caregivers = ARIMA(df['Caregivers'], order=(1, 1, 1))

# データにARIMAモデルを適応
fit_recipients = model_recipients.fit()
fit_caregivers = model_caregivers.fit()

作成したモデルを使用して向こう10年のデータの推移を予測します

実行したコード

# No.6
# 10年間の予測
forecast_recipients = fit_recipients.forecast(steps=10)
forecast_caregivers = fit_caregivers.forecast(steps=10)

予測結果を表示します

# No.7
# リストの幅を調整
future_years = list(range(2023, 2033))

# 10年間の予測を使用してデータフレームを作成
df_forecast = pd.DataFrame({
    "A.D.": future_years,
    "Predicted_CareRecipients": forecast_recipients,
    "Predicted_Caregivers": forecast_caregivers
})

# A.D.列を追加したデータの確認
df_forecast.set_index('A.D.', inplace=True)
print(df_forecast)

実行した結果

A.D. Predicted_CareRecipients Predicted_Caregivers
2023 704.717730 217.943495
2024 712.110035 220.444931
2025 719.190636 222.905002
2026 725.972676 225.324393
2027 732.468745 227.703776
2028 738.690901 230.043814
2029 744.650693 232.345155
2030 750.359186 234.608441
2031 755.826973 236.834301
2032 761.064207 239.023354

予測データの可視化

予測結果を用いて折れ線グラフを作成します

実行したコード

# No.8
# 実際のデータから折れ線グラフを作成
plt.plot(df['A.D.'], df['CareRecipients'], label='CareRecipients (Actual)')
plt.plot(df['A.D.'], df['Caregivers'], label='Caregivers (Actual)')

# 予測したデータから折れ線グラフを作成
plt.plot(df_forecast['Predicted_CareRecipients'], label='Predicted CareRecipients', linestyle='--')
plt.plot(df_forecast['Predicted_Caregivers'], label='Predicted Caregivers', linestyle='--')

# ラベルの設定
plt.title('Predicted CareRecipients and Caregivers')
plt.xlabel('A.D')
plt.ylabel('Number of People(in tens of thousands)')

# データの可視化
plt.legend()
plt.show()

実行した結果|

スクリーンショット 2024-09-04 235804.png

考察

要介護者と介護士の上昇率は2000年~2022年までの期間に比べて、2023年~2032年の期間では緩やかになっている。

2000年~2022年までの上昇率 2023年~2032年までの上昇率
介護士 3.92倍 1.09倍
要介護者 2.85倍 1.07倍

このことから、介護士と要介護者の割合は向こう10年では変化が少ないことが分かりました。

まとめ

今回の考察はあくまで介護人口の推移のみに着目したデータで、少子高齢化の影響を度外視しているが、現状維持のままだと介護士と要介護者の割合は変化しないことが理解できました。
そのため今より積極的な外国人労働者の雇用や、1日介護などの介護業界の多様化などに力を入れることで介護士と要介護者の差を埋めることが出来ると思います。

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?