Skip to content

Commit

Permalink
[MNT] Insert Plausible analytics script (#100)
Browse files Browse the repository at this point in the history
* insert Plausible analytics script

* add Dash docs ref

* add study info to README
  • Loading branch information
alyssadai authored Oct 18, 2024
1 parent 854c188 commit 5d8da01
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# US Climate Emotions Map
Interactive web app for visualizing US survey results about climate change emotions.
Interactive infographic for exploring US survey results on climate change emotions among young people aged 16-25,
from the following study:

["Climate emotions, thoughts, and plans among US adolescents and young adults: a cross-sectional descriptive survey and analysis by political party identification and self-reported exposure to severe weather events."
[Lewandowski, R.E, Clayton, S.D., Olbrich, L., Sakshaug, J.W., Wray, B. et al, (2024)
_The Lancet Planetary Health_, 11 (8)]](https://www.thelancet.com/journals/lanplh/article/PIIS2542-5196(24)00229-8/fulltext)


## Development environment
Expand Down
22 changes: 22 additions & 0 deletions climate_emotions_map/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,28 @@
],
)

# Plausible analytics script (see also https://dash.plotly.com/external-resources#usage)
app.index_string = """
<!DOCTYPE html>
<html>
<head>
{%metas%}
<title>{%title%}</title>
{%favicon%}
{%css%}
<script defer data-domain="us-climate-emotions-map.org" src="https://plausible.io/js/script.outbound-links.js"></script>
</head>
<body>
{%app_entry%}
<footer>
{%config%}
{%scripts%}
{%renderer%}
</footer>
</body>
</html>
"""

app.layout = dmc.MantineProvider(construct_layout(), forceColorScheme="light")

server = app.server
Expand Down

0 comments on commit 5d8da01

Please sign in to comment.