Texas Electric Data

previous day

previous week

Total Demand is plotted with units on the left. Spinning reserve and wind generation are plotted with units on the right. The first graph is for the previous day and the second is for the previous week.

Time Data

While the line frequency is nominally 60Hz, it varies slightly depending on load. If you used the line to run a clock it would run fast or slow at different times. What follows are plots of that time error as recorded from ERCOT.

2020 time error

That plot is updated daily. Older data:

Technical Details

I was interested in the power demand in Texas and found a page at ERCOT that provided real time information updated once a minute. The problem was that this did not give any idea of trends and I could not locate a web site that provided a graph. So it was time to write some code to do it myself. Since I had done something like this before for the old Earthlink news servers, I decided to put up a web page with a plot of the data in case someone else might find it interesting.

The first step was to grab the data. For this I used a program I found.

The only problem here is that the data is embedded in HTML tables which makes it tricky to extract. I have used many programming languages but Perl seemed the best choice here even though I am at best a dabbler. I found the Treebuilder package and it really helped. But if ERCOT ever changes the format of this web page, it will almost certainly break my code and require changes. Once I extracted the data I appended it to a data file as a single line.

To automate the process I built a shell script and scheduled it to run every five minutes using cron.

Now that I have the data all that is left is to plot it. For this I use gnuplot. It is easy to feed gnuplot a command file to generate the plot and create an image. All that is left is to upload it to the server. Another simple shell script for ftp does the job here. Once again I use cron to automate the process of generating a plot once a day and uploading it.

2013 Update

I recently acquired a Raspberry Pi and set it up as a webserver. So I decided to let the Pi handle this job for me. I made a few minor changes including using wget and having the getdata script use sleep instead of being invoked by cron. (cron writes an entry to /var/log/syslog whenever it starts something and I want to minimize writes to the flash memory.)

Home