Skip to content

Release v1.4.0 – AOI Selector UI & ADM2 Summary Client

Choose a tag to compare

@Gabe-Levin Gabe-Levin released this 02 Jul 12:54
· 82 commits to main since this release
57b130c

Release v1.4.0 – AOI Selector UI & ADM2 Summary Client

Feature Update

AOI Selector Widget

The Python client now includes an interactive AOI (Area of Interest) selection widget, allowing you to draw or choose geographic regions directly in Jupyter notebooks.

from space2stats_client import Space2StatsClient, AoiSelectorWidget

# Initialize the client
client = Space2StatsClient()

# Create and display the AOI selector widget
aoi_widget = AoiSelectorWidget(client)
aoi_widget.display()

# Retrieve the selected AOI geometry
selected_aoi = aoi_widget.get_selected_aoi()

ADM2 Summary Client Methods

New methods to fetch sub-national (ADM2) summary statistics from the DDH (Decentralized Data Hub) and return them as pandas DataFrames.

from space2stats_client import Space2StatsClient

# Initialize the client
client = Space2StatsClient()

# List available ADM2 summary datasets
dataset_info = client.get_adm2_dataset_info()
print(dataset_info)

# Fetch ADM2 summaries for a given dataset and country code
urban_data = client.get_adm2_summaries("urbanization", "AND")
print(urban_data.head())

Additional Improvements

  • Updated client documentation with examples for both the AOI selector widget and the new ADM2 methods.
  • Added tests covering the AOI widget integration and ADM2 summary methods.
  • New UI widget structure to separate jupyter specific dependencies from core package functionality