Zonal Statistics
Zonal Statistics Endpoints¶
The Zonal Statistics endpoints are used to generate statistics for Climate Engine datasets over different geometries.
There are five groups of Zonal Statistics endpoints:
-
/zonal_stats/pixel_count - The pixel count endpoints produce statistics and time series statistics on the number of pixels in each drought category for polygons or an Earth Engine FeatureCollection.
-
/zonal_stats/dynamic_dataset - The dynamic_dataset endpoints computes temporal statistics which are reduced over specified geometric features.
-
/zonal_stats/static_dataset - The static_dataset endpoints return values for static datasets (no time dependence) over different specified geometries.
-
/zonal_stats/group_by - The group by endpoints generate summaries (mean, sum, etc.) for user defined categories within the user defined polygon(s).
-
/zonal_stats/count - The count endpoints generate a count or probability value for user defined polygon(s).
NOTES:
-
Static datasets are “WRC”, “EH”, “CDOUTLOOOK”, “USDOUTLOOK”
-
The /zonal_stats/pixel_count/timeseries endpoints are restricted to one feature (i.e. one polygon, custom asset, or Climate Engine asset).
/zonal_stats/pixel_count/coordinates¶
- Computes number of pixels in each drought category for polygons.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/pixel_count/coordinates?coordinates=%5B%5B%5B-122.06%2C%2039.16%5D%2C%20%5B-122.06%2C%2037.76%5D%2C%20%5B-120.45%2C%2037.76%5D%2C%20%5B-120.45%2C%2039.16%5D%5D%5D&simplify_geometry=None&dataset=GRIDMET_DROUGHT&variable=spi180d&bins=%5B-2.5%2C%20-2%2C%20-1.5%2C%20-1%2C%20-0.5%2C%200.5%2C%201%2C%201.5%2C%202%2C%202.5%5D&end_date=2010-06-30
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| coordinates | yes | List of point or polygon coordinates, see https://support.climateengine.org/article/152-formatting-coordinates-for-api-requests | [[[-121.61, 38.78], [-121.52, 38.78],[-121.52, 38.83],[-121.61, 38.83],[-121.61, 38.78]]] | |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [400] | |
| dataset | yes | GRIDMET_DROUGHT | GRIDMET_DROUGHT | |
| variable | yes | spi180d | spi180d | |
| bins | no | Bins for the pixel count, currently limited to 10 values | [-2.5, -2, -1.5, -1, -0.5, 0.5, 1, 1.5, 2, 2.5] | |
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| end_date | yes | 2010-06-30 | 2019-12-31 | |
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |
/zonal_stats/pixel_count/feature_collection¶
- Computes number of pixels in each drought category for the features of an Earth Engine FeatureCollection.
- Permissions on custom asset must be such that it is readable by anyone.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/pixel_count/feature_collection?feature_collection_asset_id=blm_ga_nv&simplify_geometry=None&dataset=GRIDMET_DROUGHT&variable=spi180d&bins=%5B-2.5%2C%20-2%2C%20-1.5%2C%20-1%2C%20-0.5%2C%200.5%2C%201%2C%201.5%2C%202%2C%202.5%5D&end_date=2010-06-30
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| feature_collection_asset_id | yes | EE FeatureCollection asset id, must have “Anyone can read” permissions | blm_ga_nv | projects/climate-engine/featureCollections/shp_simplified/ClimateEngine_US_States |
| sub_choices | no | List of features to use in analysis, must be strings | [Idaho, Nevada] | |
| filter_by | no | Property name to filter sub-choices | Name | |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [400] | |
| dataset | yes | GRIDMET_DROUGHT | GRIDMET_DROUGHT | |
| variable | yes | spi180d | spi180d | |
| bins | no | Bins for the pixel count, currently limited to 10 values | [-2.5, -2, -1.5, -1, -0.5, 0.5, 1, 1.5, 2, 2.5] | |
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| end_date | yes | 2010-06-30 | 2019-12-31 | |
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |
/zonal_stats/pixel_count/timeseries/coordinates¶
- Computes timeseries of a number of pixels in each drought category for polygons.
- Note: endpoint will only process one polygon at a time.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/pixel_count/timeseries/coordinates?coordinates=%5B%5B%5B-122.06%2C%2039.16%5D%2C%20%5B-122.06%2C%2037.76%5D%2C%20%5B-120.45%2C%2037.76%5D%2C%20%5B-120.45%2C%2039.16%5D%5D%5D&simplify_geometry=None&dataset=GRIDMET_DROUGHT&variable=spi180d&bins=%5B-2.5%2C%20-2%2C%20-1.5%2C%20-1%2C%20-0.5%2C%200.5%2C%201%2C%201.5%2C%202%2C%202.5%5D&start_date=2010-06-01&end_date=2010-06-30
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| coordinates | yes | List of point or polygon coordinates, see https://support.climateengine.org/article/152-formatting-coordinates-for-api-requests | [[[-121.61, 38.78], [-121.52, 38.78],[-121.52, 38.83],[-121.61, 38.83],[-121.61, 38.78]]] | |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [400] | |
| dataset | yes | GRIDMET_DROUGHT | GRIDMET_DROUGHT | |
| variable | yes | spi180d | spi180d | |
| bins | no | Bins for the pixel count, currently limited to 10 values | [-2.5, -2, -1.5, -1, -0.5, 0.5, 1, 1.5, 2, 2.5] | |
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| start_date | yes | 2010-06-01 | 2019-01-01 | |
| end_date | yes | 2010-06-30 | 2019-12-31 | |
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |
/zonal_stats/pixel_count/timeseries/feature_collection¶
- Computes timeseries of a number of pixels in each drought category for the features of an Earth Engine FeatureCollection.
- Permissions on custom asset must be such that it is readable by anyone.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/pixel_count/timeseries/feature_collection?feature_collection_asset_id=blm_ga_nv&simplify_geometry=None&dataset=GRIDMET_DROUGHT&variable=spi180d&bins=%5B-2.5%2C%20-2%2C%20-1.5%2C%20-1%2C%20-0.5%2C%200.5%2C%201%2C%201.5%2C%202%2C%202.5%5D&start_date=2010-06-01&end_date=2010-06-30
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| feature_collection_asset_id | yes | EE FeatureCollection asset id, must have “Anyone can read” permissions | blm_ga_nv | projects/climate-engine/featureCollections/shp_simplified/ClimateEngine_US_States |
| sub_choices | no | List of features to use in analysis, must be strings | [Idaho, Nevada] | |
| filter_by | no | Property name to filter sub-choices | Name | |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [400] | |
| dataset | yes | GRIDMET_DROUGHT | GRIDMET_DROUGHT | |
| variable | yes | spi180d | spi180d | |
| bins | no | Bins for the pixel count, currently limited to 10 values | [-2.5, -2, -1.5, -1, -0.5, 0.5, 1, 1.5, 2, 2.5] | |
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| start_date | yes | 2010-06-01 | 2019-01-01 | |
| end_date | yes | 2010-06-30 | 2019-12-31 | |
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |
/zonal_stats/static_dataset/coordinates¶
- Returns static values for provided points or polygons.
- The values are reduced over the pixels lying within each polygon using the area_reducer parameter.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/static_dataset/coordinates?coordinates=%5B%5B-121.61%2C38.78%5D%5D&simplify_geometry=None&area_reducer=mean&dataset=EH&variable=ERisk
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| coordinates | yes | List of point or polygon coordinates, see https://support.climateengine.org/article/152-formatting-coordinates-for-api-requests | [[-121.61,38.78]] | [[[-121.61, 38.78], [-121.52, 38.78],[-121.52, 38.83],[-121.61, 38.83],[-121.61, 38.78]]] |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [400] | |
| area_reducer | yes | Statistic over region | mean | mean, median, min, max, stdev, count, count_un, skew, kurtosis, percentile_5, percentile_10, percentile_25, percentile_75, percentile_90, percentile_95 |
| dataset | yes | EH | WRC | |
| variable | yes | ERisk | FLEP8 | |
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |
/zonal_stats/static_dataset/featurecollection¶
- Returns static values for the features of an Earth Engine FeatureCollection.
- Valid (time-independent) datasets: WRC, EH, CDOUTLOOOK, USDOUTLOOK.
- The values are reduced over the pixels lying within each feature using the area_reducer parameter.
- Permissions on custom asset must be such that it is readable by anyone.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/static_dataset/feature_collection?feature_collection_asset_id=blm_ga_nv&simplify_geometry=None&area_reducer=mean&dataset=EH&variable=ERisk
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| feature_collection_asset_id | yes | EE FeatureCollection asset id, must have “Anyone can read” permissions | blm_ga_nv | projects/climate-engine/featureCollections/shp_orig/ClimateEngine_US_Climate_Divisions_plus_AK |
| sub_choices | no | List of features to use in analysis, must be strings | [“NY - YATES”] | |
| filter_by | no | Property name to filter sub-choices | Name | |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [400] | |
| area_reducer | yes | Statistic over region | mean | mean, median, min, max, stdev, count, count_un, skew, kurtosis, percentile_5, percentile_10, percentile_25, percentile_75, percentile_90, percentile_95 |
| dataset | yes | EH | WRC | |
| variable | yes | ERisk | FLEP8 | |
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |
/zonal_stats/temporal_dataset/coordinates¶
- Computes temporal statistics for polygons.
- The values are averaged over the pixels lying within each polygon.
- Permissions on custom asset must be such that it is readable by anyone.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/temporal_dataset/coordinates?coordinates=%5B%5B%5B-122.06%2C%2039.16%5D%2C%20%5B-122.06%2C%2037.76%5D%2C%20%5B-120.45%2C%2037.76%5D%2C%20%5B-120.45%2C%2039.16%5D%5D%5D&simplify_geometry=None&area_reducer=mean&dataset=GRIDMET&variable=tmmx&start_date=2010-06-01&end_date=2010-06-30&temporal_statistic=mean
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| coordinates | yes | List of point or polygon coordinates, see https://support.climateengine.org/article/152-formatting-coordinates-for-api-requests | [[[-122.06, 39.16], [-122.06, 37.76], [-120.45, 37.76], [-120.45, 39.16]]] | [[[-121.61, 38.78], [-121.52, 38.78],[-121.52, 38.83],[-121.61, 38.83],[-121.61, 38.78]]] |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [400] | |
| area_reducer | yes | Statistic over region | mean | mean, median, min, max, stdev, count, count_un, skew, kurtosis, percentile_5, percentile_10, percentile_25, percentile_75, percentile_90, percentile_95 |
| dataset | yes | GRIDMET | GRIDMET | |
| variable | yes | tmmx | tmmx | |
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| start_date | yes | 2010-06-01 | 2019-01-01 | |
| end_date | yes | 2010-06-30 | 2019-12-31 | |
| temporal_statistic | yes | mean | mean, median, max, min, total | |
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |
/zonal_stats/temporal_dataset/feature_collection¶
- Computes temporal statistics for the features of an Earth Engine FeatureCollection.
- The values are averaged over the pixels lying within each feature.
- Permissions on custom asset must be such that it is readable by anyone.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/temporal_dataset/feature_collection?feature_collection_asset_id=blm_ga_nv&simplify_geometry=None&area_reducer=mean&dataset=GRIDMET&variable=tmmx&start_date=2010-06-01&end_date=2010-06-30&temporal_statistic=mean
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| feature_collection_asset_id | yes | EE FeatureCollection asset id, must have “Anyone can read” permissions | blm_ga_nv | projects/climate-engine/featureCollections/shp_simplified/ClimateEngine_US_States |
| sub_choices | no | List of features to use in analysis, must be strings | [Idaho, Nevada] | |
| filter_by | no | Property name to filter sub-choices | Name | |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [400] | |
| area_reducer | yes | Statistic over region | mean | mean, median, min, max, stdev, count, count_un, skew, kurtosis, percentile_5, percentile_10, percentile_25, percentile_75, percentile_90, percentile_95 |
| dataset | yes | GRIDMET | GRIDMET | |
| variable | yes | tmmx | tmmx | |
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| start_date | yes | 2010-06-01 | 2019-01-01 | |
| end_date | yes | 2010-06-30 | 2019-12-31 | |
| temporal_statistic | yes | mean | mean, median, max, min, total | |
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |
/zonal_stats/group_by/coordinates¶
- Returns summaries (mean, sum, etc.) for user defined categories within the user defined polygons.
- To export to google cloud storage bucket, you must give the Climate Engine google service account (climate-engine-pro-gcp@climate-engine-pro.iam.gserviceaccount.com) the Storage Object Creator role in your bucket permissions.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/group_by/coordinates?coordinates=%5B%5B%5B-122.06%2C%2039.16%5D%2C%20%5B-122.06%2C%2037.76%5D%2C%20%5B-120.45%2C%2037.76%5D%2C%20%5B-120.45%2C%2039.16%5D%5D%5D&simplify_geometry=None&area_reducer=sum&group_img_id=GRIDMET%2FDROUGHT%2F20200105&group_band=spi1y&group_img_type=continuous&summary_img_id=CIESIN%2FGPWv411%2FGPW_Population_Count%2Fgpw_v4_population_count_rev11_2020_30_sec&summary_band=population_count&bins=%5B-2.5%2C%20-2%2C%20-1.5%2C%20-1%2C%20-0.5%2C%200.5%2C%201%2C%201.5%2C%202%2C%202.5%5D
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| coordinates | yes | List of point or polygon coordinates, see https://support.climateengine.org/article/152-formatting-coordinates-for-api-requests | [[[-122.06, 39.16], [-122.06, 37.76], [-120.45, 37.76], [-120.45, 39.16]]] | [[[-126.03,23.89], [-66.45,23.89], [-66.45,49.73], [-126.03,49.73]]] |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [400] | |
| area_reducer | yes | Statistic over region | mean | mean, median, min, max, stdev, count, count_un, skew, kurtosis, percentile_5, percentile_10, percentile_25, percentile_75, percentile_90, percentile_95 |
| group_img_id | yes | Earth engine asset or google cloud storage uri that you want to group by | GRIDMET/DROUGHT/20200105 | projects/climate-engine/usdm/weekly/20000808_conus |
| group_band | yes | Band Name in group_img_id | spi1y | spi5y |
| group_img_type | yes | Continuous or Discrete | continuous | continuous, discrete |
| summary_img_id | yes | Earth engine asset or google cloud storage uri that you want to summarize using the group_img_id values | CIESIN/GPWv411/GPW_Population_Count/gpw_v4_population_count_rev11_2020_30_sec | CIESIN/GPWv411/GPW_Population_Count/gpw_v4_population_count_rev11_2020_30_sec |
| summary_band | yes | Image band to use | population_count | population_count |
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| bins | yes | If continuous, bin values for grouped summaries. If discrete, choose values to summarize for | [-2.5, -2, -1.5, -1, -0.5, 0.5, 1, 1.5, 2, 2.5] | [3,4] or [0] or [-2.5, 0, 2.5] |
| scale_img | no | Choose what image to base reduce scale | Defaults to smallest scale image | group_img_id, summary_img_id |
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |
/zonal_stats/group_by/feature_collection¶
- Returns summaries (mean, sum, etc.) for user defined categories within the features of an Earth Engine FeatureCollection.
- To export to google cloud storage bucket, you must give the Climate Engine google service account (climate-engine-pro-gcp@climate-engine-pro.iam.gserviceaccount.com) the Storage Object Creator role in your bucket permissions.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/group_by/feature_collection?feature_collection_asset_id=blm_ga_nv&simplify_geometry=None&area_reducer=sum&group_img_id=GRIDMET%2FDROUGHT%2F20200105&group_band=spi1y&group_img_type=continuous&summary_img_id=CIESIN%2FGPWv411%2FGPW_Population_Count%2Fgpw_v4_population_count_rev11_2020_30_sec&summary_band=population_count&bins=%5B-2.5%2C%20-2%2C%20-1.5%2C%20-1%2C%20-0.5%2C%200.5%2C%201%2C%201.5%2C%202%2C%202.5%5D
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| feature_collection_asset_id | yes | EE FeatureCollection asset id, must have “Anyone can read” permissions | blm_ga_nv | projects/climate-engine/featureCollections/shp_simplified/ClimateEngine_US_States |
| sub_choices | no | List of features to use in analysis, must be strings | Iowa | |
| filter_by | no | Property name to filter sub-choices | Name | |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [400] | |
| area_reducer | yes | Statistic over region | mean | mean, median, min, max, stdev, count, count_un, skew, kurtosis, percentile_5, percentile_10, percentile_25, percentile_75, percentile_90, percentile_95 |
| group_img_id | yes | Earth engine asset or google cloud storage uri that you want to group by | GRIDMET/DROUGHT/20200105 | projects/climate-engine/usdm/weekly/20000808_conus |
| group_band | yes | Band Name in group_img_id | spi1y | spi5y |
| group_img_type | yes | Continuous or Discrete | continuous | continuous, discrete |
| summary_img_id | yes | Earth engine asset or google cloud storage uri that you want to summarize using the group_img_id values | CIESIN/GPWv411/GPW_Population_Count/gpw_v4_population_count_rev11_2020_30_sec | CIESIN/GPWv411/GPW_Population_Count/gpw_v4_population_count_rev11_2020_30_sec |
| summary_band | yes | Image band to use | population_count | population_count |
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| bins | yes | If continuous, bin values for grouped summaries. If discrete, choose values to summarize for | [-2.5, -2, -1.5, -1, -0.5, 0.5, 1, 1.5, 2, 2.5] | [3,4] or [0] or [-2.5, 0, 2.5] |
| scale_img | no | Choose what image to base reduce scale | Defaults to smallest scale image | group_img_id, summary_img_id |
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |
/zonal_stats/count/coordinates¶
- Returns a count or probability value for user defined polygon(s) and time frame.
- To export to google cloud storage bucket, you must give the Climate Engine google service account (climate-engine-pro-gcp@climate-engine-pro.iam.gserviceaccount.com) the Storage Object Creator role in your bucket permissions.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/count/coordinates?coordinates=%5B%5B%5B-122.06%2C%2039.16%5D%2C%20%5B-122.06%2C%2037.76%5D%2C%20%5B-120.45%2C%2037.76%5D%2C%20%5B-120.45%2C%2039.16%5D%5D%5D&simplify_geometry=None&area_reducer=mean&dataset=GRIDMET&variable=tmmx&operator=threshold_gte&output=counts&value_1=25&start_date=2010-06-01&end_date=2010-06-30
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| coordinates | yes | List of point or polygon coordinates, see https://support.climateengine.org/article/152-formatting-coordinates-for-api-requests | [[[-122.06, 39.16], [-122.06, 37.76], [-120.45, 37.76], [-120.45, 39.16]]] | [[[-126.03,23.89], [-66.45,23.89], [-66.45,49.73], [-126.03,49.73]]] |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [100] | |
| area_reducer | yes | Statistic over region | mean | mean, median, min, max, stdev, count, count_un, skew, kurtosis, percentile_5, percentile_10, percentile_25, percentile_75, percentile_90, percentile_95 |
| dataset | yes | GRIDMET | GRIDMET | |
| variable | yes | tmmx | tmmx, tmmn, tmean | |
| operator | yes | Type of operator - options include threshold, interior, exterior | threshold_gte | theshold_gt, threshold_gte, threshold_lt, threshold_lte, interior_eq, interior_neq, exterior_eq, exterior_neq |
| output | yes | Type of Output | counts | counts, probability |
| value_1 | yes | Value to apply operator to | 25 | 25 |
| value_2 | yes | Second value for interior/exterior operators | ||
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| start_date | yes | 2010-06-01 | 2019-06-01 | |
| end_date | yes | 2010-06-30 | 2019-06-30 | |
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |
/zonal_stats/count/feature_collection¶
- Returns a count or probability value for user defined feature(s) and time frame.
- To export to google cloud storage bucket, you must give the Climate Engine google service account (climate-engine-pro-gcp@climate-engine-pro.iam.gserviceaccount.com) the Storage Object Creator role in your bucket permissions.
- Returns: json
URL Example:
https://api.climateengine.org/zonal_stats/count/feature_collection?feature_collection_asset_id=blm_ga_nv&simplify_geometry=None&area_reducer=mean&dataset=GRIDMET&variable=tmmx&operator=threshold_gte&output=counts&value_1=25&start_date=2010-06-01&end_date=2010-06-30
| Name | Required | Description | Default | Example |
|---|---|---|---|---|
| feature_collection_asset_id | yes | EE FeatureCollection asset id, must have “Anyone can read” permissions | blm_ga_nv | projects/climate-engine/featureCollections/shp_simplified/ClimateEngine_US_States |
| sub_choices | no | List of features to use in analysis, must be strings | Iowa | |
| filter_by | no | Property name to filter sub-choices | Name | |
| simplify_geometry | no | maxError in meters, see ee.Feature.simplify | None | |
| buffer | no | List of integer buffers (meters) to be applied to each geometry | [100] | |
| area_reducer | yes | Statistic over region | mean | mean, median, min, max, stdev, count, count_un, skew, kurtosis, percentile_5, percentile_10, percentile_25, percentile_75, percentile_90, percentile_95 |
| dataset | yes | GRIDMET | GRIDMET | |
| variable | yes | tmmx | tmmx, tmmn, tmean | |
| operator | yes | Type of operator - options include threshold, interior, exterior | threshold_gte | theshold_gt, threshold_gte, threshold_lt, threshold_lte, interior_eq, interior_neq, exterior_eq, exterior_neq |
| output | yes | Type of Output | counts | counts, probability |
| value_1 | yes | Value to apply operator to | 25 | 25 |
| value_2 | yes | Second value for interior/exterior operators | ||
| mask_image_id | no | Image mask ID | ||
| mask_band | no | Mask band | ||
| mask_value | no | Image mask value | ||
| start_date | yes | 2010-06-01 | 2019-06-01 | |
| end_date | yes | 2010-06-30 | 2019-06-30 | |
| export_path | no | Export CSV results to a Google cloud storage bucket (must have correct permissions) | climate-engine-public/my_csv_file.csv | |
| export_format | no | File format of export | json | csv, json |