import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
# Sample data for inflation and unemployment rates (hypothetical data)
data = {
'Year': [2018, 2019, 2020, 2021, 2022, 2023],
'Inflation Rate (%)': [3.4, 3.7, 6.2, 5.5, 7.0, 6.5],
'Unemployment Rate (%)': [6.1, 5.8, 7.1, 7.2, 7.5, 8.0],
}
# Create a DataFrame
df = pd.DataFrame(data)
# Set up the matplotlib figure
plt.figure(figsize=(10, 6))
# Create a scatter plot for the Phillips Curve
sns.regplot(x='Unemployment Rate (%)', y='Inflation Rate (%)', data=df, marker='o', color='blue')
# Set the title and labels
plt.title('Phillips Curve: Inflation vs. Unemployment in India (2018-2023)')
plt.xlabel('Unemployment Rate (%)')
plt.ylabel('Inflation Rate (%)')
# Show grid
plt.grid()
# Show the plot
plt.show()
aW1wb3J0IG1hdHBsb3RsaWIucHlwbG90IGFzIHBsdAppbXBvcnQgc2VhYm9ybiBhcyBzbnMKaW1wb3J0IHBhbmRhcyBhcyBwZAoKIyBTYW1wbGUgZGF0YSBmb3IgaW5mbGF0aW9uIGFuZCB1bmVtcGxveW1lbnQgcmF0ZXMgKGh5cG90aGV0aWNhbCBkYXRhKQpkYXRhID0gewogICAgJ1llYXInOiBbMjAxOCwgMjAxOSwgMjAyMCwgMjAyMSwgMjAyMiwgMjAyM10sCiAgICAnSW5mbGF0aW9uIFJhdGUgKCUpJzogWzMuNCwgMy43LCA2LjIsIDUuNSwgNy4wLCA2LjVdLAogICAgJ1VuZW1wbG95bWVudCBSYXRlICglKSc6IFs2LjEsIDUuOCwgNy4xLCA3LjIsIDcuNSwgOC4wXSwKfQoKIyBDcmVhdGUgYSBEYXRhRnJhbWUKZGYgPSBwZC5EYXRhRnJhbWUoZGF0YSkKCiMgU2V0IHVwIHRoZSBtYXRwbG90bGliIGZpZ3VyZQpwbHQuZmlndXJlKGZpZ3NpemU9KDEwLCA2KSkKCiMgQ3JlYXRlIGEgc2NhdHRlciBwbG90IGZvciB0aGUgUGhpbGxpcHMgQ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