-
Notifications
You must be signed in to change notification settings - Fork 2
Update stats on homepage #17
Comments
Is this not going to be slow to load? |
Yeah, imagine it will have the same stutter as the data page. Any ideas for improving speed? Or maybe could change design to be more like the data page, rather than inline. |
I can think of a few options:
|
I opened a duplicate issue, not realizing this one already existed, where I asked:
Can we replace the static numbers currently used with an API call for current number(s)? @laurentS commented there: We actually have some of these stats (area mapped) on this page https://mapswipe.org/en/data.html which are crunched on each page load. The geojson file weighs over 1MB now, which is a lot just to produce one number. I'd lean towards setting up a github actions job that runs weekly or daily to update that number, either directly in the page(s) or in a small stats file that we can then fetch on each page load. And we can add the other 2 numbers in there at the same time. I'm not sure what the best option would be to get the number of volunteers, as I'm not even sure how we defined this number in the first place: number of accounts on firebase? number of active users in the past X months? As for the countries mapped, I think we could extract that from the same geojson file as the area, unless we have a better source. |
Make the overview stats on the homepage H2 update automatically, similar to the data page.
The text was updated successfully, but these errors were encountered: