Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PyTN 2019
Search
Noah Crowley
February 09, 2019
Technology
0
59
PyTN 2019
Noah Crowley
February 09, 2019
Tweet
Share
More Decks by Noah Crowley
See All by Noah Crowley
All Things Open 2018
noahcrowley
0
29
API Strat 2018
noahcrowley
0
53
Other Decks in Technology
See All in Technology
Gradle Build Scanを使ってビルドのことを知ろう potatotips #87
tomorrowkey
2
160
家族アルバム みてねにおけるGrafana活用術 / Grafana Meetup Japan Vol.1 LT
isaoshimizu
1
1k
【SORACOM UG 東海】あらゆるモノがつながる社会へ、IoT と SORACOM
soracom
PRO
1
140
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
3
620
Rustで「プリズモイダル法」を利用して「土量計算」をガチでやる
nokonoko1203
1
300
Gitlab本から学んだこと - そーだいなるプレイバック / gitlab-book
soudai
7
1.3k
「スニダン」開発組織の構造に込めた意図 ~組織作りはパッションや政治ではない!~
rinchsan
4
610
Google Cloud Next '24 Recap(Cloud Run/k8s)
mokocm
0
330
VSCodeの拡張機能を作っている話
ebarakazuhiro
1
800
Python と Snowflake はズッ友だょ!~ Snowflake の Python 関連機能をふりかえる ~
__allllllllez__
2
140
20分で完全に理解するGrafanaダッシュボード
hamadakoji
5
890
生産性向上チームの紹介
cybozuinsideout
PRO
1
920
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
457
32k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Fireside Chat
paigeccino
22
2.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
126
32k
Rebuilding a faster, lazier Slack
samanthasiow
74
8.2k
Product Roadmaps are Hard
iamctodd
45
9.7k
Web development in the modern age
philhawksworth
203
10k
Code Review Best Practice
trishagee
56
15k
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
Transcript
Python & InfluxDB PyTennessee 2019
A time series is a series of data points indexed
(or listed or graphed) in time order.
None
10:15
12 10:15
12 10:15 10:17
12 16 10:15 10:17
12 16 10:15 10:17 10:19
12 16 15 10:15 10:17 10:19
12 16 15 10:15 10:17 10:19 10:21
12 16 15 20 10:15 10:17 10:19 10:21
https://en.wikipedia.org/wiki/Time_series
https://finance.yahoo.com/quote/%5EDJI?p=^DJI
https://finance.yahoo.com/quote/GOOG?p=GOOG
https://finance.yahoo.com/quote/GOOG?p=GOOG
https://darksky.net/details/40.7295,-73.9936/2018-3-7/us12/en
https://darksky.net/details/40.7295,-73.9936/2018-3-7/us12/en
http://www.imreference.com/cardiology/ekg
https://victorops.com/blog/the-future-of-monitoring-and-alerting-victorops-and-grafana
https://help.papertrailapp.com/kb/how-it-works/event-viewer/
https://developer.lightbend.com/docs/cinnamon/latest/extensions/opentracing.html
http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html
Time series data relies on measurements
https://www.riverfronttimes.com/newsblog/2010/05/17/how-to-identify-a-census-worker
https://www.hunker.com/13408232/mercury-thermometer-vs-alcohol-thermometer
https://www.hunker.com/13408232/mercury-thermometer-vs-alcohol-thermometer
http://steinn.org/post/flask-statsd/
http://werkzeug.pocoo.org/docs/0.14/middlewares/
http://steinn.org/post/flask-statsd/
http://erikboertjes.com/?page_id=670
Measurements over time model change
http://www.harnois.com/en/
https://www.medicalnewstoday.com/articles/319725.php
https://www.relumination.com/parking-lot-lighting-dont-leave-customers-dark/
https://victorops.com/blog/the-future-of-monitoring-and-alerting-victorops-and-grafana
http://theregister.co.nz/news/2015/11/graph-tracking-almost-decade-retail-sales-new-zealand
https://www.slideshare.net/g9yuayon/streaming-analytics-in-uber
Algorithms
Simple Moving Average
12 16 15 20 7:00 7:02 7:04 7:06
12 16 15 20 7:00 7:02 7:04 7:06 15.75
12 16 15 20 7:00 7:02 7:04 7:06
12 16 15 20 7:00 7:02 7:04 7:06 10 6:58
12 16 15 20 7:00 7:02 7:04 7:06 10 6:58
25 7:08
12 16 15 20 7:00 7:02 7:04 7:06 10 6:58
13.25 25 7:08
12 16 15 20 7:00 7:02 7:04 7:06 15.75 10
6:58 13.25 25 7:08
12 16 15 20 7:00 7:02 7:04 7:06 15.75 10
6:58 13.25 25 7:08 19.00
https://finance.yahoo.com/quote/^DJI/chart
Seasonality
http://shawndubravac.com/2011/11/why-dont-retail-sales-show-more-seasonality/
https://blog.algorithmia.com/introduction-to-time-series/ Multiplicative Additive
Multiplicative Time series = t (trend) * s (seasonality) *
n (noise)
https://blog.algorithmia.com/introduction-to-time-series/ Multiplicative Additive
Additive Time series = t (trend) + s (seasonality) +
n (noise)
https://blog.algorithmia.com/introduction-to-time-series/ Multiplicative Additive
Decomposition
https://blog.algorithmia.com/introduction-to-time-series/
Further Reading
Intro to Time Series Stephanie Kim https://blog.algorithmia.com/introduction-to-time-series/
• Cumulative Moving Average, Exponential Moving Average • Forecasting: Autoregressive
Integrated Moving Average • Anomaly Detection, Neural Nets in Time Series
Python Software for Time Series
Telegraf Collect InfluxDB Store Kapacitor Process Chronograf Visualize
InfluxDB • Architected for Time Series Data • Scalable &
Reliable • High Rate of Ingest • Efficient compression • Built-in functionality for working with time
Client Libraries Go, Python, Ruby, Java, C#, JavaScript
Telegraf • Plugin-Driven Architecture: Inputs, Processors, Aggregators, Outputs • Easily
extensible, high rate of adoption by community • Over 150 plugins • Generic plugins • Application-specific plugins
Telegraf: Generic Plugins • Socket Listener (TCP / UDP /
Unix Socket) • HTTP • File • exec
Chronograf & Kapacitor • Chronograf is our visualization tool and
has some administrative functions • Kapacitor is a processing engine • Stream or batch query data from database • Perform any kind of processing you’d like • Downsampling, Anomaly Detection, Alerting, Etc.
influxdb-python Library • Community Maintained • Key functions for working
with InfluxDB: • InfluxDBClient • DataFrameClient • Series Helper & ResultSet github.com/influxdata/influxdb-python
community.influxdata.com Feedback appreciated! Twitter, GitHub: @noahcrowley Email: noah@influxdata.com
Demo code available at github.com/noahcrowley/pytn-2019/