RAVEN NEIL [06] BILL ESTIMATOR
LAUNCH APP

CENPELCO Bill Estimator: Your Electricity Bill from the Current Rates

A web app that estimates your CENPELCO electricity bill from your kWh usage, using the current residential rates for Lingayen, Pangasinan, and lists every charge.

Category Civic · Rates
Model / Runtime Python scraper · JavaScript
Host bill.ravenneil.com
Status
ONLINE
SYSTEM DIAGRAM · /apps/bill PIPELINE STAGE [01] CENPELCO site Public rates page STAGE [02] Python scraper GitHub Actions schedule STAGE [03] Bill estimator Itemized in the browser DATA rates.json committed to the repository · No database · No backend
FIGURE 6 · BILL ESTIMATOR PIPELINE

[01] Overview

CENPELCO, the electric cooperative for central Pangasinan, publishes its rates for each billing period as a long list of separate charges: generation, transmission, distribution, system loss, taxes, and subsidies. Working out a bill from that list by hand is tedious.

The Bill Estimator keeps a copy of the latest residential rates for Lingayen and turns them into a simple calculator.

Goal

Enter your kWh and get an itemized estimate based on the current official rates.

[02] How It Works

A Python script loads CENPELCO's public rates page, reads the list of billing periods, picks the latest one, and requests the residential rates for Lingayen from the same JSON endpoint the page uses. It saves the raw response and a cleaned version, bill/rates.json, listing every charge with its group and whether it is billed per kWh or as a flat amount.

A GitHub Actions workflow runs the script on a schedule and commits the file only when the rates change, so the site always serves the latest period without a database or server.

Part What it does
scraper.py Finds the latest billing period and downloads its rates
rates.json Every charge with its category, group, type, and rate, plus the generation source breakdown
GitHub Actions Runs the scraper on a schedule and commits any changes
app.js Loads the rates and computes the estimate in the browser

[03] The Calculator

You enter your total kWh for the billing period. Each per-kWh charge is multiplied by your usage, flat charges such as the metering charge are added once, and the page lists every charge, grouped by category with subtotals, and the estimated total.

The page also shows the full rate table and where the cooperative's power came from that period, with each supplier's share of energy and cost. Estimates are for reference only; your actual bill is the final word.

[04] Deployment & Console

The estimator runs at bill.ravenneil.com as static files: one HTML page and one script, in the same design as this site, with light and dark themes.

Service status comes from the Raven Neil Console.