コード例 #1
0
ea.hydrology_plot(6, Hawea, "figures/hawea.pdf")
ea.hydrology_plot(6, Hawea, "figures/hawea.png")

ea.hydrology_plot(7, TeAnauManapouri, "figures/teanaumanapouri.pdf")
ea.hydrology_plot(7, TeAnauManapouri, "figures/teanaumanapouri.png")

print "Getting Meridian snow picture"
G = ea.get_web_pics()
G.get_snow_pic()
print "Getting NIWA Rainfall outlook"
G.get_niwa_pic()

print "Getting pricing info from DW - THIS IS SLOW!"
lwaps = ea.get_lwaps(connection)
ea.plot_lwap(8, lwaps, path + "/figures/lwap.pdf")
ea.plot_lwap(8, lwaps, path + "/figures/lwap.png")

# Hedge Market
print "Getting Hedge Market data"
os.chdir("/home/dave/python/asx")

CQ = ea.current_quarter()
# Convert hdf5 data to pickled data
BEN_ZFT = pd.read_hdf("asx_futures.h5", "BEN_ZFT")
OTA_ZFT = pd.read_hdf("asx_futures.h5", "OTA_ZFT")
BEN_ZFT.to_pickle("BEN_ZFT.pickle")
OTA_ZFT.to_pickle("OTA_ZFT.pickle")
# Read the pickled data
ben = pd.read_pickle("BEN_ZFT.pickle")
ota = pd.read_pickle("OTA_ZFT.pickle")