Hi folks,
crazY! write a gem to scan SP Services bills when it only takes a few moments to manually transcribe them?
Why bother? A few reasons:
- SP Services website is very limited. They don't give you data, just your bill in PDF format
- Other services like https://www.gogreenpost.com/ aren't focused on
service data or usage insights either. They are more into (a) go paperless (b)
keep track of paying on time [neither of which I find compelling (done already); I
think they really should pivot to focus more on actionable insights -
but that's another story!]
OK, to be honest I just brushed off some old code I had just for the fun of it, and because I was inspired to try some R by Sau Sheong's new book
Exploring Everyday Things with Ruby and R.
So I've just pushed a first (very definitely alpha) version of the
sps_bill gem. What does it do?
- it provides a ruby library and CLI to scan SP Services bills (the PDF statements you can download from https://services.spservices.sg/) and extract the interesting data
- I've added an initial example R script and sample data sets that produce analyses like this
But I am really looking for help at this point to test it out more:
1) to verify it can handle the range of bills that SP Services send out. Attempting to read structured data from PDFs is a fraught exercise. I am able to read the past year of my own bills, but that doesn't prove much. Do you have very long bill statements? An unusual combination of services? A commercial account (if they are different)? A multi-property bill (if there is such a thing)?
I have setup the test suite so that it is a piece of cake to drop your own bills and run a full test - see the
README for details.
I'd *really* appreciate the help of everyone who could try this out. When you do - email me direct or post on the github issues page.
2) or maybe you are more interested and the analytics. My R skillz are rudimentary, and I've only started to touch the surface - just doing basic trending so far. Many more questions: how strongly correlated is the usage of different services? can we identify inflection points in trendlines?
Check out the scripts directory for more, including a sample data set. I'd appreciate it even if you can just help critique my R.
So after all this, have I learned anything from taking a much closer look at my bills than I ordinarily would? Oh yes:
First: By looking at trends over a year+, I was able to see a major change in my usage.
- You don't see this in the 6-month charts that SP Services include in your bill.
- Specifically: I was astounded by a significant step down in water an electricity usage at a certain point ... that happens to correspond to when I had all our original (7+ year old) aircon units replaced. It seems like the new aircon really is much more efficient - but I never realised just how much better until now.
Second: It's clear that current meter data is too poor for meaningful use as an aid to optimising energy and water use
- I'm still serviced by meters that are manually read every 3(?) months or so
- The pro-rating and adjustments that SP Services apply are too inaccurate to be able to see fine trends in detail.
- e.g. if you change a shower head and want to know if it is improving your water usage, you are best served to go and check you meter yourself rather than rely on the meter readings that show in your bill.
- I believe we are getting new meters soon. Hopefully they are the smart kind that allow automated remote reading.
- Now I'm hoping that SP Services will then give its customers access to download the raw daily meter data. That data really *would* be useful for monitoring behavioural changes to see the actual impact on energy and water usage. Anyone heard anything along these lines?
- If they give us the data, I will most happily put the sps_bill gem into early retirement!
Cheers,
Paul