I'm planning to use MySQL replication to get the data from my weather
station server to the website's sever, but that's admittedly not very user
friendly compared to what WeeRT does.

I initially used SVG but canvas performed much better when drawing large
number of points. The performance was still acceptable with SVG though. The
amount of code that needs to be changed to use SVG isn't that large, so it
could be changed back to SVG pretty easily.

I would certainly be open to real-time updates, but that would probably
work better with WeeRT as a backend, because there's no way to get the data
between the last archive record and the time the webpage loads (that I know
of).

Using babel with ES2015 preset is enough to get the plots to work in
Firefox, Safari, and presumably Edge (though I haven't tested it). I don't
think they'll work in IE11 because it doesn't support promises, but I
believe a babel polyfill could make it work.

My immediate plans are to clean up and comment the code and to add rain
plots, but it would be nice to integrate it with WeeRT at some point.

-Chris

On Sat, Sep 10, 2016 at 8:40 AM, Thomas Keffer <[email protected]> wrote:

> 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
>>
>
>

Reply via email to