Calculator to automatically determine water modifications (work-in-progress, details in comments)

Summary

I'm making a calculator that suggests mineral and acid additions based on you current and desired water profiles. It's still a work-in-progress, so I would advise double-checking the results in something like Bru'n Water for now. Here it is.

Longer

A few weeks ago I made a post about a program I had written to automate the way I use Bru'n Water. It seemed unnecessary to fiddle around with mineral additions to try to hit a particular target profile, when the computer could do that for me. The program only worked on the command line, and only calculated mineral additions, not acid additions. Also, the separation of mash/sparge additions was based on my own misunderstanding of what Bru'n Water was telling me.

Since then, I've talked to a few people who know a lot more about water chemistry than myself, and done a lot of reading. I rewrote the prototype to handle Residual Alkalinity calculations, and made a web-based version .

I'm hoping other people find this tool useful too. I'm using it for a brew day today. Full disclosure: those Amazon links are affiliate links. I don't think I can quit my day job, but I hope this thing can buy me a new bottle of Star San.

A Call for help

Right now, I only have two cities' water profiles listed. If you post your city's water profile to this thread, I'll add it. Also, I only have a couple of target profiles listed. I don't really want every target profile ever, but maybe a curated list that includes the ones that are most generally useful. What target profiles do y'all think are useful. The preferred format for sending profiles is like this:

"Cambridge, MA, 2013": {
    "calcium": 20.8,
    "magnesium": 4.0,
    "sodium": 79.0,
    "sulfate": 28.0,
    "chloride": 120.0,
    "bicarbonate": 60.5
}

Lastly, if any coders know a lot about water chemistry, it would be nice to have someone review my math. The prototype is probably easier to read, and I'm pretty confident that the web version does match the prototype.

Using it in your site

I've put an MIT license on the code, so anyone is free to take it and use it for any purpose, including making money off of it. You just can't blame me if anything goes wrong. If you ask me, I might be able to provide limited help in helping you set it up in your site, but my free time comes in fits and starts, so I can't promise to stick to any schedule.

/r/Homebrewing Thread Link - jcipar.github.io