Very nice, Chris. One of the best implementations of zoom I've seen. Using Flask is smart. I went with Node for WeeRT because I wanted to learn about it and Javascript, but development probably would have been faster using Python and Flask.
However, one problem with your approach is that the weewx database must be on the same machine as your webserver. Why the decision to use canvas instead of SVG? I went with SVG because I wanted to be able to identify and annotate individual data points. Any plans to do real-time plots, using the LOOP data? ECMAScript 6 sure simplifies working with classes. Have you found that it limits which browsers you can use? Work on the WeeRT back-end is plodding along. Right now, I'm focused on using map-reduce to aggregate LOOP packets into archive data. I haven't touched the front-end in months. It's not nearly as polished as yours. -tk On Fri, Sep 9, 2016 at 8:24 PM, Chris Matteri <[email protected]> wrote: > Hi, > > I needed to make dynamic (pan/zoom navigable) weather history plots for a > website I'm making and after looking around I couldn't find anything that > met my requirements. MesoWX has a lot of the functionality I wanted but it > uses Highcharts, which aren't free for commercial use, and it doesn't seem > to be maintained anymore. I needed a project to learn about web development > so I decided to make a plotting app using D3 and canvas. The backend is a > very small flask app that uses weewx as a library to query the archive > database. I believe it would be fairly easy to use WeeRT as the backend > instead once it's ready. > > I have a simple temperature plot demo running here > <http://matterivineyards.com/wxplot/> (it's not yet connected to the > weather station, so the data is a few weeks old). The backend doesn't > currently cache anything, so hopefully there won't be too many people > viewing this at once. > > Some features, such as rain plots, haven't been implemented yet, and I > need to comment the code, but what I have now, along with some additional > info is up at https://github.com/cmatteri/WXPlot > > Hope someone finds this interesting/useful. > > Best, > Chris >
