Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve data export interface #32

Open
amotl opened this issue May 20, 2020 · 1 comment
Open

Improve data export interface #32

amotl opened this issue May 20, 2020 · 1 comment

Comments

@amotl
Copy link
Member

amotl commented May 20, 2020

Introduction

Together with @MKO1640 of Hiveeyes fame, we are considering to use the ESP32-e-Paper-Weather-Display by @G6EJD (thanks, David!) in order to display weather and hive information on a Waveshare e-Paper module [1].

We outlined how to use Arduino to acquire beehive data from the HTTP data export interface of Kotori at [2].

Objectives

Therefore, we would like to improve the HTTP export API [3] appropriately.

  • Optionally export only the most recent reading.
  • Optionally downsample time series data in order to reduce the amount of exported information.

Rationale

We can't know upfront about the original data acquisition frequency, but we have to take care about memory usage when data gets exported to embedded devices with constrained memory.
So, we have to use "pandas.resample()" to aggregate time series data by a new time period (e.g. daily to monthly). See also:


[1] https://community.hiveeyes.org/t/anzeige-der-daten-auf-einem-e-paper-display/3229
[2] https://github.com/hiveeyes/hiveeyes-epaper-display/tree/master/lib/hiveeyes
[3] https://getkotori.org/docs/handbook/export/

@amotl amotl changed the title Improve export interface to acquire last reading only Improve data export interface May 28, 2020
@amotl
Copy link
Member Author

amotl commented May 28, 2020

In order to downsample a Pandas DataFrame to a fixed number of rows, we can either use the rolling(n) sliding window functionality or use the one-dimensional linear interpolation function interp from NumPy. See also:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant