Sampling from Database (Making Type 1)
This page is the story how to get
sensor data
from the
database
by
sampling
.
I call "type 1" for such data.
If there is ten years sensor data of voltage data by every 1 second.
It means that there are about 300,000,000 samples.
60 seconds * 60 minutes * 24 hours * 10 ten years = 31560000.
I think that 10,000 is the good size to analyze the data by graphs.
In my experience, most of data analysis is done by the analysis of 10,000 samples data.
Way to Sample
The best way is different by the purpose of the analysis.
I show some examples of sampling.
-
Getting Every 30,000 seconds
:
This way is to study the change in 10 years.
300,000,000 / 10,000 = 30,000
30,000 seconds is about 8 hours.
8 hours may be the working time of operators.
So if there are the cyclic changes by 8 hours.
This sampling may lead the wrong understanding of the data.
-
Random sampling
:
This is also to study the change in 10 years.
There are not cyclic effects.
But we often want to know by the knowledge by equal period.
-
Every 1 second for only yesterday
:
This way is used in the case that we want to know the time of machine broken.
-
Every 1 minute for January 1 of every year
60 minutes * 24 hours * 10 years = 14400
We get 14400 samples.
This way is used we want to know the change by 1 minutes for ten years.
NEXT Analysis of Type 1