Meteogram
Meteogram README
This app gets data from the Synoptic Mesonet API, reads it with Pandas, and plots a timeseries of the data with matplotlib. This is all done in your browser powered by pyscript. The primary use of this app is to plot a timeseries of data from multiple stations in a single plot.
Token
You may insert your own Synoptic API token below. If left blank, you will use one of my free-tier tokens which may be limited if more than 4+ people are using this page at the same time. Using your own token prevents running into this problem and gives you access to features you may have for your account.
A comma-separated list of station IDs, e.g. PSRIM,PSINK. If you don't know the station ID, you can search on Mesowest.
Backdoor: Advanced Station Selector
With some knowledge of the Synoptic Mesonet API, you can
make more complex station queries. Instead of a list of
stations, you can instead provide
station selection parameters
to refine your station selection. This is inerted in the API
request, so you need to separate each argument with a
&
. For example:
-
radius=wbb,5 All stations within a 5 mile
radius of
WBB
. -
radius=wbb,5&limit=10
10
stations nearestWBB
within a5
mile radius. -
radius=WBB,5&limit=10&stid=!MTMET Same as
above, but exclude the station
MTMET
. -
radius=WBB,20&network=153 Stations within
20
miles ofWBB
that belong to theUUNET
network. (See list of network providers.) -
radius=KSLC,40&network=1,2&limit=8
8
stations within40
miles ofKSLC
that belong to theASOS/AWOS
andRAWS
networks. (See list of network providers.) -
radius=41.5,-120.25,20&limit=10
10
stations within20
miles of thelatitude,longitude
location.
Select the variable you wish to plot.
There are three ways to specify the plot's time range:
-
"Start at
[datetime]
and end at[datetime]
." -
"Start at
[datetime]
and end[timedelta]
later." -
"Start
[timedelta]
before the end[datetime]
."
Start Time: Specify the starting time for the plot. This must be a Pandas-parsable datetime string YYYY-MM-DD HH:MM or if an End datetime is given, a Pandas-parsable timedelta such as 30min for 30 minutes, 12H for 12 hours, 3D for 3 days.
End Time: Specify the ending time for the plot. This must be a Pandas-parsable datetime string YYYY-MM-DD HH:MM or if a Start datetime is given, a Pandas-parsable timedelta such as 30min for 30 minutes, 12H for 12 hours, 3D for 3 days.
You can "smooth" the data using two different methods built into Pandas:
- Resample: Reduces the amount of data points to interval selected by computing a statistic for the time window. This is useful for showing the "daily maximum temperature" for the time period.
- Rolling: Returns the same amount of data points but value (i.e. mean, max, min) is computed over a rolling time window.
Also specify the time window (as a Pandas-parsable timedelta) and the statistic to compute in the time window (e.g. Mean). WARNING: A proper average for wind_direction is not yet implemented.
Specify the colors you want each line. Maybe you have lots of stations plotted, but want to highlight only one; you can make that station "red" and the others a shade of grey. Note that colors are reused if there are more stations than colors.
Toggle units to be returned in English or Metric units. Also toggle if time is local or UTC.