by hbcondo714 · 2y ago · 0 comments
I inherited a large time series JSON dataset in 2024. I've been successful in using the Observable Framework[1] by writing a Rust (rust-script) data loader[2] to parse and plot simple line charts[3] to visually see the data. There are hundreds of graphs over years of data so I would like to identify what graphs I should be paying attention to. My initial thought is to calculate metrics on each graph such as:
- Variability: how "spread out" are the data points from one another?
- Trend: direction of data path, up or down?
- Slope: are the data points increasing or decreasing?
- Level: where are the data points on the vertical axis?
What libraries, AI, databases, etc... would you recommend that would allow me to calculate these values? I am no data scientist and don't need forecasting but overall, I just want a dashboard that shows the most "important" graphs.[1] https://observablehq.com/framework/
[2] https://observablehq.com/framework/loaders
[3] https://observablehq.com/@observablehq/plot-simple-line-char...
edit: the x-axis is Time while the y-axis can be values such as duration, frequency, intervals
[0] https://rc2e.com/timeseriesanalysis [1] https://otexts.com/fpp2/
Third edition: https://otexts.com/fpp3/
I already added linear regression marks that draws linear regression lines with confidence bands[1] to my Observable plots but they do not give me a “value” so I need to manually look at the graphs and read the red line.
Load you time serie in a dataframe, and:
> - Variability: how "spread out" are the data points from one another?
So basically df.std(), with rolling variants for short term / long term.
> - Trend: direction of data path, up or down? - Slope: are the data points increasing or decreasing?
Just do a simple rolling linear regression of your data point against time.