/Users/yilu/Documents/teaching/bhc2509/.conda/lib/python3.11/site-packages/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
  warnings.warn(
/var/folders/7b/szz3t_z12nb1sfzg8cwh22sh0000gn/T/ipykernel_37765/3150146250.py:40: FutureWarning: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning.
  df_grouped = df_pyramid.groupby(['age_group', 'gender'])['POP'].sum().reset_index()
/var/folders/7b/szz3t_z12nb1sfzg8cwh22sh0000gn/T/ipykernel_37765/3150146250.py:50: AltairDeprecationWarning: 
Deprecated since `altair=5.0.0`. Use selection_point instead.
  alt.selection_single()
/var/folders/7b/szz3t_z12nb1sfzg8cwh22sh0000gn/T/ipykernel_37765/3150146250.py:49: AltairDeprecationWarning: 
Deprecated since `altair=5.0.0`. Use add_params instead.
  chart = alt.Chart(df_grouped).mark_bar().add_selection(
Back to top