Skip to content

Commit

Permalink
feat: Add additional variables to air quality forecast (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-zippenfenig authored Sep 26, 2024
1 parent 9f5dd99 commit 069fb9c
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion src/routes/en/docs/air-quality-api/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,23 @@
{ name: 'us_aqi_sulphur_dioxide', label: 'United States AQI SO<sub>2</sub>' }
]
];
const additionalVariables = [
[
{ name: 'formaldehyde', label: 'Formaldehyde CH₂O' },
{ name: 'glyoxal', label: 'Glyoxal C₂H₂O₂' },
{ name: 'non_methane_volatile_organic_compounds', label: 'Non Methane Volatile Organic Compounds <small class="text-muted">(*)</small>' },
{ name: 'pm10_wildfires', label: 'PM<sub>10</sub> caused by wildfires <small class="text-muted">(*)</small>' },
{ name: 'peroxyacyl_nitrates', label: 'Peroxyacyl Nitrates PAN' },
{ name: 'secondary_inorganic_aerosol', label: 'Secondary Inorganic Aerosol <small class="text-muted">(*)</small>' }
],
[ { name: 'residential_elementary_carbon', label: 'Residential Rlementary Carbon <small class="text-muted">(*)</small>' },
{ name: 'total_elementary_carbon', label: 'Total Elementary Carbon <small class="text-muted">(*)</small>' },
{ name: 'pm2_5_total_organic_matter', label: 'PM<sub>2.5</sub> Total Organic Matter <small class="text-muted">(*)</small>' },
{ name: 'sea_salt_aerosol', label: 'Sea Salt Aerosol' },
{ name: 'nitrogen_monoxide', label: 'Nitrogen Monoxide NO' }
]
];
</script>

<svelte:head>
Expand Down Expand Up @@ -532,8 +549,31 @@
</AccordionItem>
<AccordionItem
id="additional-variables"
title="Additional Options"
title="Additional Variables and Options"
>
{#each additionalVariables as group}
<div class="col-md-6">
{#each group as e}
<div class="form-check">
<input
class="form-check-input"
type="checkbox"
value={e.name}
id="{e.name}_hourly"
name="hourly"
bind:group={$params.hourly}
/>
<label class="form-check-label" for="{e.name}_hourly">{@html e.label}</label>
</div>
{/each}
</div>
{/each}
<div class="col-md-12 mb-3">
<small class="text-muted"
>* Only available in Europe
</small>
</div>

<div class="col-md-12 mb-3">
<small class="text-muted"
>Note: You can further adjust the forecast time range for hourly weather variables using <mark>&forecast_hours=</mark> and <mark>&past_hours=</mark> as shown below.
Expand Down

0 comments on commit 069fb9c

Please sign in to comment.