Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoping: next steps for search and download APIs #88

Open
13 of 33 tasks
sgreenbury opened this issue Oct 7, 2024 · 0 comments
Open
13 of 33 tasks

Scoping: next steps for search and download APIs #88

sgreenbury opened this issue Oct 7, 2024 · 0 comments

Comments

@sgreenbury
Copy link
Contributor

This issue describes the current approach, features, and APIs for searching metadata and downloading data and aims to:

  1. help identify if the current structure should be refined for the next planned features
  2. document the current code structure.

Related issues

Current structure and design

The diagram describes the relationships between the types and concepts that are currently implemented.

graph TB

    subgraph CLI
        subgraph CombinedParamsArgs
            SearchParamsArgs:::type
            DownloadParamsArgs:::type
        end
        Recipe:::concept
    end
    
    subgraph DataRequest API
        DataRequestSpec:::type
        
        GeometrySpec["GeometrySpec"]:::type
        MetricSpecs:::type
        Years:::type
    end
    
    subgraph Combined API
        Params:::type
        RegionSpecs:::type
    end
    subgraph SearchAPI["Search API"]
        SearchParams:::type    
    end
    
    subgraph DownloadAPI
        DownloadParams:::type
        Config:::type
        SearchResults:::type
    end
    Recipe -- Deserializes to --> DataRequestSpec 
    DataRequestSpec -- 'TryFrom' --> Params 
    
    DataRequestSpec  --- GeometrySpec
    DataRequestSpec  --- RegionSpecs
    DataRequestSpec  --- MetricSpecs
    DataRequestSpec  --- Years
 
    Params --- SearchParams
    Params --- DownloadParams
    
    subgraph Outputs
        Metrics:::concept
        Geometries:::concept
    end
    SearchParamsArgs -- 'From' --> SearchParams
    CombinedParamsArgs -- 'From' --> DownloadParams
    SearchParams -- '.search()' --> SearchResults
    DownloadAPI -- '.download()' --> Outputs
    
    subgraph Key["Key"]
        Concept:::concept
        Type:::type
    end

    classDef api fill:#cbd5e8,stroke:#333,stroke-width:2px
    classDef type fill:##cbd5e8,stroke:#333,stroke-width:2px
    classDef field fill:#fdcdac,stroke:#333,stroke-width:2px
    classDef concept fill:#f4cae4,stroke:#333,stroke-width:2px
    classDef methods fill:#e6f5c9,stroke:#333,stroke-width:2px
Loading

Search API SearchParams

Design goal: aiming to enable flexible, composable and expressive searching of the metadata structure

Current features implemented/planned for search:

Download API (DataRequestSpec / SearchParams and DownloadParams)

Design goal: to enable the download of data products in various customizable output structures and formats that various users may require

Current features implemented/planned for download:

  • Multiple metrics
  • Various geometries
  • Multiple years and year ranges
  • Region Spec
    • Bounding Box
    • Named Area
    • PolygonBBox
  • Recipe
  • A list of recipes/data request specs
  • Transformations: applying a query, formulae, additional metadata to be returned, column renaming, etc
  • Multiple geometries
  • Other data types:
    • Categorical data (e.g. spatial signatures)
    • Synthetic populations
    • Origin-destination
  • Spatial interpolation

User stories

Some example user stories with use cases to help motivate modifications to the design.

15m neighbourhood tool

See PR10

Other enhancements

  • Add bon for implementing a builder for the various params (e.g. for SearchParams)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo:
Development

No branches or pull requests

1 participant