SlideShare a Scribd company logo
Time Series analysis
by JavaScript
LL matsuri 2013/08/24
1
Time Series analysis
by JavaScript
前処理
LL matsuri 2013/08/24
2
{twitter: “muddydixon”}
✓Data Mining
✓Data Visualization
✓Love D3.js
✓working @ NIFTY
3
NIFTY Cloud
4
Visualization
✓What is Visualization?
communicating information
clearly and effectively
5
Visualization on Web
✓Profit
✓Watch KGI / KPI continuously
✓Share visualization via URL
✓empowered representation by HTML5 / css3
-> D3.js
6
Visualization on Web : D3.js
7
Time Series Visualization
✓Visualize “time series” of
✓KGI / KP of services
✓Metrics of system resources
8
Sample
{"time":"2013-01-02T08:54:31.000Z","cpu":0.6283,"memory":0.4427}
{"time":"2013-01-02T08:54:22.000Z","cpu":0.6103,"memory":0.6494}
{"time":"2013-01-02T08:54:24.000Z","cpu":0.6096,"memory":0.4888}
{"time":"2013-01-02T08:54:25.000Z","cpu":0.6811,"memory":0.641}
{"time":"2013-01-02T08:54:14.000Z","cpu":0.6028,"memory":0.6452}
{"time":"2013-01-02T08:54:06.000Z","cpu":0.5565,"memory":0.4346}
{"time":"2013-01-02T08:54:10.000Z","cpu":0.4161,"memory":0.358}
{"time":"2013-01-02T08:55:01.000Z","cpu":0.5256,"memory":0.5969}
{"time":"2013-01-02T08:55:47.000Z","cpu":0.6145,"memory":0.3213}
{"time":"2013-01-02T08:56:24.000Z","cpu":0.6896,"memory":0.5109}
{"time":"2013-01-02T08:56:35.000Z","cpu":0.443,"memory":0.633}
{"time":"2013-01-02T08:56:11.000Z","cpu":0.4746,"memory":0.4777}
{"time":"2013-01-02T08:56:42.000Z","cpu":0.503,"memory":0.5732}
{"time":"2013-01-02T08:56:38.000Z","cpu":0.4731,"memory":0.4024}
{"time":"2013-01-02T08:57:01.000Z","cpu":0.405,"memory":0.5203}
{"time":"2013-01-02T08:57:54.000Z","cpu":0.4496,"memory":0.5324}
{"time":"2013-01-02T08:57:04.000Z","cpu":0.3528,"memory":0.3145}
{"time":"2013-01-02T08:57:49.000Z","cpu":0.6659,"memory":0.4285}
{"time":"2013-01-02T08:57:19.000Z","cpu":0.3237,"memory":0.6979}
{"time":"2013-01-02T08:58:31.000Z","cpu":0.4045,"memory":0.6581}
{"time":"2013-01-02T08:58:45.000Z","cpu":0.3134,"memory":0.3261}
{"time":"2013-01-02T08:58:44.000Z","cpu":0.4382,"memory":0.419}
{"time":"2013-01-02T08:58:38.000Z","cpu":0.6983,"memory":0.3493}
{"time":"2013-01-02T08:58:34.000Z","cpu":0.6645,"memory":0.6272}
{"time":"2013-01-02T08:59:54.000Z","cpu":0.604,"memory":0.3287}
{"time":"2013-01-02T08:59:25.000Z","cpu":0.574,"memory":0.4856}
{"time":"2013-01-02T08:59:19.000Z","cpu":0.4775,"memory":0.3998}
{"time":"2013-01-02T08:59:34.000Z","cpu":0.5047,"memory":0.6702}
{"time":"2013-01-02T08:59:46.000Z","cpu":0.672,"memory":0.5021}
{"time":"2013-01-02T08:59:53.000Z","cpu":0.3278,"memory":0.6679}
{"time":"2013-01-02T08:59:29.000Z","cpu":0.4494,"memory":0.3319}
9
可視化エンジニア
マネージャー
デイリーで
売上データ見せて
了解しました
10
可視化エンジニア
マネージャー
やっぱり、月次
と週次で
…了解しました
11
可視化エンジニア
マネージャー
あと売上の平均
と分散も
うっ、つらい
12
Summarize
keyvalues = {}
for d in data
time = new Date(d.time.getFullYear(), d.time.getMonth(),
d.time.getDate(), d.time.getHours(), d.time.getMinutes())
keyvalues[time] = [] unless keyvalues[time]
keyvalues[time].push d
aggregated = []
for time, values of keyvalues
obj = {time: time, cpu: 0, memory: 0}
for d in values
obj.cpu += d.cpu
obj.memory += d.memory
aggregated.push obj
console.log aggregated
13
Problems
Large
Time perspectives / Statistics
Avoid to get data each time
Hourly / Daily / Weekly / Monthly / Yearly
Summary / Average / Stdev
14
Problems
メンドクサイ
15
Series.js
16
Series.js
✓Providing utility methods for time series
✓sum, sum square, mean, median, quantile
✓variance, standard devience, covariance, correlation
✓auto covariance, auto correlation
✓Providing aggregation
✓minutes, hour, day, week, month, year
✓Coming soon
✓auto regression, spectrum
✓moving average, holt-winters, exponential moving average
17
Series.js APIs example
# class methods
Series.sum([1,2,3,4,5]) #=> 15
Series.mean([1,2,3,4,5]) #=> 3
# instance methods
s = new Series()
s.put d for d in [1,2,3,4,5]
s.mean() #=> 3
18
Series.js APIs example
# accessor
Series.y((d)-> d.v).sum([{v:1},{v:2},{v:3},{v:4},{v:
5}]) #=> 15
s = new Series().y((d)-> d.v)
s.put d for d in [{v:1}, {v:2}, {v:3}, {v:4}, {v:5}]
s.mean() #=> 3
19
Series.js APIs example
# aggregation
data = [{t: 1, v:1}, {t: 1, v:2}, {t:2, v:3}, {t:2, v:4},
{t:1, v:5}]
Series.y((d)-> d.v).aggregation(Series.sum).key((d)-
> d.t)(data)
#=> [{t:1, v: 8}, {t: 2, v: 7}]
20
Sample
{"time":"2013-01-02T08:54:31.000Z","cpu":0.6283,"memory":0.4427}
{"time":"2013-01-02T08:54:22.000Z","cpu":0.6103,"memory":0.6494}
{"time":"2013-01-02T08:54:24.000Z","cpu":0.6096,"memory":0.4888}
{"time":"2013-01-02T08:54:25.000Z","cpu":0.6811,"memory":0.641}
{"time":"2013-01-02T08:54:14.000Z","cpu":0.6028,"memory":0.6452}
{"time":"2013-01-02T08:54:06.000Z","cpu":0.5565,"memory":0.4346}
{"time":"2013-01-02T08:54:10.000Z","cpu":0.4161,"memory":0.358}
{"time":"2013-01-02T08:55:01.000Z","cpu":0.5256,"memory":0.5969}
{"time":"2013-01-02T08:55:47.000Z","cpu":0.6145,"memory":0.3213}
{"time":"2013-01-02T08:56:24.000Z","cpu":0.6896,"memory":0.5109}
{"time":"2013-01-02T08:56:35.000Z","cpu":0.443,"memory":0.633}
{"time":"2013-01-02T08:56:11.000Z","cpu":0.4746,"memory":0.4777}
{"time":"2013-01-02T08:56:42.000Z","cpu":0.503,"memory":0.5732}
{"time":"2013-01-02T08:56:38.000Z","cpu":0.4731,"memory":0.4024}
{"time":"2013-01-02T08:57:01.000Z","cpu":0.405,"memory":0.5203}
{"time":"2013-01-02T08:57:54.000Z","cpu":0.4496,"memory":0.5324}
{"time":"2013-01-02T08:57:04.000Z","cpu":0.3528,"memory":0.3145}
{"time":"2013-01-02T08:57:49.000Z","cpu":0.6659,"memory":0.4285}
{"time":"2013-01-02T08:57:19.000Z","cpu":0.3237,"memory":0.6979}
{"time":"2013-01-02T08:58:31.000Z","cpu":0.4045,"memory":0.6581}
{"time":"2013-01-02T08:58:45.000Z","cpu":0.3134,"memory":0.3261}
{"time":"2013-01-02T08:58:44.000Z","cpu":0.4382,"memory":0.419}
{"time":"2013-01-02T08:58:38.000Z","cpu":0.6983,"memory":0.3493}
{"time":"2013-01-02T08:58:34.000Z","cpu":0.6645,"memory":0.6272}
{"time":"2013-01-02T08:59:54.000Z","cpu":0.604,"memory":0.3287}
{"time":"2013-01-02T08:59:25.000Z","cpu":0.574,"memory":0.4856}
{"time":"2013-01-02T08:59:19.000Z","cpu":0.4775,"memory":0.3998}
{"time":"2013-01-02T08:59:34.000Z","cpu":0.5047,"memory":0.6702}
{"time":"2013-01-02T08:59:46.000Z","cpu":0.672,"memory":0.5021}
{"time":"2013-01-02T08:59:53.000Z","cpu":0.3278,"memory":0.6679}
{"time":"2013-01-02T08:59:29.000Z","cpu":0.4494,"memory":0.3319}
21
Summarize with Series.js
Series.y((d)-> d.cpu).aggregation(Series.sum)
.minute((d)-> d.time)(data)
#=> [{ t: 'Sun Jan 13 2013 23:29:00 GMT+0900 (JST)', y: 2.0095 },
{ t: 'Sun Jan 13 2013 23:30:00 GMT+0900 (JST)', y: 3.4370 },
{ t: 'Sun Jan 13 2013 23:31:00 GMT+0900 (JST)', y: 1.58180 },
{ t: 'Sun Jan 13 2013 23:32:00 GMT+0900 (JST)', y: 2.2742 },
{ t: 'Sun Jan 13 2013 23:33:00 GMT+0900 (JST)', y: 3.4541 },
{ t: 'Sun Jan 13 2013 23:34:00 GMT+0900 (JST)', y: 4.6035 },
{ t: 'Sun Jan 13 2013 23:35:00 GMT+0900 (JST)', y: 2.1165 },
{ t: 'Sun Jan 13 2013 23:36:00 GMT+0900 (JST)', y: 1.6177 },
22
TODO
Performance
Refactoring
Document
23
TODO
Client side
24
TODO
Client side
さっきpushしました
25
CROSS 2014
26
以下、ビールを飲んで
笑顔な技術者の顔が
続いていると
思ってください
27

More Related Content

PDF
Goal Based Data Production with Sim Simeonov
Databricks
 
PDF
D3.js workshop
Anton Katunin
 
PDF
Introduction to d3js (and SVG)
zahid-mian
 
PDF
집단지성 프로그래밍 08-가격모델링
Kwang Woo NAM
 
PDF
THE DATA DRIVEN WEB OF NOW: EXTENDING D3JS (Travis Smith)
Future Insights
 
DOCX
WOTC_Import
Luther Quinn
 
PDF
NLP on a Billion Documents: Scalable Machine Learning with Apache Spark
Martin Goodson
 
PPTX
D3js learning tips
LearningTech
 
Goal Based Data Production with Sim Simeonov
Databricks
 
D3.js workshop
Anton Katunin
 
Introduction to d3js (and SVG)
zahid-mian
 
집단지성 프로그래밍 08-가격모델링
Kwang Woo NAM
 
THE DATA DRIVEN WEB OF NOW: EXTENDING D3JS (Travis Smith)
Future Insights
 
WOTC_Import
Luther Quinn
 
NLP on a Billion Documents: Scalable Machine Learning with Apache Spark
Martin Goodson
 
D3js learning tips
LearningTech
 

What's hot (20)

PDF
Accelerating Local Search with PostgreSQL (KNN-Search)
Jonathan Katz
 
PDF
Optimizing Slow Queries with Indexes and Creativity
MongoDB
 
PDF
Apache Spark - Key Value RDD - Transformations | Big Data Hadoop Spark Tutori...
CloudxLab
 
PDF
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
MongoSF
 
PPTX
Machine Learning with Microsoft Azure
Dmitry Petukhov
 
PDF
Martin Fowler's Refactoring Techniques Quick Reference
Seung-Bum Lee
 
PDF
GeoMesa on Apache Spark SQL with Anthony Fox
Databricks
 
PPTX
MongoDB 3.2 - Analytics
Massimo Brignoli
 
PDF
Cascading Through Hadoop for the Boulder JUG
Matthew McCullough
 
PPTX
MongoDB - Back to Basics - La tua prima Applicazione
Massimo Brignoli
 
PPTX
Using Arbor/ RGraph JS libaries for Data Visualisation
Alex Hardman
 
PDF
Is HTML5 Ready? (workshop)
Remy Sharp
 
PPTX
Should I Use Scalding or Scoobi or Scrunch?
DataWorks Summit
 
PDF
HDTR images with Photoshop Javascript Scripting
David Gómez García
 
PDF
Apache Spark - Key-Value RDD | Big Data Hadoop Spark Tutorial | CloudxLab
CloudxLab
 
PDF
PostgreSQL: Advanced indexing
Hans-Jürgen Schönig
 
PDF
MongoDB Analytics
datablend
 
PDF
Heroku Postgres Cloud Database Webinar
Salesforce Developers
 
DOCX
Dotnet 18
dhruvesh718
 
PPT
Chris Mc Glothen Sql Portfolio
clmcglothen
 
Accelerating Local Search with PostgreSQL (KNN-Search)
Jonathan Katz
 
Optimizing Slow Queries with Indexes and Creativity
MongoDB
 
Apache Spark - Key Value RDD - Transformations | Big Data Hadoop Spark Tutori...
CloudxLab
 
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
MongoSF
 
Machine Learning with Microsoft Azure
Dmitry Petukhov
 
Martin Fowler's Refactoring Techniques Quick Reference
Seung-Bum Lee
 
GeoMesa on Apache Spark SQL with Anthony Fox
Databricks
 
MongoDB 3.2 - Analytics
Massimo Brignoli
 
Cascading Through Hadoop for the Boulder JUG
Matthew McCullough
 
MongoDB - Back to Basics - La tua prima Applicazione
Massimo Brignoli
 
Using Arbor/ RGraph JS libaries for Data Visualisation
Alex Hardman
 
Is HTML5 Ready? (workshop)
Remy Sharp
 
Should I Use Scalding or Scoobi or Scrunch?
DataWorks Summit
 
HDTR images with Photoshop Javascript Scripting
David Gómez García
 
Apache Spark - Key-Value RDD | Big Data Hadoop Spark Tutorial | CloudxLab
CloudxLab
 
PostgreSQL: Advanced indexing
Hans-Jürgen Schönig
 
MongoDB Analytics
datablend
 
Heroku Postgres Cloud Database Webinar
Salesforce Developers
 
Dotnet 18
dhruvesh718
 
Chris Mc Glothen Sql Portfolio
clmcglothen
 
Ad

Viewers also liked (11)

PDF
オレオレMultipleInputを作る方法
Daichi Morifuji
 
PDF
ParamTuner 東京Node学園#8
Daichi Morifuji
 
PDF
BigData Analysis with mongo-hadoop
Daichi Morifuji
 
PPT
企業と勉強会 @nifty エンジニアサポート
Daichi Morifuji
 
PDF
20151030 ux sketch vol5
Daichi Morifuji
 
PDF
Html5j data visualization_and_d3
Daichi Morifuji
 
PDF
Io t縛りの勉強会 #4
Daichi Morifuji
 
PDF
Jubatus casulatalks2
Daichi Morifuji
 
PDF
データ可視化勉強会
Daichi Morifuji
 
PDF
Gtug girls-20140828
Daichi Morifuji
 
PDF
neural network introduction yapc asia tokyo
Daichi Morifuji
 
オレオレMultipleInputを作る方法
Daichi Morifuji
 
ParamTuner 東京Node学園#8
Daichi Morifuji
 
BigData Analysis with mongo-hadoop
Daichi Morifuji
 
企業と勉強会 @nifty エンジニアサポート
Daichi Morifuji
 
20151030 ux sketch vol5
Daichi Morifuji
 
Html5j data visualization_and_d3
Daichi Morifuji
 
Io t縛りの勉強会 #4
Daichi Morifuji
 
Jubatus casulatalks2
Daichi Morifuji
 
データ可視化勉強会
Daichi Morifuji
 
Gtug girls-20140828
Daichi Morifuji
 
neural network introduction yapc asia tokyo
Daichi Morifuji
 
Ad

Similar to Time Series Analysis by JavaScript LL matsuri 2013 (20)

PDF
Statim, time series interface for Perl.
Thiago Rondon
 
PDF
Mining Transactional and Time Series Data
Brenda Wolfe
 
PDF
Lecture9_Time_Series_2024_and_data_analysis (1).pdf
adiworks30
 
PPTX
D.M time series analysis
Tanishq Soni
 
PPT
Temporal data mining
ReachLocal Services India
 
PPT
20IT501_DWDM_PPT_Unit_V.ppt
PalaniKumarR2
 
PDF
Time Series Analysis_slides.pdf
RohanBorgalli
 
PPT
5.2 mining time series data
Krish_ver2
 
PDF
Time Series Analysis: Techniques for Analyzing Time-Dependent Data
Uncodemy
 
PDF
Making sense of your data jug
Gerald Muecke
 
PDF
[PDF] Visualizing and discovering non trivial patterns in large time-series d...
Quân Lê
 
PDF
Mongo db washington dc 2014
ikanow
 
PPTX
Outlier and fraud detection using Hadoop
Pranab Ghosh
 
PPTX
Lesson 1 introduction_to_time_series
ankit_ppt
 
PDF
Ac26185187
IJERA Editor
 
PDF
Exploring time series analysis: Methods and Classifications
jatniwalafizza786
 
PDF
Visual Exploration of Large Data sets with D3, crossfilter and dc.js
Florian Georg
 
PDF
Articulo temporaldatamining
adolfouex
 
PDF
A Survey on Deep Learning for time series Forecasting
Amal Mahmoud
 
PPTX
Using MongoDB As a Tick Database
MongoDB
 
Statim, time series interface for Perl.
Thiago Rondon
 
Mining Transactional and Time Series Data
Brenda Wolfe
 
Lecture9_Time_Series_2024_and_data_analysis (1).pdf
adiworks30
 
D.M time series analysis
Tanishq Soni
 
Temporal data mining
ReachLocal Services India
 
20IT501_DWDM_PPT_Unit_V.ppt
PalaniKumarR2
 
Time Series Analysis_slides.pdf
RohanBorgalli
 
5.2 mining time series data
Krish_ver2
 
Time Series Analysis: Techniques for Analyzing Time-Dependent Data
Uncodemy
 
Making sense of your data jug
Gerald Muecke
 
[PDF] Visualizing and discovering non trivial patterns in large time-series d...
Quân Lê
 
Mongo db washington dc 2014
ikanow
 
Outlier and fraud detection using Hadoop
Pranab Ghosh
 
Lesson 1 introduction_to_time_series
ankit_ppt
 
Ac26185187
IJERA Editor
 
Exploring time series analysis: Methods and Classifications
jatniwalafizza786
 
Visual Exploration of Large Data sets with D3, crossfilter and dc.js
Florian Georg
 
Articulo temporaldatamining
adolfouex
 
A Survey on Deep Learning for time series Forecasting
Amal Mahmoud
 
Using MongoDB As a Tick Database
MongoDB
 

Recently uploaded (20)

PDF
Software Development Methodologies in 2025
KodekX
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Software Development Methodologies in 2025
KodekX
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
The Future of Artificial Intelligence (AI)
Mukul
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 

Time Series Analysis by JavaScript LL matsuri 2013