Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
BAC0 documentation
BAC0 documentation
  • Getting started
  • How to start BAC0
  • Read from network
  • Write to network
  • Time Sync
  • How to define a device and interact with points
  • Proprietary Objects
  • Histories in BAC0
  • TrendLog
  • Trends
  • Schedules in BAC0
  • COV in BAC0
  • Callback
  • Saving your data
  • Database
  • Local Objects
  • Models
  • State Text
  • Engineering units
  • Logging and debugging
  • BAC0
    • BAC0 package
      • BAC0.core package
        • BAC0.core.app package
        • BAC0.core.devices package
          • BAC0.core.devices.local package
          • BAC0.core.devices.mixins package
        • BAC0.core.functions package
        • BAC0.core.io package
        • Proprietary objects with bacpypes3
        • BAC0.core.utils package
      • BAC0.db package
      • BAC0.scripts package
      • BAC0.tasks package
      • BAC0.tools package
Back to top
View this page

Trends

Trending is a nice feature when you want to see how a points value changed over time. You can plot quick histories in notebooks with Matplotlib/Seaborn and, for live dashboards, stream point values to InfluxDB and visualize them in the InfluxDB UI or Grafana. See the Database page for full setup and usage:

  • InfluxDB overview and connection: InfluxDB and Connection

  • Write cadence and data model: Writing cadence

  • Viewing data and dashboards: Database

Note: The legacy Bokeh-based web interface has been removed from BAC0. Use InfluxDB for live trending.

Matplotlib

Matplotlib is a well known data plotting library for Python. As BAC0’s historical point data are pandas Series and DataFrames, it’s possible to use Matplotlib with BAC0. i.e. Showing a chart using matplotlib:

%matplotlib notebook
# or matplotlib inline for a basic interface
controller['nvoAI1'].history.plot()

matplotlib

Seaborn

Seaborn is a library built over Matplotlib that extends the possibilities of creating statistical trends of your data. I strongly suggest you have a look to this library.

Live trends with InfluxDB

BAC0 can periodically write point values to InfluxDB and you can create live charts in the InfluxDB UI or Grafana. For step-by-step setup, data model, write cadence, and dashboard examples, see InfluxDB.

Next
Schedules in BAC0
Previous
Histories in BAC0
Copyright © 2020, Christian Tremblay, P.Eng. | SERVISYS inc.
Made with Sphinx and @pradyunsg's Furo
On this page
  • Trends
    • Matplotlib
    • Seaborn
    • Live trends with InfluxDB