import pandas as pd
import plotly.express as px
import plotly.subplots as sp
import textwrapTidyTuesday dataset of 2025-08-12
attribution_studies = pd.read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/main/data/2025/2025-08-12/attribution_studies.csv')
attribution_studies_raw = pd.read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/main/data/2025/2025-08-12/attribution_studies_raw.csv')attribution_studies| event_name | event_period | event_year | study_focus | iso_country_code | cb_region | event_type | classification | summary_statement | publication_year | citation | source | rapid_study | link | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | European summer heatwave | 2003 | 2003 | Event | NaN | Europe | Heat | More severe or more likely to occur | "We estimate it is very likely (confidence lev... | 2004.0 | Stott, P. et al., 2004: Human contribution to ... | Nature | No | https://www.nature.com/nature/journal/v432/n70... |
| 1 | Global temperature extremes | since 1950 | NaN | Trend | NaN | Global | Heat | More severe or more likely to occur | "Comparing these observations with climate mod... | 2005.0 | Christidis, N. et al., 2005: Detection of chan... | Geophysical Research Letters | No | https://agupubs.onlinelibrary.wiley.com/doi/fu... |
| 2 | Record warm autumn in Europe | 2006 | 2006 | Event | NaN | Europe | Heat | More severe or more likely to occur | "Global warming has made a warm autumn like th... | 2007.0 | Van Oldenborgh, G-J. et al., 2007: How unusual... | Climate of the Past | No | http://www.clim-past.net/3/659/2007/cp-3-659-2... |
| 3 | Increasing frequency of 'very warm' Northern h... | 1860-2009 | NaN | Trend | NaN | Northern hemisphere | Heat | More severe or more likely to occur | "We detect the dominant influence of anthropog... | 2007.0 | Jones, G. et al., 2007: Human contribution to ... | Journal of Geophysical Research: Atmospheres | No | https://agupubs.onlinelibrary.wiley.com/doi/fu... |
| 4 | Moscow summer heatwave | 2010 | 2010 | Event | RUS | Europe | Heat | More severe or more likely to occur | "For July temperature in Moscow, we estimate..... | 2011.0 | Rahmstorf, S. & Coumou, D. 2011: Increase of e... | Proceedings of the National Academy of Sciences | No | http://www.pnas.org/content/108/44/17905.abstract |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 739 | China growing season hot and dry events | mid 1990s | Mid-1990s | Event | CHN | Eastern and south-eastern Asia | Compound | More severe or more likely to occur | "Anthropogenic forcing changes can explain 60%... | 2024.0 | Su Q. et al., 2024: Anthropogenic Influence on... | Advances in Atmospheric Sciences | No | https://doi.org/10.1007/s00376-023-2319-z |
| 740 | China hot-wet events | 1979-2014 | NaN | Trend | CHN | Eastern and south-eastern Asia | Compound | Decrease, less severe or less likely to occur | "Over the past 40 years, anthropogenic activit... | 2024.0 | Yao H. et al., 2024: Changes caused by human a... | Communications Earth & Environment | No | https://doi.org/10.1038/s43247-024-01625-y |
| 741 | Heat extremes behind bleaching of the Great Ba... | 2020, 2024 | 2017, 2020, 2024 | Event | AUS | Australia and New Zealand | Impact | More severe or more likely to occur | "Climate model analysis confirms that human in... | 2024.0 | Henley B.J. et al., 2024: Highest ocean heat i... | Nature | No | https://doi.org/10.1038/s41586-024-07672-x |
| 742 | Heat-related neonatal deaths in low- and middl... | 2001-2019 | NaN | Trend | NaN | Global | Impact | More severe or more likely to occur | "Climate change was responsible for 32% (range... | 2024.0 | Dimitrova. A. et al., 2024: Temperature-relate... | Nature Communications | No | https://www.nature.com/articles/s41467-024-498... |
| 743 | Hospitalisations in China due to heat | 2000-2019 | NaN | Trend | CHN | Eastern and south-eastern Asia | Impact | More severe or more likely to occur | "In the 2010s, the heat-related attributable f... | 2024.0 | Zhou. L. et al,. 2024: Quantification of the H... | Environmental Health Perspectives | No | https://ehp.niehs.nih.gov/doi/10.1289/EHP14057 |
744 rows × 14 columns
attribution_studies['event_type'].value_counts()event_type
Heat 207
Rain & flooding 177
Drought 106
Storm 61
Cold, snow & ice 57
Impact 33
Compound 33
Wildfire 31
Oceans 25
Atmosphere 7
Sunshine 4
River flow 3
Name: count, dtype: int64
attribution_studies['event_name'].value_counts()event_name
Europe heatwave 13
California drought 7
Northern Europe summer heatwave 7
Damages from UK flooding 4
Global temperature extremes 4
..
Yangtze river extreme rainfall 1
Extreme flooding in Missouri 1
France floods 1
Storm Desmond heavy rains 1
Hospitalisations in China due to heat 1
Name: count, Length: 678, dtype: int64
attribution_studies['classification'].value_counts()classification
More severe or more likely to occur 554
No discernible human influence 71
Decrease, less severe or less likely to occur 66
Insufficient data/inconclusive 53
Name: count, dtype: int64
classification_labels = {
'More severe or more likely to occur': 'More Severe/Likely',
'Decrease, less severe or less likely to occur': 'Less Severe/Likely',
'No discernible human influence': 'No human influence',
'Insufficient data/inconclusive': 'Insufficient Data'
}
# sunburst plots
sunburst_data = attribution_studies.groupby(['study_focus', 'classification', 'event_type']).size().reset_index(name='count')
sunburst_data['classification'] = sunburst_data['classification'].map(classification_labels)
sunburst_data = sunburst_data.dropna(subset=['classification'])
event_focus_count = sunburst_data[sunburst_data['study_focus'] == 'Event']['count'].sum()
trend_focus_count = sunburst_data[sunburst_data['study_focus'] == 'Trend']['count'].sum()
fig = sp.make_subplots(rows=1, cols=2, specs=[[{'type':'domain'}, {'type':'domain'}]],
subplot_titles=(f'Event Focus ({event_focus_count})', f'Trend Focus ({trend_focus_count})'))
fig.add_trace(px.sunburst(sunburst_data[sunburst_data['study_focus'] == 'Event'],
path=['classification', 'event_type'], values='count').data[0],
row=1, col=1)
fig.add_trace(px.sunburst(sunburst_data[sunburst_data['study_focus'] == 'Trend'],
path=['classification', 'event_type'], values='count').data[0],
row=1, col=2)
fig.update_layout(title_text='Effect of climate change on extreme weather attributions – <br><span style="color:blue">More severe</span>, <span style="color:green">Less severe</span>, <span style="color:red">No human influence</span>, and <span style="color:purple">Insufficient data</span>.')
# Save figure
fig.write_html('sunburst_plots_by_study_focus.html')
#fig.write_image("weather_attribution.png")
fig.show()write_image didn’t work. HTML file was processed in inkscape to generate high resolution image.