biggr_models.handlers.home_handlers#
Handlers for the BiGGr front page and statistics page.
Classes#
Front page, with precomputed entity counts on the cards. |
|
Database growth over time. |
Functions#
|
Turn [{"date": ..., "count": ...}, ...] into SVG geometry for one line. |
Module Contents#
- biggr_models.handlers.home_handlers.build_model_chart(points, width=720, height=320, pad_left=64, pad=32)#
Turn [{“date”: …, “count”: …}, …] into SVG geometry for one line.
Returns None when there are fewer than two points, so the template can show the cold-start message instead of an axis with nothing on it.
The y axis starts at zero: scaling to the minimum would turn a small absolute change into a dramatic climb, which is the kind of misleading chart this page exists to avoid.
- class biggr_models.handlers.home_handlers.HomeHandler(application: Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)#
Bases:
biggr_models.handlers.utils.BaseHandlerFront page, with precomputed entity counts on the cards.
- template#
- get()#
- class biggr_models.handlers.home_handlers.StatisticsHandler(application: Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)#
Bases:
biggr_models.handlers.utils.BaseHandlerDatabase growth over time.
- template#
- get()#