neurodatascience / us_climate_emotions_map

Interactive infographic for survey results on climate change emotions of US youth
https://us-climate-emotions-map.org
MIT License
0 stars 2 forks source link

Investigate serializing all plots before/at startup to speed up app #87

Closed alyssadai closed 3 weeks ago

alyssadai commented 1 month ago

Per question (subquestion="all"), we need 6 variations of graphs:

  1. Per state, we need 2 plots:
    1. one with threshold=None (showing all endorsement/response levels)
    2. one with threshold=DEFAULT_QUESTION["outcome"] (thresholding responses at "3+")
    3. For national-level responses (state=None), we need 4 plots:
    4. one with threshold=None (showing all endorsement/response levels)
    5. one with threshold=DEFAULT_QUESTION["outcome"] (thresholding responses at "3+")
    6. one with threshold=None AND stratify=True (stratify bar graph by party affiliation)
    7. one with threshold=DEFAULT_QUESTION["outcome"] AND stratify=True

List of states can be obtained from one of the following:

List of questions can be obtained from:

Where should the figures live?

Maybe under code/assets/, and the script can live in code/?

alyssadai commented 1 month ago

Hey @surchs, thanks for helping to tackle this issue!

I've updated the iss description with more details of the total variants of graphs needed, and where you can find the necessary question/state info. Let me know if I missed anything!

surchs commented 1 month ago

So the good news is: serialization works nicely. The bad news is: loading the serialized object into memory takes around 45 seconds. We'll have to see how often the dashboard will actually do that.