{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/dadams/miniconda3/envs/spatial_env2/lib/python3.10/site-packages/pandas/io/sql.py:1725: SAWarning: Did not recognize type 'geometry' of column 'geometry'\n",
      "  self.meta.reflect(bind=self.con, only=[table_name], views=True)\n"
     ]
    }
   ],
   "source": [
    "import pandas as pd\n",
    "from sqlalchemy import create_engine\n",
    "import geopandas as gpd\n",
    "from dotenv import load_dotenv\n",
    "load_dotenv()\n",
    "\n",
    "import os\n",
    "\n",
    "# Database connection details from zshrc environment variables\n",
    "#  use .env file for local development\n",
    "\n",
    "\n",
    "db_name = 'colorado_spills'\n",
    "user = os.getenv('DB_USER')\n",
    "password = os.getenv('DB_PASSWORD')\n",
    "host = os.getenv('DB_HOST')\n",
    "port = os.getenv('DB_PORT')\n",
    "\n",
    "\n",
    "# Create an engine to connect to the PostgreSQL database\n",
    "engine = create_engine(f'postgresql+psycopg2://{user}:{password}@{host}:{port}/{db_name}')\n",
    "\n",
    "# Read in the spills_with_demographics_geog as spills\n",
    "spills = pd.read_sql_table('spills_with_demographics_geog', engine)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# use longitude and latitude to create a GeoDataFrame from spills data\n",
    "spills['geometry'] = gpd.points_from_xy(spills['Longitude'], spills['Latitude'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "spills_gdf = gpd.GeoDataFrame(spills, crs='EPSG:4326') \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "# Ensure date columns are in datetime format\n",
    "spills_gdf['Date of Discovery'] = pd.to_datetime(spills_gdf['Date of Discovery'])\n",
    "spills_gdf['Initial Report Date'] = pd.to_datetime(spills_gdf['Initial Report Date'])\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# drop 2024 data for date of discovery and initial report date\n",
    "spills_gdf = spills_gdf[spills_gdf['Date of Discovery'].dt.year < 2024]\n",
    "spills_gdf = spills_gdf[spills_gdf['Initial Report Date'].dt.year < 2024]\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Separate Historical vs. Recent Spills\n",
    "historical_spills = spills_gdf[spills_gdf['Spill Type'] == 'Historical']\n",
    "recent_spills = spills_gdf[spills_gdf['Spill Type'] == 'Recent']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "              count       mean         std  min  25%  50%  75%     max\n",
      "Spill Type                                                            \n",
      "Historical   5312.0  21.490023  205.615913  0.0  0.0  1.0  2.0  9261.0\n",
      "Recent      10678.0   3.964506   46.997749  0.0  0.0  1.0  2.0  2232.0\n"
     ]
    }
   ],
   "source": [
    "# Compare Reporting Delay\n",
    "report_delay_summary = spills_gdf.groupby('Spill Type')['Report Delay (Days)'].describe()\n",
    "print(report_delay_summary)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 32240 characters]",
      "text/plain": [
       "<Figure size 1200x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# Compare Spill Trends Over Time\n",
    "spills_by_year = spills_gdf.groupby(['Report Year', 'Spill Type']).size().unstack()\n",
    "spills_by_year.plot(kind='bar', figsize=(12,6), title='Spills by Year and Type')\n",
    "plt.xlabel('Year')\n",
    "plt.ylabel('Number of Spills')\n",
    "plt.legend(title='Spill Type')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Spill Type                                  Historical     Recent  \\\n",
      "Operator                                                            \n",
      "NOBLE ENERGY INC                              1.901973   1.435644   \n",
      "KERR MCGEE OIL & GAS ONSHORE LP               6.485938  11.784062   \n",
      "PDC ENERGY INC                                3.483728   2.366071   \n",
      "CAERUS PICEANCE LLC                          10.162791   1.018735   \n",
      "BONANZA CREEK ENERGY OPERATING COMPANY LLC   91.725000   1.138648   \n",
      "CHEVRON USA INC                             251.076923   2.180723   \n",
      "KP KAUFFMAN COMPANY INC                      62.929412   9.054598   \n",
      "HIGHPOINT OPERATING CORPORATION               0.937500   0.941011   \n",
      "LARAMIE ENERGY LLC                           23.833333   1.713467   \n",
      "CRESTONE PEAK RESOURCES OPERATING LLC         1.804688   0.926724   \n",
      "\n",
      "Spill Type                                  Total Spills  \n",
      "Operator                                                  \n",
      "NOBLE ENERGY INC                                    2177  \n",
      "KERR MCGEE OIL & GAS ONSHORE LP                     2058  \n",
      "PDC ENERGY INC                                      1124  \n",
      "CAERUS PICEANCE LLC                                  983  \n",
      "BONANZA CREEK ENERGY OPERATING COMPANY LLC           617  \n",
      "CHEVRON USA INC                                      467  \n",
      "KP KAUFFMAN COMPANY INC                              433  \n",
      "HIGHPOINT OPERATING CORPORATION                      388  \n",
      "LARAMIE ENERGY LLC                                   373  \n",
      "CRESTONE PEAK RESOURCES OPERATING LLC                360  \n"
     ]
    }
   ],
   "source": [
    "\n",
    "# Operator Performance Analysis\n",
    "operator_analysis = spills_gdf.groupby(['Operator', 'Spill Type'])['Report Delay (Days)'].mean().unstack()\n",
    "operator_analysis['Total Spills'] = spills_gdf.groupby('Operator').size()\n",
    "operator_analysis = operator_analysis.sort_values(by='Total Spills', ascending=False)\n",
    "print(operator_analysis.head(10))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Spill Type                                  Historical  Recent  Total Spills\n",
      "Operator                                                                    \n",
      "NOBLE ENERGY INC                                1571.0   606.0        2177.0\n",
      "KERR MCGEE OIL & GAS ONSHORE LP                 1280.0   778.0        2058.0\n",
      "PDC ENERGY INC                                   676.0   448.0        1124.0\n",
      "CAERUS PICEANCE LLC                              129.0   854.0         983.0\n",
      "BONANZA CREEK ENERGY OPERATING COMPANY LLC        40.0   577.0         617.0\n",
      "CHEVRON USA INC                                   52.0   415.0         467.0\n",
      "KP KAUFFMAN COMPANY INC                           85.0   348.0         433.0\n",
      "HIGHPOINT OPERATING CORPORATION                   32.0   356.0         388.0\n",
      "LARAMIE ENERGY LLC                                24.0   349.0         373.0\n",
      "CRESTONE PEAK RESOURCES OPERATING LLC            128.0   232.0         360.0\n"
     ]
    }
   ],
   "source": [
    "# Operator comparison of historical vs recent spills\n",
    "operator_spill_type = spills_gdf.groupby(['Operator', 'Spill Type']).size().unstack()\n",
    "operator_spill_type['Total Spills'] = operator_spill_type.sum(axis=1)\n",
    "print(operator_spill_type.sort_values(by='Total Spills', ascending=False).head(10))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 154692 characters]",
      "text/plain": [
       "<Figure size 1000x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import geopandas as gpd\n",
    "\n",
    "# Ensure spills_gdf is already a GeoDataFrame with the necessary data\n",
    "# spills_gdf = gpd.GeoDataFrame(...)\n",
    "\n",
    "# Create a plot for the spatial distribution of spills\n",
    "fig, ax = plt.subplots(figsize=(10, 6))\n",
    "\n",
    "# Plot the GeoDataFrame with optimizations\n",
    "spills_gdf.plot(\n",
    "    ax=ax,\n",
    "    marker='o', \n",
    "    alpha=0.6,  # Adjust transparency for better visibility\n",
    "    column='Spill Type', \n",
    "    legend=True, \n",
    "    legend_kwds={'title': \"Spill Type\"},  # Correctly specify the legend title\n",
    "    cmap='viridis'  # Use a colormap for better visual distinction\n",
    ")\n",
    "\n",
    "# Set plot title and labels\n",
    "ax.set_title('Spatial Distribution of Historical vs. Recent Spills', fontsize=14)\n",
    "ax.set_xlabel('Longitude', fontsize=12)\n",
    "ax.set_ylabel('Latitude', fontsize=12)\n",
    "\n",
    "# Improve layout\n",
    "plt.tight_layout()\n",
    "\n",
    "# Display the plot\n",
    "plt.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                 count       mean         std  min  25%  50%  75%     max\n",
      "Period                                                                   \n",
      "2020 and After  7177.0   6.924342  124.965839  0.0  0.0  1.0  1.0  9261.0\n",
      "Before 2020     8813.0  12.117554  124.705876  0.0  0.0  1.0  2.0  5681.0\n"
     ]
    }
   ],
   "source": [
    "# Add a column to indicate whether the spill occurred before or after 2020\n",
    "spills_gdf['Period'] = spills_gdf['Report Year'].apply(lambda x: 'Before 2020' if x < 2020 else '2020 and After')\n",
    "\n",
    "# Group by the new period column and calculate the mean response time\n",
    "response_time_summary = spills_gdf.groupby('Period')['Report Delay (Days)'].describe()\n",
    "print(response_time_summary)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "T-Statistic: 2.6161\n",
      "P-Value: 0.0089\n",
      "The difference in response time is statistically significant.\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<Axes: title={'center': 'Report Delay (Days)'}, xlabel='Period'>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 34072 characters]",
      "text/plain": [
       "<Figure size 1000x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# t-test for the difference in response time before and after 2020\n",
    "from scipy.stats import ttest_ind\n",
    "\n",
    "before_2020 = spills_gdf[spills_gdf['Period'] == 'Before 2020']['Report Delay (Days)']\n",
    "after_2020 = spills_gdf[spills_gdf['Period'] == '2020 and After']['Report Delay (Days)']\n",
    "\n",
    "t_stat, p_value = ttest_ind(before_2020, after_2020, equal_var=False)\n",
    "print(f'T-Statistic: {t_stat:.4f}')\n",
    "print(f'P-Value: {p_value:.4f}')\n",
    "\n",
    "# Check if the difference is statistically significant\n",
    "if p_value < 0.05:\n",
    "    print('The difference in response time is statistically significant.')\n",
    "else:\n",
    "    print('The difference in response time is not statistically significant.')\n",
    "    \n",
    "# Create a plot for the response time distribution before and after 2020\n",
    "fig, ax = plt.subplots(figsize=(10, 6))\n",
    "\n",
    "# Plot the response time distribution for each period\n",
    "spills_gdf.boxplot(column='Report Delay (Days)', by='Period', ax=ax)\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Historical Spills Report Delay Summary:\n",
      "count    5312.000000\n",
      "mean       21.490023\n",
      "std       205.615913\n",
      "min         0.000000\n",
      "25%         0.000000\n",
      "50%         1.000000\n",
      "75%         2.000000\n",
      "max      9261.000000\n",
      "Name: Report Delay (Days), dtype: float64\n",
      "\n",
      "Recent Spills Report Delay Summary:\n",
      "count    10678.000000\n",
      "mean         3.964506\n",
      "std         46.997749\n",
      "min          0.000000\n",
      "25%          0.000000\n",
      "50%          1.000000\n",
      "75%          2.000000\n",
      "max       2232.000000\n",
      "Name: Report Delay (Days), dtype: float64\n",
      "\n",
      "Historical Spills Response Time Summary:\n",
      "                 count       mean         std  min  25%  50%  75%     max\n",
      "Period                                                                   \n",
      "2020 and After  2705.0  13.533087  200.352339  0.0  0.0  0.0  1.0  9261.0\n",
      "Before 2020     2607.0  29.746068  210.659491  0.0  0.0  1.0  2.0  5681.0\n",
      "\n",
      "Recent Spills Response Time Summary:\n",
      "                 count      mean        std  min  25%  50%  75%     max\n",
      "Period                                                                 \n",
      "2020 and After  4472.0  2.926878  27.302062  0.0  0.0  1.0  1.0  1329.0\n",
      "Before 2020     6206.0  4.712214  57.116100  0.0  1.0  1.0  2.0  2232.0\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/dadams/miniconda3/envs/spatial_env2/lib/python3.10/site-packages/geopandas/geodataframe.py:1819: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  super().__setitem__(key, value)\n",
      "/home/dadams/miniconda3/envs/spatial_env2/lib/python3.10/site-packages/geopandas/geodataframe.py:1819: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  super().__setitem__(key, value)\n"
     ]
    }
   ],
   "source": [
    "# Add a column to indicate whether the spill occurred before or after 2020 for historical and recent spills\n",
    "historical_spills['Period'] = historical_spills['Report Year'].apply(lambda x: 'Before 2020' if x < 2020 else '2020 and After')\n",
    "recent_spills['Period'] = recent_spills['Report Year'].apply(lambda x: 'Before 2020' if x < 2020 else '2020 and After')\n",
    "\n",
    "# Historical Spills Analysis\n",
    "historical_report_delay_summary = historical_spills['Report Delay (Days)'].describe()\n",
    "print(\"Historical Spills Report Delay Summary:\")\n",
    "print(historical_report_delay_summary)\n",
    "\n",
    "# Recent Spills Analysis\n",
    "recent_report_delay_summary = recent_spills['Report Delay (Days)'].describe()\n",
    "print(\"\\nRecent Spills Report Delay Summary:\")\n",
    "print(recent_report_delay_summary)\n",
    "\n",
    "# Historical Spills Response Time Summary\n",
    "historical_response_time_summary = historical_spills.groupby('Period')['Report Delay (Days)'].describe()\n",
    "print(\"\\nHistorical Spills Response Time Summary:\")\n",
    "print(historical_response_time_summary)\n",
    "\n",
    "# Recent Spills Response Time Summary\n",
    "recent_response_time_summary = recent_spills.groupby('Period')['Report Delay (Days)'].describe()\n",
    "print(\"\\nRecent Spills Response Time Summary:\")\n",
    "print(recent_response_time_summary)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "Historical Spills T-Statistic: 2.8723\n",
      "Historical Spills P-Value: 0.0041\n",
      "The difference in response time for historical spills is statistically significant.\n",
      "\n",
      "Recent Spills T-Statistic: 2.1457\n",
      "Recent Spills P-Value: 0.0319\n",
      "The difference in response time for recent spills is statistically significant.\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<Axes: title={'center': 'Report Delay (Days)'}, xlabel='Period'>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 37736 characters]",
      "text/plain": [
       "<Figure size 1000x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# t-test for the difference in response time before and after 2020 for historical spills\n",
    "historical_before_2020 = historical_spills[historical_spills['Period'] == 'Before 2020']['Report Delay (Days)']\n",
    "historical_after_2020 = historical_spills[historical_spills['Period'] == '2020 and After']['Report Delay (Days)']\n",
    "\n",
    "t_stat, p_value = ttest_ind(historical_before_2020, historical_after_2020, equal_var=False)\n",
    "print(f'\\nHistorical Spills T-Statistic: {t_stat:.4f}')\n",
    "print(f'Historical Spills P-Value: {p_value:.4f}')\n",
    "\n",
    "# Check if the difference is statistically significant for historical spills\n",
    "if p_value < 0.05:\n",
    "    print('The difference in response time for historical spills is statistically significant.')\n",
    "else:\n",
    "    print('The difference in response time for historical spills is not statistically significant.')\n",
    "    \n",
    "# t-test for the difference in response time before and after 2020 for recent spills\n",
    "recent_before_2020 = recent_spills[recent_spills['Period'] == 'Before 2020']['Report Delay (Days)']\n",
    "recent_after_2020 = recent_spills[recent_spills['Period'] == '2020 and After']['Report Delay (Days)']\n",
    "\n",
    "t_stat, p_value = ttest_ind(recent_before_2020, recent_after_2020, equal_var=False)\n",
    "print(f'\\nRecent Spills T-Statistic: {t_stat:.4f}')\n",
    "print(f'Recent Spills P-Value: {p_value:.4f}')\n",
    "\n",
    "# Check if the difference is statistically significant for recent spills\n",
    "if p_value < 0.05:\n",
    "    print('The difference in response time for recent spills is statistically significant.')\n",
    "else:\n",
    "    print('The difference in response time for recent spills is not statistically significant.')\n",
    "    \n",
    "# Create a plot for the response time distribution before and after 2020 for historical and recent spills\n",
    "fig, ax = plt.subplots(figsize=(10, 6))\n",
    "\n",
    "# Plot the response time distribution for historical spills\n",
    "historical_spills.boxplot(column='Report Delay (Days)', by='Period', ax=ax, positions=[1, 2])\n",
    "\n",
    "# Plot the response time distribution for recent spills\n",
    "recent_spills.boxplot(column='Report Delay (Days)', by='Period', ax=ax, positions=[4, 5])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "# list operator names\n",
    "operator_names = operator_analysis.index.tolist()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['NOBLE ENERGY INC', 'KERR MCGEE OIL & GAS ONSHORE LP', 'PDC ENERGY INC', 'CAERUS PICEANCE LLC', 'BONANZA CREEK ENERGY OPERATING COMPANY LLC', 'CHEVRON USA INC', 'KP KAUFFMAN COMPANY INC', 'HIGHPOINT OPERATING CORPORATION', 'LARAMIE ENERGY LLC', 'CRESTONE PEAK RESOURCES OPERATING LLC', 'PIONEER NATURAL RESOURCES USA INC', 'EXTRACTION OIL & GAS INC', 'TEP ROCKY MOUNTAIN LLC', 'WHITING OIL & GAS CORPORATION', 'FOUNDATION ENERGY MANAGEMENT LLC', 'BP AMERICA PRODUCTION COMPANY', 'KERR MCGEE GATHERING LLC', 'DCP OPERATING COMPANY LP', 'GREAT WESTERN OPERATING COMPANY LLC', 'WPX ENERGY ROCKY MOUNTAIN LLC', 'EVERGREEN NATURAL RESOURCES LLC', 'ENCANA OIL & GAS (USA) INC', 'SIMCOE LLC', 'DCP MIDSTREAM LP', 'XTO ENERGY INC', 'SANDRIDGE EXPLORATION & PRODUCTION LLC', 'BARRETT CORPORATION* BILL', 'AUGUSTUS ENERGY RESOURCES LLC', 'SRC ENERGY INC', 'PETROSHARE CORPORATION', 'SYNERGY RESOURCES CORPORATION', 'URSA OPERATING COMPANY LLC', 'FUNDARE RESOURCES OPERATING COMPANY LLC', 'KINDER MORGAN CO2 CO LP', 'EXTRACTION OIL & GAS LLC', 'K P KAUFFMAN COMPANY INC', 'GRAND RIVER GATHERING LLC', 'OWN RESOURCES OPERATING LLC', 'BAYSWATER EXPLORATION AND PRODUCTION LLC', 'VERDAD RESOURCES LLC', 'NGL WATER SOLUTIONS DJ LLC', 'UTAH GAS OP LTD DBA UTAH GAS CORP', 'EOG RESOURCES INC', 'CHEVRON PRODUCTION COMPANY', 'BAYSWATER EXPLORATION & PRODUCTION LLC', 'CITATION OIL & GAS CORP', 'WEXPRO COMPANY', '8 NORTH LLC', 'OXY USA WTP LP', 'OXY USA INC', 'PROSPECT ENERGY LLC', 'SUMMIT MIDSTREAM PARTNERS LLC', 'VANGUARD OPERATING LLC', 'WESTERN OPERATING COMPANY', 'NOBLE MIDSTREAM SERVICES LLC', 'WESCO OPERATING INC', 'COLORADO OIL & GAS CONSERVATION COMMISSION', 'BERRY PETROLEUM COMPANY LLC', 'D90 ENERGY LLC', 'COLORADO INTERSTATE GAS COMPANY LLC', 'MULL DRILLING COMPANY INC', 'GUNNISON ENERGY LLC', 'MAGPIE OPERATING INC', 'WARD & SON* ALFRED', 'BISON OIL & GAS II LLC', 'GRYNBERG* JACK DBA GRYNBERG PETROLEUM CO', 'BNN WESTERN LLC', 'PAINTED PEGASUS PETROLEUM LLC', 'HILCORP ENERGY COMPANY', 'BURLINGTON RESOURCES OIL & GAS LP', 'CARRIZO NIOBRARA LLC', 'TAPROOT ROCKIES MIDSTREAM LLC', 'PETROX RESOURCES INC', 'CIVITAS NORTH LLC', 'ANADARKO WATTENBERG OIL COMPLEX LLC', 'HRM RESOURCES II LLC', 'BARGATH LLC', 'DIAMOND OPERATING, INC.', 'SCOUT ENERGY MANAGEMENT LLC', 'GRAND MESA OPERATING CO', 'BLUE CHIP OIL INC', 'IMPETRO RESOURCES LLC', 'TIMBER CREEK OPERATING LLC', 'ARP PRODUCTION COMPANY LLC', 'PADCO LLC', 'CONOCO PHILLIPS COMPANY', 'CORAL PRODUCTION CORP', 'TOP OPERATING COMPANY', 'P O & G OPERATING LLC', 'PETERSON ENERGY OPERATING INC', 'PROVIDENCE OPERATING LLC DBA POCO OPERATING', 'ENERGY SEARCH CO ADBA ENERGY SEARCH CO INC', 'SG INTERESTS I LTD', 'AXIS EXPLORATION LLC', 'INVESTMENT EQUIPMENT LLC', 'SMITH ENERGY CORP', 'WARD PETROLEUM CORPORATION', 'FIFTH CREEK ENERGY OPERATING COMPANY LLC', 'FULCRUM ENERGY OPERATING LLC', 'BENCHMARK ENERGY LLC', 'RED HAWK PETROLEUM LLC', 'ENERPLUS RESOURCES (USA) CORPORATION', 'CAERUS WASHCO LLC', 'WIEPKING-FULLERTON ENERGY LLC', 'CUB CREEK ENERGY', 'TALLGRASS WATER WESTERN LLC', 'RENEGADE OIL & GAS COMPANY LLC', 'GADECO LLC', 'ANADARKO DJ GAS PROCESSING LLC', 'RED ROCK GATHERING COMPANY LLC', 'OMIMEX PETROLEUM INC', 'ENDURING RESOURCES LLC', 'KESTREL RESOURCES INC', 'AKA ENERGY GROUP LLC', 'SAMSON RESOURCES COMPANY', 'CM PRODUCTION LLC', 'CHEMCO INC', 'MARALEX RESOURCES INC', 'PETRO OPERATING COMPANY LLC', 'MAGPIE OPERATING, INC', 'NICKEL ROAD OPERATING LLC', 'SWN PRODUCTION COMPANY LLC', 'LINN OPERATING INC', 'ANSCHUTZ EXPLORATION CORP', 'CHACO ENERGY COMPANY', 'CATAMOUNT ENERGY PARTNERS LLC', 'MURFIN DRILLING COMPANY INC', 'BLACK HILLS PLATEAU PRODUCTION LLC', 'DESERT EAGLE OPERATING LLC', 'MUSTANG RESOURCES LLC', 'LORENTZ OIL & GAS LLC', 'KOCH EXPLORATION COMPANY, LLC', 'QEP FIELD SERVICES LLC', 'PICEANCE ENERGY LLC', 'COLTON LIMITED LIABILITY CO', 'MCWHINNEY HOLDING COMPANY LLLP', 'SCHNEIDER ENERGY SERVICES INC', 'LOGOS OPERATING LLC', 'ROCKY MOUNTAIN MIDSTREAM LLC', 'MONUMENT GLOBAL RESOURCES INC', 'HUNTER RIDGE ENERGY SERVICES LLC', 'MARATHON OIL COMPANY', 'POC-I LLC', 'NIGHTHAWK PRODUCTION LLC', 'CITY & COUNTY OF DENVER', 'LONGS PEAK RESOURCES LLC', 'LINDE INC', 'BLACK DIAMOND MINERALS LLC', 'BISON IV OPERATING LLC', 'HIGHLANDS NATURAL RESOURCES CORPORATION', 'PEAKVIEW OPERATING COMPANY LLC', 'ROCKY MTN NATURAL GAS LLC ADBA BLACK HILLS ENERGY', 'PETRO MEX RESOURCES', 'GRIZZLY OPERATING LLC', 'CRIMSON EXPLORATION OPERATING INC', 'CUB CREEK ENERGY LLC', 'EE3 LLC', 'MERRION OIL & GAS CORP', 'FRITZLER RESOURCES INC', 'QEP ENERGY COMPANY', 'GRAYHORSE OPERATING INC', 'MARALEX RESOURCES, INC', 'GRMR OIL & GAS LLC', 'ANDEAVOR FIELD SERVICES LLC', 'HARVEST FOUR CORNERS LLC', 'KTM OPERATING LLC', 'ROSEWOOD RESOURCES INC', 'PHOENIX RESOURCES LLC', 'RITCHIE EXPLORATION INC', 'ROBERT L BAYLESS PRODUCER LLC', 'WAPITI OPERATING LLC', 'WHITING OIL AND GAS CORPORATION', 'MORNINGSTAR OPERATING LLC', 'YOUNG GAS STORAGE COMPANY LTD', 'MENDELL FINISTERRE II LLC', 'MARALEX DISPOSAL LLC', 'KT RESOURCES LLC', 'SMITH OIL PROPERTIES INC', 'BAYLESS PRODUCER, LLC* ROBERT L', 'CHEVRON PIPELINE COMPANY', 'CCRP OPERATING INC', 'TEXAS TEA OF COLORADO LLC DBA TEXAS TEA LLC', 'HYNDREX RESOURCES', 'JAVERNICK OIL', 'ROBIDOUX RANCH LLC', 'COACHMAN ENERGY OPERATING COMPANY LLC', 'BEREN CORPORATION', 'LINN OPERATING LLC', 'TRUE OIL LLC', 'CRUMLEY* JACK', 'DUGAN PRODUCTION CORP', 'CWC OIL AND GAS LLC', 'MARKUS PRODUCTION, INC', 'DIAMOND OPERATING INC', 'WINDSOR ENERGY GROUP LLC', 'ST CROIX OPERATING INC', 'SANTA FE NATURAL RESOURCES INC', 'RIO MESA RESOURCES INC', 'TOM FENNO PRODUCTION LLC', 'FAULCONER INC* VERNON E', 'EXPEDITION WATER SOLUTIONS COLORADO LLC', 'REP PROCESSING LLC', 'DIVERSIFIED ENERGY LLC', 'ENTEK GRB LLC', 'TEXACO EXPLORATION AND PRODUCTION INC', 'EDGE ENERGY II LLC', 'STRACHAN EXPLORATION INC', 'ENERGY SEARCH COMPANY', 'ENERGY INVESTMENTS INC', 'RWL ENTERPRISES', 'GILBERT-STEWART OPERATING LLC', 'SCHMID PROPERTIES INC', 'SANDLIN OIL CORP', 'MONAHAN GAS & OIL INC', 'CHEVRON MIDCONTINENT LP', 'BISON EXPLORATION LLC', 'ALAMOSA DRILLING INC', 'MCCARTNEY ENGINEERING LLC', 'BARRETT RESOURCES CORP', 'OGRIS OPERATING LLC', 'MACHII-ROSS PETROLEUM CO', 'BEEMAN OIL & GAS INC', 'KUENZLER & FLORA RESERVE COMPANY', '4-H OPERATING CORPORATION', 'GULFPORT ENERGY CORPORATION', 'PLUG NICKEL OIL COMPANY INC', 'UPLAND EXPLORATION LLC', 'VISION ENERGY LLC', 'PETRON DEVELOPMENT COMPANY', 'CAPTIVA ENERGY PARTNERS LLC', 'HIGHPOINT ENERGY LLC', 'CENTRAL OPERATING INC', 'BARNES PETROLEUM CORPORATION', 'TINDALL OPERATING COMPANY', 'ARKOMA OPERATIONS LLC', 'WOODARD* SANDRA K', 'WOLVERINE RESOURCES LLC', 'SOVEREIGN OPERATING COMPANY LLC', 'BOPCO LP', 'SUMMIT MIDSTREAM NIOBRARA LLC', 'TIMKA RESOURCES LTD', 'BISON OIL & GAS LLC', 'CONFLUENCE DJ LLC', 'VERDAD OIL & GAS CORPORATION', 'WELLINGTON OPERATING COMPANY', 'COMPLETE ENERGY SERVICES INC', 'ENDEAVOUR OPERATING CORPORATION', 'SOUTHWESTERN ENERGY PRODUCTION COMPANY', 'GENESIS GAS & OIL COLORADO LLC', 'MEYER OIL COMPANY', 'NATURAL RESOURCE GROUP INC', 'MDS ENERGY DEVELOPMENT LLC', 'MCELVAIN ENERGY INC', \"O'BRIEN ENERGY RESOURCES CORP\", 'OVERLAND RESOURCES LLC', 'LYSTER OIL COMPANY INC', 'KINDER MORGAN CO2 COMPANY LLC', 'INSPIRE OIL & GAS INC', 'INDUSTRIAL GAS SERVICES INC', 'HRM RESOURCES LLC', 'DAN A HUGHES COMPANY LP', 'PINTAIL PETROLEUM LTD', 'GMT EXPLORATION COMPANY LLC', 'PICEANCE ENERGY LLC DBA LARAMIE ENERGY COMPANY', 'FOUR STAR OIL & GAS COMPANY', 'MORNINGSTAR PARTNERS LP', 'EWS 4 DJ BASIN LLC', 'ENTERPRISE PRODUCTS OPERATING LLC', 'SCHUTZ* RICHARD E', 'ROCKY MOUNTAIN NATURAL GAS LLC', 'ENERGY & CARBON MANAGEMENT COMMISSION', 'EAST CHEYENNE GAS STORAGE LLC', 'SHAWNEE OIL DEVELOPMENT CO INC', 'MESA ENERGY PARTNERS LLC', 'STELBAR OIL CORP INC', 'SEELEY OIL COMPANY LLC', 'WILLIAMS FOUR CORNERS LLC', 'NORTHSTAR GAS COMPANY INC', 'BAYLESS PRODUCER LLC* ROBERT L', 'PCR OPERATING LLC', 'CONDOR ENERGY TECHNOLOGY LLC', 'LASSO OIL & GAS LLC', 'RED MESA HOLDINGS/O&G LLC', 'KOCH EXPLORATION COMPANY LLC', 'KGH OPERATING COMPANY', 'BP ENERGY INC', 'CHOLLA PETROLEUM INC', 'REYNOLDS* NOEL', 'HARBURG* RUDOLPH W', 'PRONGHORN OPERATING LLC', '31 OPERATING']\n"
     ]
    }
   ],
   "source": [
    "print (operator_names)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "spatial_env2",
   "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.10.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
