{# USGS NWIS water observations + v0.8.0 site/stats enrichment. payload->data->data. #} {% set d = (event.data.get('data') or {}).get('data') or {} %} {% set enr = d.get('_enriched') or {} %} {% set site = enr.get('usgs_site') or {} %} {% set st = enr.get('usgs_stats') or {} %} {% if site.get('name') %}
Site name
{{ site.name }}
{% endif %} {% if d.get('parameter_code') is not none %}
Parameter
{{ d.parameter_code }}
{% endif %} {% if d.get('value') is not none %}
Value
{{ d.value }} {{ d.get('unit_of_measure', '') }}
{% endif %} {% if st.get('class_label') %}
Normalcy
{{ st.class_label }}{% if st.get('percentile') is not none %} (~{{ st.percentile }} percentile){% endif %}
{% endif %} {% if st.get('p50') is not none %}
Typical (this day)
median {{ st.p50 }} {{ d.get('unit_of_measure', '') }}{% if st.get('period') %} ยท {{ st.period }}{% if st.get('count') %} ({{ st.count }} yrs){% endif %}{% endif %}
{% endif %} {% if site.get('county') or site.get('state') %}
Location
{{ [site.county, site.state] | select | join(', ') }}
{% endif %} {% if d.get('monitoring_location_id') is not none %}
Site ID
{{ d.monitoring_location_id }}
{% endif %} {% if d.get('statistic_id') is not none %}
Statistic
{{ d.statistic_id }}
{% endif %}