{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Alaska Energy Data Site\n",
    "\n",
    "## URL: ak-energy-data.analysisnorth.com"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This site provides a number of different data sets related to Alaskan energy use.  They are primarily useful for creating energy models that require weather data and fuel/utility costs.  Much of the data comes from the [AkWarm Energy Modeling software](http://analysisnorth.com/AkWarm/AkWarm2download.html).  There are\n",
    "two types of files on the site: \n",
    "\n",
    "1. the raw, source data files that contain the original data. These files are found in the `raw`\n",
    "subdirectory; and \n",
    "\n",
    "2. files that contain data processed from the original files. These files are found in the `proc`\n",
    "subdirectory. The processing often selects out a\n",
    "subset of fields and sometimes combines datasets together. The processed data is typically in two formats:\n",
    "a pickled and compressed (bz2) Python Pandas DataFrame, and a standard CSV file.  Info on using the Pandas\n",
    "format is below.\n",
    "\n",
    "You can access any of the data files by simply downloading them in your browser \n",
    "or another tool that can make HTTP requests.  The file names and directory paths are indicated in the various\n",
    "sections below.  You can also access the files via programming code, and examples are given below using the\n",
    "Python language. You can download this [Jupyter Notebook](http://jupyter.org/) and execute the sample code \n",
    "provided below to experiment with accessing the data.\n",
    "[Here is the link](http://ak-energy-data.analysisnorth.com/index.ipynb) to download this notebook.\n",
    "You will need Python 3.6+ installed to execute the code.\n",
    "\n",
    "To see the code that was used to process the raw data into processed files, see\n",
    "[this Notebook on the associated GitHub Site](https://github.com/alanmitchell/ak-energy-admin/blob/master/ak-energy-data-admin.ipynb)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Execute this cell prior to any of the cells below\n",
    "import urllib\n",
    "import io\n",
    "import pandas as pd\n",
    "import requests"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Functions that Retrieve Data as a Pandas DataFrame or a CSV File\n",
    "\n",
    "These Python functions can be used to retrieve the processed data on the site, either as\n",
    "a Pandas DataFrame or as CSV text."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "base_url = 'http://ak-energy-data.analysisnorth.com/'\n",
    "\n",
    "def get_df(file_path):\n",
    "    \"\"\"Returns a Pandas DataFrame that is found at the 'file_path'\n",
    "    below the Base URL for accessing data.  The 'file_path' should end\n",
    "    with '.pkl' and points to a pickled, compressed (bz2), Pandas DataFrame.\n",
    "    \"\"\"\n",
    "    b = requests.get(urllib.parse.urljoin(base_url, file_path)).content\n",
    "    df = pd.read_pickle(io.BytesIO(b), compression='bz2')\n",
    "    return df\n",
    "\n",
    "def get_csv(file_path):\n",
    "    \"\"\"Returns a string in CSV format that is found at the 'file_path'\n",
    "    below the Base URL for accessing data.  The 'file_path' should end\n",
    "    with '.csv' and points to a CSV data file.\n",
    "    \"\"\"\n",
    "    txt = requests.get(urllib.parse.urljoin(base_url, file_path)).text\n",
    "    return txt\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Accessing City and Utility Data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Here are the data files available having City and Utility Data.  The files in the `city-util/proc`\n",
    "directory contain processed data derived from data in the files found in the `city-util/raw`\n",
    "directory.\n",
    "\n",
    "```\n",
    "├── city-util\n",
    "│   ├── proc\n",
    "│   │   ├── city.csv\n",
    "│   │   ├── city.pkl\n",
    "│   │   ├── misc_info.csv\n",
    "│   │   ├── misc_info.pkl\n",
    "│   │   ├── utility.csv\n",
    "│   │   └── utility.pkl\n",
    "│   └── raw\n",
    "│       ├── City Utility Links.xlsx\n",
    "│       ├── City.xlsx\n",
    "│       ├── Misc Info.xlsx\n",
    "│       └── Utility.xlsx\n",
    "\n",
    "```\n",
    "\n",
    "For example, browser access to the `utility.csv` file would be:\n",
    "`http://ak-energy-data.analysisnorth.com/city-util/proc/utility.csv`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Access City Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Name</th>\n",
       "      <th>Latitude</th>\n",
       "      <th>Longitude</th>\n",
       "      <th>ERHRegionID</th>\n",
       "      <th>WAPRegionID</th>\n",
       "      <th>ImpCost</th>\n",
       "      <th>FuelRefer</th>\n",
       "      <th>FuelCityID</th>\n",
       "      <th>Oil1Price</th>\n",
       "      <th>Oil2Price</th>\n",
       "      <th>...</th>\n",
       "      <th>TMYname</th>\n",
       "      <th>ElecUtilities</th>\n",
       "      <th>GasPrice</th>\n",
       "      <th>aris_city</th>\n",
       "      <th>census_city</th>\n",
       "      <th>census_area</th>\n",
       "      <th>ancsa_region</th>\n",
       "      <th>railbelt</th>\n",
       "      <th>hub</th>\n",
       "      <th>avg_elec_usage</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ID</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Anchorage</td>\n",
       "      <td>61.151958</td>\n",
       "      <td>-149.864105</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3.08</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>ANCHORAGE INTL AP, AK</td>\n",
       "      <td>[(Anchorage ML&amp;P - Residential, 2), (Anchorage...</td>\n",
       "      <td>0.93955</td>\n",
       "      <td>Anchorage</td>\n",
       "      <td>Anchorage municipality</td>\n",
       "      <td>Anchorage municipality</td>\n",
       "      <td>Cook Inlet Regional (CIRI)</td>\n",
       "      <td>Railbelt</td>\n",
       "      <td>True</td>\n",
       "      <td>[674.3176110825001, 616.54369648225, 568.80201...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Adak</td>\n",
       "      <td>51.848896</td>\n",
       "      <td>-176.635422</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.42</td>\n",
       "      <td>4.69</td>\n",
       "      <td>...</td>\n",
       "      <td>ADAK NAS, AK</td>\n",
       "      <td>[(Adak -TDX Residential, 677), (Adak - TDX Com...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Adak</td>\n",
       "      <td>Adak city</td>\n",
       "      <td>Aleutians West Census Area</td>\n",
       "      <td>Aleut</td>\n",
       "      <td>Affordable Energy Strategy Area</td>\n",
       "      <td>False</td>\n",
       "      <td>[471.936998147, 423.45531781, 460.81549341, 42...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Akutan</td>\n",
       "      <td>54.134945</td>\n",
       "      <td>-165.772446</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.91</td>\n",
       "      <td>2.91</td>\n",
       "      <td>...</td>\n",
       "      <td>DUTCH HARBOR, AK</td>\n",
       "      <td>[(Akutan, City of - Residential, 9), (Akutan, ...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Akutan</td>\n",
       "      <td>Akutan city</td>\n",
       "      <td>Aleutians East Borough</td>\n",
       "      <td>Aleut</td>\n",
       "      <td>Affordable Energy Strategy Area</td>\n",
       "      <td>False</td>\n",
       "      <td>[500.99156233, 439.98431584599996, 456.5106555...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Allakaket</td>\n",
       "      <td>66.561386</td>\n",
       "      <td>-152.649445</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>5.50</td>\n",
       "      <td>NaN</td>\n",
       "      <td>...</td>\n",
       "      <td>BETTLES FIELD, AK</td>\n",
       "      <td>[(Allakaket - APT - Residential, 249), (Allaka...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Allakaket</td>\n",
       "      <td>Allakaket city</td>\n",
       "      <td>Yukon-Koyukuk Census Area</td>\n",
       "      <td>Doyon</td>\n",
       "      <td>Affordable Energy Strategy Area</td>\n",
       "      <td>False</td>\n",
       "      <td>[338.509000744, 291.889556239, 276.804469551, ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Angoon</td>\n",
       "      <td>57.496647</td>\n",
       "      <td>-134.578903</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.10</td>\n",
       "      <td>4.08</td>\n",
       "      <td>...</td>\n",
       "      <td>SITKA JAPONSKI AP, AK</td>\n",
       "      <td>[(Inside Passage Electric Coop - Residential, ...</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Angoon</td>\n",
       "      <td>Angoon city</td>\n",
       "      <td>Hoonah-Angoon Census Area</td>\n",
       "      <td>Sealaska Corporation</td>\n",
       "      <td>Affordable Energy Strategy Area</td>\n",
       "      <td>False</td>\n",
       "      <td>[277.08055898099997, 257.757954545, 237.155612...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 29 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         Name   Latitude   Longitude  ERHRegionID  WAPRegionID  ImpCost  \\\n",
       "ID                                                                        \n",
       "1   Anchorage  61.151958 -149.864105            2            2        1   \n",
       "2        Adak  51.848896 -176.635422            2            3        5   \n",
       "3      Akutan  54.134945 -165.772446            2            3        5   \n",
       "4   Allakaket  66.561386 -152.649445            4            4        5   \n",
       "5      Angoon  57.496647 -134.578903            1            1        3   \n",
       "\n",
       "    FuelRefer  FuelCityID  Oil1Price  Oil2Price  \\\n",
       "ID                                                \n",
       "1       False         NaN       3.08        NaN   \n",
       "2       False         NaN       4.42       4.69   \n",
       "3       False         NaN       2.91       2.91   \n",
       "4       False         NaN       5.50        NaN   \n",
       "5       False         NaN       4.10       4.08   \n",
       "\n",
       "                          ...                                        TMYname  \\\n",
       "ID                        ...                                                  \n",
       "1                         ...                          ANCHORAGE INTL AP, AK   \n",
       "2                         ...                                   ADAK NAS, AK   \n",
       "3                         ...                               DUTCH HARBOR, AK   \n",
       "4                         ...                              BETTLES FIELD, AK   \n",
       "5                         ...                          SITKA JAPONSKI AP, AK   \n",
       "\n",
       "                                        ElecUtilities  GasPrice  aris_city  \\\n",
       "ID                                                                           \n",
       "1   [(Anchorage ML&P - Residential, 2), (Anchorage...   0.93955  Anchorage   \n",
       "2   [(Adak -TDX Residential, 677), (Adak - TDX Com...       NaN       Adak   \n",
       "3   [(Akutan, City of - Residential, 9), (Akutan, ...       NaN     Akutan   \n",
       "4   [(Allakaket - APT - Residential, 249), (Allaka...       NaN  Allakaket   \n",
       "5   [(Inside Passage Electric Coop - Residential, ...       NaN     Angoon   \n",
       "\n",
       "               census_city                 census_area  \\\n",
       "ID                                                       \n",
       "1   Anchorage municipality      Anchorage municipality   \n",
       "2                Adak city  Aleutians West Census Area   \n",
       "3              Akutan city      Aleutians East Borough   \n",
       "4           Allakaket city   Yukon-Koyukuk Census Area   \n",
       "5              Angoon city   Hoonah-Angoon Census Area   \n",
       "\n",
       "                  ancsa_region                         railbelt    hub  \\\n",
       "ID                                                                       \n",
       "1   Cook Inlet Regional (CIRI)                         Railbelt   True   \n",
       "2                        Aleut  Affordable Energy Strategy Area  False   \n",
       "3                        Aleut  Affordable Energy Strategy Area  False   \n",
       "4                        Doyon  Affordable Energy Strategy Area  False   \n",
       "5         Sealaska Corporation  Affordable Energy Strategy Area  False   \n",
       "\n",
       "                                       avg_elec_usage  \n",
       "ID                                                     \n",
       "1   [674.3176110825001, 616.54369648225, 568.80201...  \n",
       "2   [471.936998147, 423.45531781, 460.81549341, 42...  \n",
       "3   [500.99156233, 439.98431584599996, 456.5106555...  \n",
       "4   [338.509000744, 291.889556239, 276.804469551, ...  \n",
       "5   [277.08055898099997, 257.757954545, 237.155612...  \n",
       "\n",
       "[5 rows x 29 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Access as a Pandas DataFrame\n",
    "df = get_df('city-util/proc/city.pkl')\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Name                                                         Anchorage\n",
       "Latitude                                                        61.152\n",
       "Longitude                                                     -149.864\n",
       "ERHRegionID                                                          2\n",
       "WAPRegionID                                                          2\n",
       "ImpCost                                                              1\n",
       "FuelRefer                                                        False\n",
       "FuelCityID                                                         NaN\n",
       "Oil1Price                                                         3.08\n",
       "Oil2Price                                                          NaN\n",
       "PropanePrice                                                       4.5\n",
       "BirchPrice                                                         325\n",
       "SprucePrice                                                        345\n",
       "CoalPrice                                                          175\n",
       "SteamPrice                                                         NaN\n",
       "HotWaterPrice                                                      NaN\n",
       "MunicipalSalesTax                                                  NaN\n",
       "BoroughSalesTax                                                    NaN\n",
       "TMYid                                                           702730\n",
       "TMYname                                          ANCHORAGE INTL AP, AK\n",
       "ElecUtilities        [(Anchorage ML&P - Residential, 2), (Anchorage...\n",
       "GasPrice                                                       0.93955\n",
       "aris_city                                                    Anchorage\n",
       "census_city                                     Anchorage municipality\n",
       "census_area                                     Anchorage municipality\n",
       "ancsa_region                                Cook Inlet Regional (CIRI)\n",
       "railbelt                                                      Railbelt\n",
       "hub                                                               True\n",
       "avg_elec_usage       [674.3176110825001, 616.54369648225, 568.80201...\n",
       "Name: 1, dtype: object"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# The first row in the table\n",
    "df.iloc[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ID,Name,Latitude,Longitude,ERHRegionID,WAPRegionID,ImpCost,FuelRefer,FuelCityID,Oil1Price,Oil2Price,PropanePrice,BirchPrice,SprucePrice,CoalPrice,SteamPrice,HotWaterPrice,MunicipalSalesTax,BoroughSalesTax,TMYid,TMYname,ElecUtilities,GasPrice,aris_city,census_city,census_area,ancsa_region,railbelt,hub,avg_elec_usage\n",
      "1,Anchorage,61.1519584655762,-149.864105224609,2,2,1,False,,3.07999992370605,,4.5,325.0,345.0,175.0,,,,,702730,\"ANCHORAGE INTL AP, AK\",\"[('Anchorage ML&P - Residential', 2), ('Anchorage ML&P - Commercial - Sm', 293), ('Anchorage ML&P - Commercial - Lg', 480), ('Chugach Electric- Residential', 1), ('Chugach Electric - Commercial - Sm', 361), ('Chugach Electric - Commercial - Lg', 548)]\",0.939549997448921,Anchorage,Anchorage municipality,Anchorage municipality,Cook Inlet Regional (CIRI),Railbelt,True,\"[674.3176110825001, 616.54369648225, 568.8020181537499, 559.5290597065, 502.68865773625, 474.855271649, 467.94495386925, 483.58090842574995, 498.77690241749997, 532.8355384270001, 575.696935941, 610.274161992]\"\n",
      "2,Adak,51.8488960266113,-176.63542175293,2,3,5,False,,4.42000007629395,4.69000005722046,,,,,,,0.0399999991059303,,704540,\"ADAK NAS, AK\",\"[('Adak -TDX Residential', 677), ('Adak - TDX Commercial', 678)]\",,Adak,Adak city,Aleutians West Census Area,Aleut,Affordable Energy Strategy Area,False,\"[471.936998147, 423.45531781, 460.81549341, 424.29430280099996, 414.198261989, 408.02137305699995, 428.550250417, 419.71331168800003, 409.07778510199995, 425.893819855, 443.339960239, 463.328994468]\"\n",
      "3,Akutan,54.1349449157715,-165.772445678711,2,3,5,False,,2.91000008583069,2.91000008583069,,,,,,,,,704890,\"DUTCH HARBOR, AK\",\"[('Akutan, City of - Residential', 9), ('Akutan, City of - Commercial - Sm', 288), ('Akutan, City of - Commercial - Lg', 475)]\",,Akutan,Akutan city,Aleutians East Borough,Aleut,Affordable Energy Strategy Area,False,\"[500.99156233, 439.98431584599996, 456.510655517, 421.946346724, 426.966352624, 380.76338928900003, 392.608543794, 400.059089699, 410.11991491599997, 434.168674699, 445.715396996, 472.65755627]\"\n",
      "4,Allakaket,66.5613861083984,-152.649444580078,4,4,5,False,,5.5,,11.4399995803833,,,,,,,,701740,\"BETTLES FIELD, AK\",\"[('Allakaket - APT - Residential', 249), ('Allakaket - APT - Commercial - Sm', 291), ('Allakaket - APT- Commercial - Lg', 478)]\",,Allakaket,Allakaket city,Yukon-Koyukuk Census Area,Doyon,Affordable Energy Strategy Area,False,\"[338.509000744, 291.889556239, 276.804469551, 259.698748275, 241.22759162, 241.87788097700002, 237.01448643400002, 240.39129591, 250.339561607, 260.703968331, 289.122744033, 324.815682083]\"\n"
     ]
    }
   ],
   "source": [
    "# Example that uses Python to access the data as CSV text.\n",
    "# As mentioned above, the CSV files can be downloaded directly \n",
    "# with a browser by entering the appropriate URL, such as:\n",
    "#\n",
    "#      http://ak-energy-data.analysisnorth.com/city-util/proc/city.csv\n",
    "\n",
    "txt = get_csv('city-util/proc/city.csv')\n",
    "lines = txt.splitlines()\n",
    "for i in range(5):\n",
    "    print(lines[i])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Access Utility Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ID</th>\n",
       "      <th>Name</th>\n",
       "      <th>Active</th>\n",
       "      <th>Type</th>\n",
       "      <th>IsCommercial</th>\n",
       "      <th>ChargesRCC</th>\n",
       "      <th>PCE</th>\n",
       "      <th>CO2</th>\n",
       "      <th>CustomerChg</th>\n",
       "      <th>DemandCharge</th>\n",
       "      <th>NameShort</th>\n",
       "      <th>Blocks</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ID</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>Chugach Electric- Residential</td>\n",
       "      <td>True</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>1.10</td>\n",
       "      <td>8.00</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Chugac</td>\n",
       "      <td>[(nan, 0.18715799739584343), (nan, nan), (nan,...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>Anchorage ML&amp;P - Residential</td>\n",
       "      <td>True</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.10</td>\n",
       "      <td>13.62</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Anchor</td>\n",
       "      <td>[(nan, 0.17457800125703232), (nan, nan), (nan,...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>Golden Valley Electric - Residential</td>\n",
       "      <td>True</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2.28</td>\n",
       "      <td>17.50</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Golden</td>\n",
       "      <td>[(nan, 0.22799800289794792), (nan, nan), (nan,...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5</td>\n",
       "      <td>Enstar Natural Gas - G1 (Res)</td>\n",
       "      <td>True</td>\n",
       "      <td>2</td>\n",
       "      <td>False</td>\n",
       "      <td>True</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>16.00</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Enstar</td>\n",
       "      <td>[(nan, 0.9405279974453149), (nan, nan), (nan, ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6</td>\n",
       "      <td>Akhiok, City of Residential</td>\n",
       "      <td>True</td>\n",
       "      <td>1</td>\n",
       "      <td>False</td>\n",
       "      <td>False</td>\n",
       "      <td>0.3265</td>\n",
       "      <td>2.20</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Akhiok</td>\n",
       "      <td>[(nan, 0.800000011920929), (nan, nan), (nan, n...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    ID                                  Name  Active  Type  IsCommercial  \\\n",
       "ID                                                                         \n",
       "1    1         Chugach Electric- Residential    True     1         False   \n",
       "2    2          Anchorage ML&P - Residential    True     1         False   \n",
       "3    3  Golden Valley Electric - Residential    True     1         False   \n",
       "5    5         Enstar Natural Gas - G1 (Res)    True     2         False   \n",
       "6    6           Akhiok, City of Residential    True     1         False   \n",
       "\n",
       "    ChargesRCC     PCE   CO2  CustomerChg  DemandCharge NameShort  \\\n",
       "ID                                                                  \n",
       "1         True  0.0000  1.10         8.00           NaN    Chugac   \n",
       "2         True     NaN  1.10        13.62           NaN    Anchor   \n",
       "3         True     NaN  2.28        17.50           NaN    Golden   \n",
       "5         True  0.0000   NaN        16.00           NaN    Enstar   \n",
       "6        False  0.3265  2.20          NaN           NaN    Akhiok   \n",
       "\n",
       "                                               Blocks  \n",
       "ID                                                     \n",
       "1   [(nan, 0.18715799739584343), (nan, nan), (nan,...  \n",
       "2   [(nan, 0.17457800125703232), (nan, nan), (nan,...  \n",
       "3   [(nan, 0.22799800289794792), (nan, nan), (nan,...  \n",
       "5   [(nan, 0.9405279974453149), (nan, nan), (nan, ...  \n",
       "6   [(nan, 0.800000011920929), (nan, nan), (nan, n...  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Access as a Pandas DataFrame\n",
    "df = get_df('city-util/proc/utility.pkl')\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "ID                                                              1\n",
       "Name                                Chugach Electric- Residential\n",
       "Active                                                       True\n",
       "Type                                                            1\n",
       "IsCommercial                                                False\n",
       "ChargesRCC                                                   True\n",
       "PCE                                                             0\n",
       "CO2                                                           1.1\n",
       "CustomerChg                                                     8\n",
       "DemandCharge                                                  NaN\n",
       "NameShort                                                  Chugac\n",
       "Blocks          [(nan, 0.18715799739584343), (nan, nan), (nan,...\n",
       "Name: 1, dtype: object"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# The first row in the table\n",
    "df.iloc[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[(nan, 0.18715799739584343), (nan, nan), (nan, nan), (nan, nan), (nan, nan)]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# The \"blocks\" field is a Python list of tuples (rate, upper usage cut-off\n",
    "# for the block.)\n",
    "df.iloc[0].Blocks"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Miscellaneous AkWarm City / Utility Info"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "ID                                                                      1\n",
       "LibVersion                                            2018-09-27 00:00:00\n",
       "DiscountRate                                                         0.03\n",
       "RegSurcharge                                                        0.004\n",
       "RegSurchargeElectric                                             0.000978\n",
       "PCEkWhLimit                                                           500\n",
       "PCEFundingPct                                                           1\n",
       "MiscNotes               Inflation factors and discount rate from 2011 ...\n",
       "Name: 0, dtype: object"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Access as a Pandas Series\n",
    "series = get_df('city-util/proc/misc_info.pkl')\n",
    "# This is really just one record so it is a Pandas Series object\n",
    "series"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Access TMY3 Climate Data\n",
    "\n",
    "All of the Alaska TMY3 (Typical Meterological Year) files are available, although\n",
    "only one site is included for Anchorage (International Airport).  The files are named\n",
    "through use of the TMY3 Site ID.  Original source files ar ein the `wx/tmy3/raw`\n",
    "directory.  An Excel file containing ASHRAE 2017 Design Heating Temperatures\n",
    "for each TMY3 site is available (`design_temps.xlsx`). Further info on the \n",
    "processed files is below.\n",
    "\n",
    "```\n",
    "└── wx\n",
    "    └── tmy3\n",
    "        ├── proc\n",
    "        │   ├── 700197.csv\n",
    "        │   ├── 700197.pkl\n",
    "        │   ├── 700260.csv\n",
    "        │   ├── 700260.pkl\n",
    "        │   ├── 700637.csv\n",
    "        │   ├── 700637.pkl\n",
    "            ... the rest of the Alaska TMY3 files\n",
    "        │   ├── tmy3_meta.csv\n",
    "        │   └── tmy3_meta.pkl\n",
    "        └── raw\n",
    "            ├── 700197.csv\n",
    "            ├── 700260.csv\n",
    "            ├── 700637.csv\n",
    "            ├── 701043.csv\n",
    "            ... the rest of the Alaska TMY3 files\n",
    "            ├── design_temps.xlsx\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>db_temp</th>\n",
       "      <th>rh</th>\n",
       "      <th>wind_spd</th>\n",
       "      <th>month</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>timestamp</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-01-01 00:30:00</th>\n",
       "      <td>17.60</td>\n",
       "      <td>84</td>\n",
       "      <td>16.105968</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-01 01:30:00</th>\n",
       "      <td>19.58</td>\n",
       "      <td>83</td>\n",
       "      <td>16.105968</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-01 02:30:00</th>\n",
       "      <td>19.22</td>\n",
       "      <td>87</td>\n",
       "      <td>16.329662</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-01 03:30:00</th>\n",
       "      <td>16.34</td>\n",
       "      <td>84</td>\n",
       "      <td>16.329662</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-01 04:30:00</th>\n",
       "      <td>17.60</td>\n",
       "      <td>81</td>\n",
       "      <td>16.553356</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                     db_temp  rh   wind_spd  month\n",
       "timestamp                                         \n",
       "2018-01-01 00:30:00    17.60  84  16.105968      1\n",
       "2018-01-01 01:30:00    19.58  83  16.105968      1\n",
       "2018-01-01 02:30:00    19.22  87  16.329662      1\n",
       "2018-01-01 03:30:00    16.34  84  16.329662      1\n",
       "2018-01-01 04:30:00    17.60  81  16.553356      1"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = get_df('wx/tmy3/proc/700197.pkl')\n",
    "df.head()\n",
    "# Units are IP (English), temperature in degrees F, rh in %, wind speed in miles per hour.\n",
    "# Timestamps are placed in the middle of the hour with the year arbitrarily\n",
    "# set to 2018."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>city</th>\n",
       "      <th>db_temp_avg</th>\n",
       "      <th>elevation</th>\n",
       "      <th>heating_design_temp</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>rh_avg</th>\n",
       "      <th>state</th>\n",
       "      <th>url</th>\n",
       "      <th>utc_offset</th>\n",
       "      <th>wind_spd_avg</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>tmy_id</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>703870</th>\n",
       "      <td>WRANGELL</td>\n",
       "      <td>43.072918</td>\n",
       "      <td>42.65092</td>\n",
       "      <td>15.8</td>\n",
       "      <td>56.483</td>\n",
       "      <td>-132.367</td>\n",
       "      <td>75.674315</td>\n",
       "      <td>AK</td>\n",
       "      <td>http://ak-energy-data.analysisnorth.com/wx/tmy...</td>\n",
       "      <td>-9.0</td>\n",
       "      <td>5.976894</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>700260</th>\n",
       "      <td>BARROW W POST-W ROGERS ARPT [NSA - ARM]</td>\n",
       "      <td>10.729712</td>\n",
       "      <td>32.80840</td>\n",
       "      <td>-34.3</td>\n",
       "      <td>71.320</td>\n",
       "      <td>-156.620</td>\n",
       "      <td>84.193950</td>\n",
       "      <td>AK</td>\n",
       "      <td>http://ak-energy-data.analysisnorth.com/wx/tmy...</td>\n",
       "      <td>-9.0</td>\n",
       "      <td>12.178734</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>702750</th>\n",
       "      <td>VALDEZ WSO</td>\n",
       "      <td>39.336438</td>\n",
       "      <td>22.96588</td>\n",
       "      <td>7.1</td>\n",
       "      <td>61.133</td>\n",
       "      <td>-146.350</td>\n",
       "      <td>74.864498</td>\n",
       "      <td>AK</td>\n",
       "      <td>http://ak-energy-data.analysisnorth.com/wx/tmy...</td>\n",
       "      <td>-9.0</td>\n",
       "      <td>6.165962</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>702185</th>\n",
       "      <td>MEKORYUK</td>\n",
       "      <td>33.632329</td>\n",
       "      <td>49.21260</td>\n",
       "      <td>-10.6</td>\n",
       "      <td>60.367</td>\n",
       "      <td>-166.267</td>\n",
       "      <td>80.209817</td>\n",
       "      <td>AK</td>\n",
       "      <td>http://ak-energy-data.analysisnorth.com/wx/tmy...</td>\n",
       "      <td>-9.0</td>\n",
       "      <td>14.999576</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>702510</th>\n",
       "      <td>TALKEETNA STATE ARPT</td>\n",
       "      <td>35.236486</td>\n",
       "      <td>344.48820</td>\n",
       "      <td>-17.6</td>\n",
       "      <td>62.317</td>\n",
       "      <td>-150.100</td>\n",
       "      <td>74.301826</td>\n",
       "      <td>AK</td>\n",
       "      <td>http://ak-energy-data.analysisnorth.com/wx/tmy...</td>\n",
       "      <td>-9.0</td>\n",
       "      <td>5.276497</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                           city  db_temp_avg  elevation  \\\n",
       "tmy_id                                                                    \n",
       "703870                                 WRANGELL    43.072918   42.65092   \n",
       "700260  BARROW W POST-W ROGERS ARPT [NSA - ARM]    10.729712   32.80840   \n",
       "702750                               VALDEZ WSO    39.336438   22.96588   \n",
       "702185                                 MEKORYUK    33.632329   49.21260   \n",
       "702510                     TALKEETNA STATE ARPT    35.236486  344.48820   \n",
       "\n",
       "        heating_design_temp  latitude  longitude     rh_avg state  \\\n",
       "tmy_id                                                              \n",
       "703870                 15.8    56.483   -132.367  75.674315    AK   \n",
       "700260                -34.3    71.320   -156.620  84.193950    AK   \n",
       "702750                  7.1    61.133   -146.350  74.864498    AK   \n",
       "702185                -10.6    60.367   -166.267  80.209817    AK   \n",
       "702510                -17.6    62.317   -150.100  74.301826    AK   \n",
       "\n",
       "                                                      url  utc_offset  \\\n",
       "tmy_id                                                                  \n",
       "703870  http://ak-energy-data.analysisnorth.com/wx/tmy...        -9.0   \n",
       "700260  http://ak-energy-data.analysisnorth.com/wx/tmy...        -9.0   \n",
       "702750  http://ak-energy-data.analysisnorth.com/wx/tmy...        -9.0   \n",
       "702185  http://ak-energy-data.analysisnorth.com/wx/tmy...        -9.0   \n",
       "702510  http://ak-energy-data.analysisnorth.com/wx/tmy...        -9.0   \n",
       "\n",
       "        wind_spd_avg  \n",
       "tmy_id                \n",
       "703870      5.976894  \n",
       "700260     12.178734  \n",
       "702750      6.165962  \n",
       "702185     14.999576  \n",
       "702510      5.276497  "
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# There is a file with summary info about each site \n",
    "# available.\n",
    "df = get_df('wx/tmy3/proc/tmy3_meta.pkl')\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## NEEP Cold-Climate Air Source Heat Pump Specifications\n",
    "\n",
    "See (http://www.neep.org/initiatives/high-efficiency-products/emerging-technologies/ashp/cold-climate-air-source-heat-pump)\n",
    "for more info about the data.  The original NEEP spreadsheet is found at `heat-pump/raw/neep_ashp_data.xlsx`\n",
    "\n",
    "```\n",
    "├── heat-pump\n",
    "│   ├── proc\n",
    "│   │   ├── hp_specs.csv\n",
    "│   │   └── hp_specs.pkl\n",
    "│   └── raw\n",
    "│       └── neep_ashp_data.xlsx\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>brand</th>\n",
       "      <th>ahri_num</th>\n",
       "      <th>zones</th>\n",
       "      <th>outdoor_model</th>\n",
       "      <th>indoor_model</th>\n",
       "      <th>hspf</th>\n",
       "      <th>in_pwr_5F_max</th>\n",
       "      <th>capacity_5F_max</th>\n",
       "      <th>in_pwr_47F_min</th>\n",
       "      <th>cop_5F_max</th>\n",
       "      <th>cop_17F_max</th>\n",
       "      <th>cop_47F_max</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Acd</td>\n",
       "      <td>202110483</td>\n",
       "      <td>Single</td>\n",
       "      <td>UHD09KCH38S-O</td>\n",
       "      <td>UHD09KCH38S-I</td>\n",
       "      <td>15.0</td>\n",
       "      <td>1.82</td>\n",
       "      <td>12977.0</td>\n",
       "      <td>0.20</td>\n",
       "      <td>2.089661</td>\n",
       "      <td>2.405652</td>\n",
       "      <td>2.657178</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Acd</td>\n",
       "      <td>201863350</td>\n",
       "      <td>Single</td>\n",
       "      <td>OCD09KCH23S-O</td>\n",
       "      <td>OCD09KCH23S-I</td>\n",
       "      <td>10.5</td>\n",
       "      <td>1.33</td>\n",
       "      <td>9171.0</td>\n",
       "      <td>0.16</td>\n",
       "      <td>2.020868</td>\n",
       "      <td>2.183096</td>\n",
       "      <td>2.605076</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Acd</td>\n",
       "      <td>202110500</td>\n",
       "      <td>Multi</td>\n",
       "      <td>MPD30KCH21S-O</td>\n",
       "      <td>Non-Ducted Indoor Units</td>\n",
       "      <td>11.5</td>\n",
       "      <td>3.01</td>\n",
       "      <td>19356.0</td>\n",
       "      <td>1.05</td>\n",
       "      <td>1.884613</td>\n",
       "      <td>3.126091</td>\n",
       "      <td>3.584757</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Acd</td>\n",
       "      <td>202110494</td>\n",
       "      <td>Multi</td>\n",
       "      <td>MPD18KCH22S-O</td>\n",
       "      <td>Non-Ducted Indoor Units</td>\n",
       "      <td>11.0</td>\n",
       "      <td>2.30</td>\n",
       "      <td>13450.0</td>\n",
       "      <td>0.75</td>\n",
       "      <td>1.713829</td>\n",
       "      <td>2.415259</td>\n",
       "      <td>2.365502</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Acd</td>\n",
       "      <td>202132789</td>\n",
       "      <td>Single</td>\n",
       "      <td>UHD24KCH22S-O</td>\n",
       "      <td>UHD24KCH22S-I</td>\n",
       "      <td>12.0</td>\n",
       "      <td>3.20</td>\n",
       "      <td>22553.0</td>\n",
       "      <td>0.38</td>\n",
       "      <td>2.065510</td>\n",
       "      <td>2.277197</td>\n",
       "      <td>2.534669</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  brand   ahri_num   zones  outdoor_model             indoor_model  hspf  \\\n",
       "0   Acd  202110483  Single  UHD09KCH38S-O            UHD09KCH38S-I  15.0   \n",
       "1   Acd  201863350  Single  OCD09KCH23S-O            OCD09KCH23S-I  10.5   \n",
       "2   Acd  202110500   Multi  MPD30KCH21S-O  Non-Ducted Indoor Units  11.5   \n",
       "3   Acd  202110494   Multi  MPD18KCH22S-O  Non-Ducted Indoor Units  11.0   \n",
       "4   Acd  202132789  Single  UHD24KCH22S-O            UHD24KCH22S-I  12.0   \n",
       "\n",
       "   in_pwr_5F_max  capacity_5F_max  in_pwr_47F_min  cop_5F_max  cop_17F_max  \\\n",
       "0           1.82          12977.0            0.20    2.089661     2.405652   \n",
       "1           1.33           9171.0            0.16    2.020868     2.183096   \n",
       "2           3.01          19356.0            1.05    1.884613     3.126091   \n",
       "3           2.30          13450.0            0.75    1.713829     2.415259   \n",
       "4           3.20          22553.0            0.38    2.065510     2.277197   \n",
       "\n",
       "   cop_47F_max  \n",
       "0     2.657178  \n",
       "1     2.605076  \n",
       "2     3.584757  \n",
       "3     2.365502  \n",
       "4     2.534669  "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# The processed data only includes the Ductless, mini-split models.\n",
    "df = get_df('heat-pump/proc/hp_specs.pkl')\n",
    "df.head()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
