Skip to content

Feature Request: Convert OSM Features to Densities #20

@soheir96

Description

@soheir96

Description:

We currently extract total counts and lengths for OSM features within district boundaries. To enhance our analysis, we need to convert these into densities, providing insights per unit area.

Proposed Enhancement:

  1. Add Density Calculations for OSM Features: Convert point counts and road lengths into densities per square kilometer within each district.
  2. Integration: Modify the output to include density metrics for each feature.

Steps to Implement:

  1. Calculate the area of each district in square kilometers.
district_boundary_dataframe['area_km2'] = district_boundary_dataframe['geometry'].area / 1e6
  1. For each feature:
  • Calculate point_density as point_count / district_area_km2.
  • Calculate train_length or road_length_density as road_length / district_area_km2.
  1. Update the OSM features dictionary to store densities:
osm_features_districts[f"{feature_name}_density"] = [
    feature_value / area_km2 for feature_value, area_km2 in zip(feature_values, district_boundary_dataframe['area_km2'])
]
  1. Ensure these new metrics are included in the final osm_features_dataframe.

Benefits:

  • Provides normalised metrics that allow comparison between districts of different sizes.
  • Facilitates more detailed urban and spatial analyses.

Additional Notes:

  • Update all relevant documentation and ensure any dependent analytics reflect these new metrics.
  • Consider visualizing these densities to better interpret spatial patterns.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions