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
60
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
31
API Strat 2018
noahcrowley
0
54
Other Decks in Technology
See All in Technology
AI駆動で進める依存ライブラリ更新 ─ Vue プロジェクトの品質向上と開発スピード改善の実践録
sayn0
1
160
混合雲環境整合異質工作流程工具運行關鍵業務 Job 的經驗分享
yaosiang
0
140
アウトプットから始めるOSSコントリビューション 〜eslint-plugin-vueの場合〜 #vuefes
bengo4com
3
400
クラウドとリアルの融合により、製造業はどう変わるのか?〜クラスメソッドの製造業への取組と共に〜
hamadakoji
0
360
OpenTelemetry が拡げる Gemini CLI の可観測性
phaya72
2
1.9k
AWS DMS で SQL Server を移行してみた/aws-dms-sql-server-migration
emiki
0
120
Kubernetes self-healing of your workload
hwchiu
0
380
NLPコロキウム20251022_超効率化への挑戦: LLM 1bit量子化のロードマップ
yumaichikawa
1
190
初めてのDatabricks Apps開発
taka_aki
1
240
CREが作る自己解決サイクルSlackワークフローに組み込んだAIによる社内ヘルプデスク改革 #cre_meetup
bengo4com
0
290
「タコピーの原罪」から学ぶ間違った”支援” / the bad support of Takopii
piyonakajima
0
130
ソースを読むプロセスの例
sat
PRO
15
9.8k
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
140
7.2k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
It's Worth the Effort
3n
187
28k
Side Projects
sachag
455
43k
Balancing Empowerment & Direction
lara
5
700
Context Engineering - Making Every Token Count
addyosmani
8
300
Gamification - CAS2011
davidbonilla
81
5.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
How to Ace a Technical Interview
jacobian
280
24k
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/