Browse Source

limit ourselves to ints for W.. don't need sub-nanowatt precision..

main
John-Mark Gurney 4 years ago
parent
commit
8a06e9cb1b
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      fakedata.py

+ 5
- 0
fakedata.py View File

@@ -156,4 +156,9 @@ for i in arrow.Arrow.range('day', startdate, enddate):
#print(json.dumps(tuple(dist), indent=2))
prodpoints.extend(dist)

for i in { 'prodpoints', 'prodindex', 'conspoints', 'consindex',}:
v = locals()[i]
v = [ (x, int(y)) for x, y in v ]
locals()[i] = v

print('fakedata =', json.dumps(dict(production=prodpoints, prodindex=prodindex, consumption=conspoints, consindex=consindex), default=serializearrowasmili, indent=2))

Loading…
Cancel
Save