Data comes from the EIA. They release company revenues ($), sales (kWh), and # of customers for residential. We calculate the rate as revenues / sales (and correcting for units). It's a bit more nuanced than that, like we sum up all of the revenues and sales for each company that is owned by or merged into the specific company (adjusting for % ownership as well).
The numbers are definitely not perfect, and for many companies are a year behind (they only report to the EIA yearly), so that's why there might be a major different in prices (there has been a MAJOR increase in electricity prices in the past couple of months). There are some companies that we have exact rate data for, and those rates are visible on the page when that's the case.