Ejemplo n.º 1
0
 def plotarea_stack_tipos_prod(self, data=None, cols_prod=COLS_PROD):
     # Plot Stack Producción por tipos
     datos_plot = data if data is not None else self.data
     rdp.plotarea_stack_tipos_prod(datos_plot, cols_prod)
Ejemplo n.º 2
0
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
data['delta_T'] = pd.Series(data=delta, index=data.index[1:])
data.delta_T.fillna(1, inplace=True)

idx_desconex = data.delta_T > 1
fechas_desconex = [
    ed.to_datetime() for ed in data.index[idx_desconex].tolist()
]
errores = pd.DataFrame(data={
    'anyo': [f.year for f in fechas_desconex],
Ejemplo n.º 3
0
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
data['delta_T'] = pd.Series(data=delta, index=data.index[1:])
data.delta_T.fillna(1, inplace=True)

idx_desconex = data.delta_T > 1
fechas_desconex = [ed.to_datetime() for ed in data.index[idx_desconex].tolist()]
errores = pd.DataFrame(data={'anyo': [f.year for f in fechas_desconex],
                             'mes': [f.month for f in fechas_desconex],
                             'dia': [f.day for f in fechas_desconex],
                             'hora': [f.hour for f in fechas_desconex],