route443 / my_sdge

compare SDGE plans using your own usage data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

my_sdge

Compare different popular SDGE residential rates plans, using the Green Button Download exported usage file available from the SDGE portal.

  • electricity only (I only have experience with electricity only place)
  • supports non-solar (default) and NEM1.0
  • supports both 15-min resolution data and 60-min resolution data
  • compares: TOU-DR1, TOU-DR2, EV-TOU-5, EV-TOU-2, DR(for non-solar user), DR-SES(for NEM1.0 user)
  • supports SDGE generation + SDGE delivery (represented with plan name) and CCA generation + SDGE delivery (represented with prefix CCA + plan name)
  • calculates baseline allowance credit when applicable.
  • TAXES & FEES are not included. PCIA is included for CCA option calculation.

Install

git clone https://github.com/corruptbear/my_sdge
cd my_sdge
python3.9 -m pip install -r requirements.txt

Should work with both python3.9 and python3.10. Other versions are not tested.

If you have no idea how to get this to run, see the FAQ for a zero set-up option.

Usage

see the help:

python3.9 sdge_hourly.py --help
Usage: sdge_hourly.py [OPTIONS]

Options:
  -f, --filename TEXT             The full path of the 60-minute exported
                                  electricity usage file.  [required]
  -z, --zone [coastal|inland|mountain|desert]
                                  The climate zone of the house.  [default:
                                  coastal]
  -s, --solar [NA|NEM1.0]         The solar setup.  [default: NA]
  --pcia_year [2009|2010|2011|2012|2013|2014|2015|2016|2017|2018|2019|2020|2021|2022|2023]
                                  The vintage of the PCIA fee. (indicated on
                                  the bill)  [default: 2021]
  --help                          Show this message and exit.

Example

An example 60-min resolution usage file (historical data) is provided.

To use the historical data to compare different plans using the current rates:

# ensure that you are currently in the downloaded repo folder
python3.9 sdge_hourly.py -f Electric_60_Minute_11-1-2022_11-30-2022_20230819.csv -z coastal --pcia_year 2021

Outputs (the plans are ranked from lowest cost to highest cost):

starting:2022-11-01 ending:2022-11-30
30 days, 0 summer days, 30 winter days
total_usage:817.4150 kWh
CCA-EV-TOU-5    $279.3905 $0.3418/kWh
EV-TOU-5        $281.6590 $0.3446/kWh
CCA-EV-TOU-2    $305.6914 $0.3740/kWh
EV-TOU-2        $307.9600 $0.3767/kWh
CCA-TOU-DR2     $374.1701 $0.4577/kWh
CCA-TOU-DR1     $374.6333 $0.4583/kWh
TOU-DR2         $375.9059 $0.4599/kWh
TOU-DR1         $376.3823 $0.4605/kWh
CCA-DR          $378.3918 $0.4629/kWh
DR              $380.2473 $0.4652/kWh

If you are a NEM1.0 user, add -s NEM1.0 to the end of the command.

FAQ

I am not a tech-savvy person, how can I use this?

  1. On your desktop computer, with your google account logged in, go to this Colab Notebook
  2. Follow the instructions there:
    • Run the first cell to install the script.
    • Upload your own usage file.
    • Modify the command to reflect your filename and options, then run.

Where to get the 15-min or 60-minute usage csv file?

Can I use a csv file with continuous data from more than one billing cycles?

Yes.

Some plans are advantageous in the summer, while others are advantageous in the winter, with a usage file covering more months you can then compare the overall costs of different plans over longer period.

Just make sure that the starting date and the ending date are spanning no more than one year. The ending date could be from the year following the year of the starting date, but could not include or pass the anniversary.

Which climate zone should I use?

Please check SDGE's arcgis map : put your address into the search box, click Enter, then see the result.

How can I find the PCIA year?

On your PDF SDGE bill, the year of your PCIA fee is indicated.

For example, on my bill, in the section above "Total Electric Charges", "PCIA 2021" is listed, which means the year is 2021.

As different years have different PCIA fee, if the fee for a particular year is high, it might make the usually slightly cheaper (in 2024, this is no longer true for summer months, you can examine the rates .yaml files to view the rates) CCA plans slightly more expensive than non-CCA.

How are the bills calculated?

non-CCA: SDGE generation fee + SDGE delivery fee - allowance credit

CCA: CCA generation fee + SDGE delivery fee - allowance credit + PCIA

NEM1.0: similar to above; uses net consumption instead of consumption for calculations; applies the allowance credit as described in page 6. (the current calculation is estimate only, it has not taken non-bypassable into account yet, so it's NEM1.0)

I currently do not have an EV but I am wondering what an EV will do to my bill?

You can simulate the EV by convert your current usage file to a new usage file with imaginary EV usage each day.

For example, you would like to simulate having an EV which consumes 10kWh per night (charged during the super offpeak hours).

On a Unix based computer, you can run the following command in the terminal to add extra usage during the super offpeak hours each day:

awk -F, -v increment=10 'BEGIN{OFS=FS=","}{
if ($3 == "\"12:00 AM\"") {
gsub(/"/, "", $5);
$5 = "\"" sprintf("%.4f", $5 + increment) "\"";
$7 = "\"" sprintf("%.4f", $7 + increment) "\"";
}
print $0
}' "Electric_60_Minute_11-1-2022_11-30-2022_20230819.csv" > output.csv

After running the command, you will have a new file named output.csv. Then you can use it as the input for the bill comparison script.

About

compare SDGE plans using your own usage data


Languages

Language:Python 100.0%