SynopticPy icon indicating copy to clipboard operation
SynopticPy copied to clipboard

Web App: Station Timeseries

Open blaylockbk opened this issue 2 years ago • 0 comments

I have an old, handy page called Multi-Station Timeseries and I would like to rebuild that page using PyScript.

The work-in-progress Timeseries page is here: https://blaylockbk.github.io/SynopticPy/timeseries

  • [ ] Special Plot Type: wind barb / quiver
  • [ ] button spinner as plot is generating.
  • [ ] Units of variance is "squared units", units of count is "number"
  • [ ] Should wind units be returned in MPH instead of knots? Would need to manipulate the API url
  • [ ] Don't redownload JSON data if user already got it (i.e., cases when a user makes a plot, then makes a smoothed plot with the same API parameters)
  • [ ] What should I do about QC values? Automatically remove them? Make facecolor white?
  • [ ] Can I specify the filename when you right-click and download image?
  • [ ] Special Plot Type: Wind Rose (this will complicate the code)
  • [ ] If error in user input, turn field red
  • [ ] Permalink to autofill form.
  • [x] ~~Implement this for rolling: https://github.com/blaylockbk/SynopticPy/discussions/4~~ Not needed.
  • [x] Add link to webapp from SynopticPy sphinx documentation page.
  • [x] #35
  • [x] #37
  • [x] Plot set_2+ values
    • [ ] This should be an opt-in version (need a form checkbox)
    • [ ] color should match the set_1 with alpha or line type varying
  • [x] Bootstrap 5
  • [x] provide smoother
  • [x] instruction in modal
  • [x] provide table of station info in different tab
    • [x] hyperlink to mesowest station page
  • [x] custom matplotlib style
  • [x] hide my token so its not abused
  • [x] show response time in print (put green check if response if good)
  • [x] Time input: start time/end time, start time/duration, or duration/end time
  • [x] Indicator for derived variables (put an asterisk next to STID name in the legend)
  • [x] why doesn't rolling/resample work for local time?
  • [x] Adjust figure title when a smoother is applied indicating which smoother was used.
  • [x] Favicon
  • [x] Cardinal direction labels for wind direction
  • [x] scatter instead of line plot for wind direction
  • [x] More smoother stats (median, var, std,~~90th, 10th~~)
  • [x] Move python code to own script
  • [x] ~~"Reset form" button to reset colors and all values to their default~~ Not really needed since the browser refresh button does the same thing.
  • [x] Use from pyodide.http import open_url because I don't really need to use asyncio
    • [ ] Rethink this, because for long requests, page will act if it isn't responding (like requesting 6months+ of data for many stations.
  • [x] In a third tab, create a simple map of station locations
    • [x] same color cycle used before
    • [x] could maybe use geojson to show state/county lines.
    • [x] #26
    • [x] Zoom in on stations when they are close together instead of showing full state polygon
    • [x] ~~Can't use Cartopy in pyscript yet, but possibly soon.~~ But it would make page take too long to load.
  • [x] Implement Synptic API basic precip service (accumulated precipitation and interval)
  • [x] Variable dropdown selection dividers
  • [x] Add "raw data" button to download json data
  • [x] Special Plot Type: more precip variables
  • [x] Special Plot Type: Daily max/min/mean bar chart (use pd.grouby(day) instead of resample?)
  • [x] Special Plot Type: Provide "spread" plot type for smoother
    • [ ] Need to adjust position of bars to represent the period they cover rather than the "end of the window"
  • [x] General code clean up. Its current state is a bunch of Frankenstein code.
  • [x] Refactor plotting (may use the .pipe method like in this demo)
  • [x] correct time when requesting "local" time

blaylockbk avatar May 31 '23 16:05 blaylockbk