Skip to content

Commit

Permalink
setup fake test data
Browse files Browse the repository at this point in the history
  • Loading branch information
jarq6c committed Feb 6, 2025
1 parent 0368487 commit 23a823c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion python/metrics/main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
import numpy as np
import pandas as pd

from time import perf_counter

def main():
...
rng = np.random.default_rng()
streamflow = pd.DataFrame(
{
"value_time": pd.date_range("2020-10-01", freq="1h", periods=100),
"value": rng.uniform(0.0, 1000.0, 100)
}
)
events = pd.DataFrame(
{
"start": np.random.choice(streamflow["value_time"], 10, replace=False)
}
)
events["end"] = events["start"].add(pd.Timedelta("1d"))

print(events.head())

if __name__ == "__main__":
main()

0 comments on commit 23a823c

Please sign in to comment.