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

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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: No status
Development

Successfully merging this pull request may close these issues.

1 participant