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 #35

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

Conversation

katmatson
Copy link

@katmatson katmatson commented Jun 18, 2024

Add support to compute a 'bounded_count' statistic based on a 'bounds' tuple. This will count 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 viz-staging config would 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
    },
]

Together with PermafrostDiscoveryGateway/viz-staging#57, this addresses issue #33

the number of elements in each tile within ranges defined in the config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New statistic for counting bucketed features
1 participant