How earthlab/earthpy works
Main Components
a. Core Modules Layer:
• Plot Module (earthpy.plot)
• Spatial Module (earthpy.spatial)
• IO Module (earthpy.io)
• Mask Module (earthpy.mask)
• Clip Module (earthpy.clip)
b. Dependencies Layer:
• Rasterio (for raster data handling)
• Geopandas (for vector data handling)
• NumPy (for array operations)
• Matplotlib (for plotting)
c. Data Layer:
• Example Data Repository
• External Data Sources
• Data Cache System
┌─────────────────────────────────────────────────────┐
• Client Applications │
• ┘
• ↓
┌─────────────────────────────────────────────────────┐
• EarthPy API │
• ┬─────────────┬────────────┬───────────┤
• Plot API │ Spatial API │ IO API │ Mask API │
• ┴─────────────┴────────────┴───────────┘
• ↓
┌─────────────────────────────────────────────────────┐
• Core Processing Layer │
• ┬─────────────┬────────────┬───────────┤
• Plot Module │ Spatial │ IO Module │ Mask │
• Module │ │ Module │
• ┴─────────────┴────────────┴───────────┘
• ↓
┌─────────────────────────────────────────────────────┐
• External Dependencies │
• ┬─────────────┬────────────┬───────────┤
• Rasterio │ Geopandas │ NumPy │Matplotlib │
• ┴─────────────┴────────────┴───────────┘
• ↓
┌─────────────────────────────────────────────────────┐
• Data Sources │
• ┬─────────────┬────────────────────────┤
• Example │ External │ User Data │
• Data │ Data │ │
• ┴─────────────┴────────────────────────┘
Important Elements to Highlight
a. Data Flow:
• How data moves from source through processing to visualization
• Transformation points between raster and vector data
• Where masking and clipping operations occur
b. Integration Points:
• How EarthPy interfaces with external libraries
• Where user customization is possible
• Extension points for future functionality
Implementation Details
• The modular nature of the package
• Clear separation of concerns between modules
• Data processing workflows
• Integration with scientific Python ecosystem
Key Workflows to Highlight
• Raster band stacking and cropping
• Mask application process
• Vegetation index calculation
• Hillshade generation
• Data download and caching