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
これでもう迷わない!Jetpack Composeの書き方実践ガイド
zozotech
PRO
0
1.1k
エンジニアが主導できる組織づくり ー 製品と事業を進化させる体制へのシフト
ueokande
1
100
Snowflake×dbtを用いたテレシーのデータ基盤のこれまでとこれから
sagara
0
120
Create Ruby native extension gem with Go
sue445
0
120
なぜテストマネージャの視点が 必要なのか? 〜 一歩先へ進むために 〜
moritamasami
0
240
初めてAWSを使うときのセキュリティ覚書〜初心者支部編〜
cmusudakeisuke
1
280
新規プロダクトでプロトタイプから正式リリースまでNext.jsで開発したリアル
kawanoriku0
1
190
Automating Web Accessibility Testing with AI Agents
maminami373
0
1.3k
Firestore → Spanner 移行 を成功させた段階的移行プロセス
athug
1
500
2つのフロントエンドと状態管理
mixi_engineers
PRO
3
120
AIエージェントで90秒の広告動画を制作!台本・音声・映像・編集をつなぐAWS最新アーキテクチャの実践
nasuvitz
3
340
「何となくテストする」を卒業するためにプロダクトが動く仕組みを理解しよう
kawabeaver
0
430
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1032
460k
Building Applications with DynamoDB
mza
96
6.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Code Review Best Practice
trishagee
71
19k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
850
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
4 Signs Your Business is Dying
shpigford
184
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
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/