Esempio n. 1
0
 def plot_prod_vs_dem(self, prodtot=None, demanda=None):
     # Plot Producción total vs Demanda
     datos_plot = data if data is not None else self.data
     # TODO Arreglar plot prod vs dem
     rdp.plot_prod_vs_dem(prodtot, demanda)
Esempio n. 2
0
DATA.info_data(dfcambio)
dfcambio.plot()
# print df0.dem['2007-10-28 1:00':'2007-10-28 4:00']
# print pd.Timestamp('2007-10-30').weekday()

str_dia = '2007-10-26'
print df0.columns
print df0.ix[0]
prod = df0[COLS_PROD]
prodtot = prod.sum(axis=1)
exceso = prod.sum(axis=1) - df0.dem
# print prodtot.head(), prodtot.tail() #print df0.dem.head(), df0.dem.tail()
print exceso.head(), exceso.tail()

# Plot Producción total vs Demanda
rdp.plot_prod_vs_dem(prodtot, df0.dem)

# Plot Ajuste entre Producción total y Demanda
rdp.plot_ajuste_prod_dem(prodtot, exceso)

# Plot Producción por tipos
rdp.plot_tipos_prod(df0, cols_prod=COLS_PROD)

# Plot Stack Producción por tipos
rdp.plotarea_stack_tipos_prod(df0, cols_prod=COLS_PROD)

idx_utc = data.index.tz_convert('UTC')
tt = idx_utc.values
delta = tt[1:] - tt[:-1]
delta.dtype = np.int64
delta /= 1e9 * TS_DATA
Esempio n. 3
0
# print df0.dem['2007-10-28 1:00':'2007-10-28 4:00']
# print pd.Timestamp('2007-10-30').weekday()


str_dia = '2007-10-26'
print df0.columns
print df0.ix[0]
prod = df0[COLS_PROD]
prodtot = prod.sum(axis=1)
exceso = prod.sum(axis=1) - df0.dem
# print prodtot.head(), prodtot.tail() #print df0.dem.head(), df0.dem.tail()
print exceso.head(), exceso.tail()


# Plot Producción total vs Demanda
rdp.plot_prod_vs_dem(prodtot, df0.dem)

# Plot Ajuste entre Producción total y Demanda
rdp.plot_ajuste_prod_dem(prodtot, exceso)

# Plot Producción por tipos
rdp.plot_tipos_prod(df0, cols_prod=COLS_PROD)

# Plot Stack Producción por tipos
rdp.plotarea_stack_tipos_prod(df0, cols_prod=COLS_PROD)

idx_utc = data.index.tz_convert('UTC')
tt = idx_utc.values
delta = tt[1:] - tt[:-1]
delta.dtype = np.int64
delta /= 1e9 * TS_DATA