https://github.com/outerbounds/metaflow-card-uplot
Metaflow card to visualize pandas timeseries using Uplot
https://github.com/outerbounds/metaflow-card-uplot
Last synced: over 1 year ago
JSON representation
Metaflow card to visualize pandas timeseries using Uplot
- Host: GitHub
- URL: https://github.com/outerbounds/metaflow-card-uplot
- Owner: outerbounds
- Created: 2022-01-25T21:41:45.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-25T22:37:52.000Z (over 4 years ago)
- Last Synced: 2025-01-06T08:17:50.606Z (over 1 year ago)
- Language: Python
- Size: 27.3 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Metaflow Card To Plot Timeseries
## Usage
- Install this card using `pip install metaflow-card-uplot`
- Usage in `@step` code:
```python
@card(type='uplot',options={"artifact":"timeseries"})
@step
def start(self):
import pandas
index = pandas.date_range("2022-01-01", periods=60, freq="Min")
series = {
'first': self._fake_series(len(index), 0.1),
'second': self._fake_series(len(index), 1)
}
self.timeseries = pandas.DataFrame(series, index=index)
self.next(self.end)
def _fake_series(self, n, g):
return [(random.random() - 0.5) * 0.1 + math.sin(x * g) for x in range(n)]
```