--- title: GEFCom 2014 dataset keywords: fastai sidebar: home_sidebar summary: "Download the GEFCom 2024 dataset." description: "Download the GEFCom 2024 dataset." nb_path: "nbs/data_datasets__gefcom2014.ipynb" ---
import matplotlib.pyplot as plt
from matplotlib import rcParams
plt.rcParams['font.family'] = 'serif'
FONTSIZE = 22
GEFCom2014.download(f'data')
Y_df, X_df, benchmark_df = GEFCom2014_L.load(directory='data', group='Task 14')
#ds = Y_df.ds.values[365*24:]
#y_true = Y_df.y.values[365*24:]
ds = Y_df.ds.values[-740:]
y_true = Y_df.y.values[-740:]
x_plot = Y_df.ds.values
x_plot_min = pd.to_datetime(x_plot.min()).strftime('%B %d, %Y')
x_plot_max = pd.to_datetime(x_plot.max()).strftime('%B %d, %Y')
x_axis_str = f'Hours [{x_plot_min} to {x_plot_max}]'
y_axis_str = 'Load (MW)'
fig = plt.figure(figsize=(15, 4))
fig.tight_layout()
ax0 = plt.subplot2grid((1,1),(0, 0))
axs = [ax0]
axs[0].plot(ds, y_true, color='#628793', linewidth=0.4, label='true')
axs[0].tick_params(labelsize=FONTSIZE-5)
axs[0].set_xlabel(x_axis_str, fontsize=FONTSIZE)
axs[0].set_ylabel(y_axis_str, fontsize=FONTSIZE)
plt.ylim(50, 350)
plt.title('GEFCom2014-L', fontsize=FONTSIZE)
plt.grid()
plt.show()
Y_df, X_df = GEFCom2014_E.load(directory='data')
ds = Y_df.ds.values
y_true = Y_df.y.values
x_plot = Y_df.ds.values
x_plot_min = pd.to_datetime(x_plot.min()).strftime('%B %d, %Y')
x_plot_max = pd.to_datetime(x_plot.max()).strftime('%B %d, %Y')
x_axis_str = f'Hours [{x_plot_min} to {x_plot_max}]'
y_axis_str = 'Load (MW)'
fig = plt.figure(figsize=(15, 4))
fig.tight_layout()
ax0 = plt.subplot2grid((1,1),(0, 0))
axs = [ax0]
axs[0].plot(ds, y_true, color='#628793', linewidth=0.4, label='true')
axs[0].tick_params(labelsize=FONTSIZE-5)
axs[0].set_xlabel(x_axis_str, fontsize=FONTSIZE)
axs[0].set_ylabel(y_axis_str, fontsize=FONTSIZE)
plt.ylim(1800, 5800)
plt.title('GEFCom2014-E', fontsize=FONTSIZE)
plt.grid()
plt.show()
Y_df, X_df, benchmark_df = GEFCom2014_P.load(directory='data', group='Task 15')
ds = Y_df.ds.values
y_true = Y_df.y.values
x_plot = Y_df.ds.values
x_plot_min = pd.to_datetime(x_plot.min()).strftime('%B %d, %Y')
x_plot_max = pd.to_datetime(x_plot.max()).strftime('%B %d, %Y')
x_axis_str = f'Hours [{x_plot_min} to {x_plot_max}]'
y_axis_str = 'Price [USD/MWh]'
fig = plt.figure(figsize=(15, 4))
fig.tight_layout()
ax0 = plt.subplot2grid((1,1),(0, 0))
axs = [ax0]
axs[0].plot(ds, y_true, color='#628793', linewidth=0.4, label='true')
axs[0].tick_params(labelsize=FONTSIZE-5)
axs[0].set_xlabel(x_axis_str, fontsize=FONTSIZE)
axs[0].set_ylabel(y_axis_str, fontsize=FONTSIZE)
plt.title('GEFCom2014-P', fontsize=FONTSIZE)
plt.grid()
plt.show()
Y_df, X_df, benchmark_df = GEFCom2014_W.load(directory='data', group='Task 15')
Y_df = Y_df[Y_df.unique_id==2]
ds = Y_df.ds.values
y_true = Y_df.y.values
x_plot = Y_df.ds.values
x_plot_min = pd.to_datetime(x_plot.min()).strftime('%B %d, %Y')
x_plot_max = pd.to_datetime(x_plot.max()).strftime('%B %d, %Y')
x_axis_str = f'Hours [{x_plot_min} to {x_plot_max}]'
y_axis_str = 'Power'
fig = plt.figure(figsize=(15, 4))
fig.tight_layout()
ax0 = plt.subplot2grid((1,1),(0, 0))
axs = [ax0]
axs[0].plot(ds, y_true, color='#628793', linewidth=0.4, label='true')
axs[0].tick_params(labelsize=FONTSIZE-5)
axs[0].set_xlabel(x_axis_str, fontsize=FONTSIZE)
axs[0].set_ylabel(y_axis_str, fontsize=FONTSIZE)
plt.title('GEFCom2014-W', fontsize=FONTSIZE)
plt.grid()
plt.show()
Y_df, X_df, benchmark_df = GEFCom2014_S.load(directory='data', group='Task 15')
Y_df = Y_df[Y_df.unique_id==2]
ds = Y_df.ds.values
y_true = Y_df.y.values
x_plot = Y_df.ds.values
x_plot_min = pd.to_datetime(x_plot.min()).strftime('%B %d, %Y')
x_plot_max = pd.to_datetime(x_plot.max()).strftime('%B %d, %Y')
x_axis_str = f'Hours [{x_plot_min} to {x_plot_max}]'
y_axis_str = 'Power'
fig = plt.figure(figsize=(15, 4))
fig.tight_layout()
ax0 = plt.subplot2grid((1,1),(0, 0))
axs = [ax0]
axs[0].plot(ds, y_true, color='#628793', linewidth=0.4, label='true')
axs[0].tick_params(labelsize=FONTSIZE-5)
axs[0].set_xlabel(x_axis_str, fontsize=FONTSIZE)
axs[0].set_ylabel(y_axis_str, fontsize=FONTSIZE)
plt.title('GEFCom2014-S', fontsize=FONTSIZE)
plt.grid()
plt.show()