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
CI/CD/IaC 久々に0から環境を作ったらこうなりました
kaz29
1
190
Should Our Project Join the CNCF? (Japanese Recap)
whywaita
PRO
0
140
Node-RED × MCP 勉強会 vol.1
1ftseabass
PRO
0
160
Prox Industries株式会社 会社紹介資料
proxindustries
0
330
Claude Code Actionを使ったコード品質改善の取り組み
potix2
PRO
6
2.4k
A2Aのクライアントを自作する
rynsuke
1
220
JEDAI Databricks Free Editionもくもく会
taka_aki
1
110
Amazon ECS & AWS Fargate 運用アーキテクチャ2025 / Amazon ECS and AWS Fargate Ops Architecture 2025
iselegant
17
5.8k
AWS テクニカルサポートとエンドカスタマーの中間地点から見えるより良いサポートの活用方法
kazzpapa3
2
570
AIの最新技術&テーマをつまんで紹介&フリートークするシリーズ #1 量子機械学習の入門
tkhresk
0
140
Liquid Glass革新とSwiftUI/UIKit進化
fumiyasac0921
0
250
GeminiとNotebookLMによる金融実務の業務革新
abenben
0
240
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
60k
Code Review Best Practice
trishagee
68
18k
Unsuck your backbone
ammeep
671
58k
Visualization
eitanlees
146
16k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Adopting Sorbet at Scale
ufuk
77
9.4k
Producing Creativity
orderedlist
PRO
346
40k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
930
Code Reviewing Like a Champion
maltzj
524
40k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
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/