|
|||
Why does this exist?
My wife and I started raising chickens, and we had a feed with too much protein in it. There's wasn't any online handy calculator for just plugging in your numbers of how to get to the correct amount of feed to mix in at a different protein percentage. Our book on chickens had a reference to Pearson's Square, which I'd never heard of at all. The approach was interesting for sure, and is a handy way to calculate it by hand. My wife was familiar with it from some papers she had written relating to population studies (one of her master's degrees is in public health). Being the geek that I am, and needing a break from the usual math I'm flogging around -- trig and algebra, mostly -- I thought I'd take a break and make something that others could also use. I'm also rusty on javascript, so that was a nice quick refresher. At any rate, now this exists, and anyone is free to use it online or download it and use it. You can also get the code here. Protip on the code: if you think that amount1 and amount2 are labeled backwards, then you need to read the pdf of Pearson's Square again. They go across the diagonal, hence the seeming inversion. This really took me a while to wrap my mind around, particularly the second case, but I'd say that was time well spent. Hopefully for some actual farmers, or other backyard chicken enthusiasts, this will come up in search results and be handy. These two formats are opposites of one another, so you can check your work (or my work, as the case may be) and verify that the math works both directions. Looks good so far. If you want to use this code anywhere else, attribution would be nice but is not required. Consider this to be released under as permissive a license as you can imagine. | |||
Website Design and Content Copyright 2007-2020 Chris McElligott Park.
Photography Copyright 2020 Merritt Chesson.
|