Skip to content

Comments

Create a statistic to count the number of values within specified bounds#57

Open
katmatson wants to merge 1 commit intodevelopfrom
bucketed-count-statistic
Open

Create a statistic to count the number of values within specified bounds#57
katmatson wants to merge 1 commit intodevelopfrom
bucketed-count-statistic

Conversation

@katmatson
Copy link

Add a 'bounded_count' statistic and an associated 'bounds' field to the config. This can be used to create a custom statistic counting the number of vectors with a value for the specified property that is within the provided bounds.

For example, in the lake change dataset, to add statistics to count the number of expanding and shrinking lakes within each tile, the statistics entry in the config could include:

statistics = [
    {
      "name": "growing_lakes", 
      "property": "ChangeRateNet_myr-1", 
      "aggregation_method": "bounded_count", 
      "resampling_method": "sum",  
      "bounds": (0, None)
      # ... other standard fields related to display
    },
    {
      "name": "shrinking_lakes", 
      "property": "ChangeRateNet_myr-1", 
      "aggregation_method": "bounded_count", 
      "resampling_method": "sum",  
      "bounds": (None, 0)
      # ... other standard fields related to display
    },
]

The statistic itself will be handled in the viz-raster pipeline, so this PR shouldn't be merged until after PermafrostDiscoveryGateway/viz-raster#35 in the viz-raster repository.

elements into buckets based on the property and ranges in the config.
The implementation of this statistic will primarily be in viz-raster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant