Adding plot with membership counts by month/year #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request will add a plot to the join page to show the growth of us-rse over time! Here is a quick snapshot:
How does it work?
The data itself is read from a simple csv file, memberCounts.csv, that is served from data. It's a file that includes month/year, count, and totals. We have it organized by month/year because the units specified here directly determine the scale of the Y axis for the plot, and we don't want it to be uneven (@cosden can comment on this because he pointed it out!) Here is the current data:
Importantly, the data is programatically generated (but not downloaded to the file) in the Spreadsheet associated with the updated Google form, and historical data has been summarized and included, also by month, in the same format. I included both the historical raw data and the script to generate the counts so there is absolutely no doubt about how it was produced here: https://gist.github.com/vsoch/b86537e3b9171a2292e0587f20bd47fe
For the spreadsheet (admins of the organization have access) there is a second tab:
And the historical data generated from the gist above is highlighted in yellow at the top. Notice that the first column after the date is general counts, and the third column uses that counts column plus the cell above it to keep a running total.
Important July 2019 is a special case, because we have BOTH data generated from the new form, along with historical data. Thus, to generate the count, we have a formula PLUS the original count from the spreadsheet (45)
This means that all following cells have that same calculation, but without the +45, which serves to look in the previous sheet for entries in column A from row 1 through 100000, and count cells
that have the YEAR corresponding to the YEAR in the current sheet's AX (for example, 2019) and the Month in the same sheet's AX (for example July). The result of this calculation is the count of timestamps in the previous sheet that have any record in July of 2019.
And so, to update the data for the site, you can either export to csv (and replace the whole thing or just the recent months) or just copy paste and replace the spaces with commas. The export is nice because it preserves the commas in quotes for the dates.
Signed-off-by: Vanessa Sochat vsochat@stanford.edu