{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "tags": [ "remove_cell" ] }, "outputs": [], "source": [ "from datascience import *\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline\n", "import numpy as np\n", "import pandas as pd\n", "from utils import *\n", "plt.style.use('seaborn-muted')\n", "from matplotlib import patches\n", "import csaps\n", "import warnings\n", "warnings.filterwarnings(\"ignore\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# An Empirical Example from EEP 147\n", "\n", "Let's take a look at an empirical example of production. The dataset for this section comes from EEP 147: Regulation of Energy and the Environment." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
Group | Group_num | UNIT NAME | Capacity_MW | Average Variable Cost | \n", "
---|---|---|---|---|
Old Timers | 7 | BIG CREEK | 1000 | 0 | \n", "
Fossil Light | 8 | HELMS | 800 | 0.5 | \n", "
Fossil Light | 8 | DIABLO CANYON 1 | 1000 | 11.5 | \n", "
Bay Views | 4 | MOSS LANDING 6 | 750 | 32.56 | \n", "
Bay Views | 4 | MOSS LANDING 7 | 750 | 32.56 | \n", "
Old Timers | 7 | MOHAVE 1 | 750 | 34.5 | \n", "
Old Timers | 7 | MOHAVE 2 | 750 | 34.5 | \n", "
Big Coal | 1 | FOUR CORNERS | 1900 | 36.5 | \n", "
Bay Views | 4 | MORRO BAY 3&4 | 665 | 36.61 | \n", "
East Bay | 6 | PITTSBURGH 5&6 | 650 | 36.61 | \n", "
... (32 rows omitted)
" ], "text/plain": [ "Group | Group_num | UNIT NAME | Capacity_MW | Average Variable Cost\n", "Old Timers | 7 | BIG CREEK | 1000 | 0\n", "Fossil Light | 8 | HELMS | 800 | 0.5\n", "Fossil Light | 8 | DIABLO CANYON 1 | 1000 | 11.5\n", "Bay Views | 4 | MOSS LANDING 6 | 750 | 32.56\n", "Bay Views | 4 | MOSS LANDING 7 | 750 | 32.56\n", "Old Timers | 7 | MOHAVE 1 | 750 | 34.5\n", "Old Timers | 7 | MOHAVE 2 | 750 | 34.5\n", "Big Coal | 1 | FOUR CORNERS | 1900 | 36.5\n", "Bay Views | 4 | MORRO BAY 3&4 | 665 | 36.61\n", "East Bay | 6 | PITTSBURGH 5&6 | 650 | 36.61\n", "... (32 rows omitted)" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ESG_table = Table.read_table('ESGPorfolios_forcsv.csv').select(\n", " \"Group\", \"Group_num\", \"UNIT NAME\", \"Capacity_MW\", \"Total_Var_Cost_USDperMWH\"\n", ").sort(\"Total_Var_Cost_USDperMWH\", descending = False).relabel(4, \"Average Variable Cost\")\n", "ESG_table" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This table shows some electricity generation plants in California and their costs. The `Capacity` is the output the firm is capable of producing. The `Average Variable Cost` shows the minimum variable cost per megawatt (MW) produced. At a price below AVC, the firm supplies nothing. At a price above the AVC, the firm can supply up to its capacity. Being a profit-maximising firm, it will try to supply its full capacity. \n", "\n", "First, lets look at just the Big Coal producers and understand this firm's particular behavior." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "Group | Group_num | UNIT NAME | Capacity_MW | Average Variable Cost | \n", "
---|---|---|---|---|
Big Coal | 1 | FOUR CORNERS | 1900 | 36.5 | \n", "
Big Coal | 1 | HUNTINGTON BEACH 1&2 | 300 | 40.5 | \n", "
Big Coal | 1 | REDONDO 5&6 | 350 | 41.94 | \n", "
Big Coal | 1 | REDONDO 7&8 | 950 | 41.94 | \n", "
Big Coal | 1 | HUNTINGTON BEACH 5 | 150 | 66.5 | \n", "
Big Coal | 1 | ALAMITOS 7 | 250 | 73.72 | \n", "