<jupyter_start><jupyter_text>Data SetupIn this notebook, we demonstrate how to:- setup time series data for this tutorial- visualize the dataThe data in this example is taken from the GEFCom2014 forecasting competition1. It consists of 3 years of hourly electricity load and temperature values between 2012 and 2014. 1<NAME>, <NAME>, <NAME>, <NAME>, <NAME> and <NAME>, "Probabilistic energy forecasting: Global Energy Forecasting Competition 2014 and beyond", International Journal of Forecasting, vol.32, no.3, pp 896-913, July-September, 2016.<jupyter_code>import os
import matplotlib.pyplot as plt
from common.utils import load_data
from common.extract_data import extract_data
%matplotlib inline<jupyter_output><empty_output><jupyter_text>Download the data. (Note: The following code is designed to run on Azure Notebook. If you are using this notebook in a different environment, you will need to mofidy the code.)<jupyter_code>data_dir = './data'

if not os.path.exists(os.path.join(data_dir, 'energy.csv')):
    # Download and move the zip file
    !wget https://www.dropbox.com/s/pqenrr2mcvl0hk9/GEFCom2014.zip
    !mv GEFCom2014.zip ./data
    # If not done already, extract zipped data and save as csv
    extract_data(data_dir)<jupyter_output>--2021-05-03 10:19:10--  https://www.dropbox.com/s/pqenrr2mcvl0hk9/GEFCom2014.zip
Resolving www.dropbox.com (www.dropbox.com)... 172.16.31.10, fc00:db20:35b:7399::5:5112
Connecting to www.dropbox.com (www.dropbox.com)|172.16.31.10|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: /s/raw/pqenrr2mcvl0hk9/GEFCom2014.zip [following]
--2021-05-03 10:19:10--  https://www.dropbox.com/s/raw/pqenrr2mcvl0hk9/GEFCom2014.zip
Reusing existing connection to www.dropbox.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://uc8dc753ebdf599e678eac40a9ce.dl.dropboxusercontent.com/cd/0/inline/BNwk25ItWkZNqHAELWk8RxA94tt9AZ-bpt9Ji15dT9rnLvdjANFXh1gYOuRPq2bdz68ZpZZeoYyzefYLr0gHWqLzX8M6Gc_GFMgvVCOX-hWKDgK3evCIzZpuYy4a95t42j3APtz8KiBImL9VvLIPo3Ls/file# [following]
--2021-05-03 10:19:11--  https://uc8dc753ebdf599e678eac40a9ce.dl.dropboxusercontent.com/cd/0/inline/BNwk25ItWkZNqHAELWk8RxA94tt9AZ-bpt9Ji15dT9rnLvdjANFXh1gYOuRPq2bdz68ZpZZeoYyzefYLr[...]<jupyter_text>Load the data from csv into a Pandas dataframe<jupyter_code>energy = load_data(data_dir)[['load']]
energy.head()
energy['load']<jupyter_output><empty_output><jupyter_text>Plot all available load data (January 2012 to Dec 2014)<jupyter_code>energy.plot(y='load', subplots=True, figsize=(15, 8), fontsize=12)
plt.xlabel('timestamp', fontsize=12)
plt.ylabel('load', fontsize=12)
plt.show()<jupyter_output><empty_output><jupyter_text>Plot first week of July 2014<jupyter_code>energy['2014-07-01':'2014-07-07']
energy['2014-07-01':'2014-07-07'].plot(y='load', subplots=True, figsize=(15, 8), fontsize=12)
plt.xlabel('timestamp', fontsize=12)
plt.ylabel('load', fontsize=12)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12084592145015106, 'fraction_numerical': 0.094662638469285, 'mean_word_length': 6.3399014778325125, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 5, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '281594', 'license': 'MIT', 'n_tokens_mistral': 1335, 'n_tokens_neox': 1133, 'n_words': 233, 'path': '0_data_setup.ipynb', 'repo_name': 'barmanroys/DeepLearningForTimeSeriesForecasting', 'size': '3023'}