Explore economic development、population and education of the world.
Visualize data
1.Spatial distribution of Population
fig = px.choropleth(df2, locations="isocode",
color="pop",
hover_name="country",
color_continuous_scale=px.colors.sequential.Plasma)
fig.show()
2.Spatial distribution of GDPpc
px.treemap(df1.query("year == 2014"), color = "GDPpc",values="pop", path = ["region", "country"], hover_name = "country")
3、GDPpc in different regions
px.strip(df1,
x = 'GDPpc',
y = 'region',
hover_name= 'country',
hover_data= ['h', 'ky'],
color= 'region',
animation_frame= 'year')
4、GDPpc in different regions from 1990 to 2014
px.line(df1, x='year', y='log_lp', color='country', facet_col= 'region', facet_col_wrap= 2, height= 800)
5、schooling year of high-income countries and low-income countries
px.scatter(df_2014, x='country', y='s', color='hi1990', )
6、labor productivity of high-income countries and low-income countries
px.histogram(
df1,
x="log_lp",
color="hi1990",
hover_name= 'country',
marginal='box',
animation_frame = 'year'
)
7、the relationship between schooling year and labor productivity
px.scatter(
df1,
x="s",
y="log_lp",
color="hi1990",
hover_name="country",
animation_frame = 'year'
)
px.scatter(
df1.query("year == 1990"),
x="s",
y="log_lp",
color="hi1990",
hover_name="country",
hover_data= ['region'],
trendline="ols",
trendline_scope="overall"
)
px.scatter(
df1,
x="s",
y="log_lp",
color="hi1990",
hover_name="country",
animation_frame = 'year',
trendline="ols")
8、the relationship between labor productivity and GDPpc
px.scatter(
df1,
y="log_GDPpc",
x="log_lp",
color="region",
hover_name="country",
animation_frame = 'year'
)
px.scatter(
df1.query("year == 1990"),
x="log_lp",
y="log_GDPpc",
color="hi1990",
hover_name="country",
hover_data= ['region'],
trendline="ols",
trendline_scope="overall"
)
px.scatter(
df1,
x="log_lp",
y="log_GDPpc",
color="hi1990",
hover_name="country",
animation_frame = 'year',
trendline="ols")