18 lines
708 B
Python
18 lines
708 B
Python
|
import numpy as np
|
||
|
import pandas as pd
|
||
|
import requests
|
||
|
|
||
|
def getTimeSeries(set = 'NN3', series = '007'):
|
||
|
response = requests.get('http://time-series.athene.tech/api/1.0/get-time-series',
|
||
|
params={'setKey': set, 'timeSeriesKey': series})
|
||
|
return pd.DataFrame.from_dict(response.json().get('values'))
|
||
|
|
||
|
#not work
|
||
|
def getTimeSeriesSmooth():
|
||
|
response = requests.post('http://time-series.athene.tech/api/1.0/getSpecificMethodSmoothed',
|
||
|
data={'originalTimeSeries': set, 'timeSeriesKey': series})
|
||
|
return pd.DataFrame.from_dict(response.json().get('values'))
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
data = getTimeSeries()
|
||
|
print("Done")
|