-
Notifications
You must be signed in to change notification settings - Fork 3
Donation Thermometer
The website used to have a "thermometer"-like visualization tracking whether donations to Diversity Scholarships are hitting some of the matching funds provided by generous organizational donors (see 2022, for instance). But Google changed the public JSON URLs for Sheets so the old thermometer.js code stopped working.
Our current solution is a progress chart which can be published and then embedded on the site. A few notes:
- the donations spreadsheet doesn't need any particular structure as long as there's a progress chart
- manually set the chart's vertical axis maximum to the donation goal
- publish the chart (the sheet itself should not need to be public)
- copy the embed code (iframe) and edit it into general-info/angel-fund.html
- set site.data.conf.angel-fund.thermometer to
true
(if you placed the embed code within that if condition)
We can make multiple charts in this manner if there are multiple matching funds. The spreadsheet equations should be straightforward. Fi=or instance, if there's a sheet of donation rows each with amount donated in column A and a fund code in column B, then a SUMIF(B2:B,'abcd',A2:A)
formula sums the total donated to fund code "abcd".