Monitoring economic growth at province level in Indonesia: Q1-2022
Import libraries
# Load computational libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import plotly.express as px
import plotly.graph_objects as go
import statsmodels.api as sm
import statsmodels.formula.api as smf
import geopandas as gpd
Import dataset
df_map = gpd.read_file("/work/gdp_2022q1.json")
df_map = df_map[
[
"provinsi",
"wilayah",
"gdp2021",
"gdp_g2021",
"gdp_g2022q1",
"share",
"target_vaksin",
"COORD_Y",
"COORD_X",
"geometry",
]
]
df_map
Explore the data with interactive map
Interactive data exploration
Drop geometry variables from dataset
Descriptive statistics
Plot provincial GDP growth grouped by regions
The distribution of GDP growth in boxplot
The distribution of vaccine realization in boxplot
The relationship between growth in 2021 and growth in 2022-Q1
px.scatter(
df,
y="gdp_g2022q1",
x="share",
hover_name="provinsi",
#color="wilayah",
size_max=60,
trendline='ols',
labels=dict(wilayah='Wilayah')
)