Mining Social Media to Identify Heat Waves

Heat waves are one of the deadliest of natural hazards and their frequency and intensity will likely increase as the climate continues to warm. A challenge in studying these phenomena is the lack of a universally accepted quantitative definition that captures both temperature anomalies and associated mortality. We test the hypothesis that social media mining can be used to identify heat wave mortality. Applying the approach to India, we find that the number of heat-related tweets correlates with heat-related mortality much better than traditional climate-based indicators, especially at larger scales, which identify many heat wave days that do not lead to excess mortality. We conclude that social media based heat wave identification can complement climatic data and can be used to: (1) study heat wave impacts at large scales or in developing countries, where mortality data are difficult to obtain and uncertain, and (2) to track dangerous heat wave events in real time.


Introduction
Heat waves are amongst the deadliest of natural hazards [1][2][3]. The European heat wave during the summer of 2003 resulted in 22,000 to 70,000 excess deaths [4], while the Russian heat wave of 2010 caused 56,000 [5]. The duration, frequency, intensity and extent of heat waves has also increased since the end of 20th century, and climate models project this will continue with global warming in the near future [6][7][8]. Heat waves are also expected to be exacerbated by other global trends like increasing urbanization [9][10][11], and will impact human health, as well as ecosystems, economy, electricity and water consumption [12].
To ensure consistent and comparable studies across institutions, countries, and disciplines, a common definition of a heat wave is necessary. The Glossary of Meteorology (GoM) formally defines a heat wave as "a period of abnormally and uncomfortably hot and usually humid weather" [13]. Whilst a widely accepted definition, it is ambiguous in the absence of quantitative guidelines. This is reflected in the great range of heat wave definitions employed in the literature, which can differ in terms of metrics (e.g., maximum temperature, minimum temperature, mean temperature, apparent temperature), selected threshold that needs to be exceeded (e.g., an absolute threshold, a percentile, or a an anomaly from the climatological mean), or duration of the exceptional conditions (usually ranging from 2 to 5 days at least) [14]. Numerous researchers have attempted to organise the proposed definitions [14][15][16][17][18][19], but a universal solution remains elusive. One reason is that, looking at the GoM definition, it is relatively easy to quantify the abnormality of temperature and humidity, but the quantification of discomfort for the population is a much harder problem.
Critical thresholds to identify heat waves are often selected through regression analysis of the temperature-mortality relationship [19][20][21][22][23][24][25][26][27][28][29][30][31][32]. However, there are practical challenges that limit this We download and count the tweets containing the phrases "heat wave India" and "heatwave India" between 1 January 2010 and 31 December 2017 and the dataset is fully available [46]. To overcome the Twitter API limitations in the number of downloadable tweets and the time span that can be covered, we use a "scraping" algorithm contained in the GetOldTweets-Python package that accesses the Twitter platform, searches for the desired phrases, scrolls down and downloads all the results [47]. The drawback of the methodology is that it cannot access the tweet geolocation. For this reason we include the country name in the search phrase. These data are likely to only cover a small fraction of the tweets related to extreme temperatures within the country, as many people will presumably not include "India" in the tweet, or may use different, possibly more expressive, wording, but by using a single phrase we ensure consistency. The selected keyword is less ambiguous than other common expressions like "hot". We can assume that the use of a subset of all tweets referring to Indian heat waves is representative of the full sample and filters only the most significant events, which are likely the ones affecting population health. This approach hence provides a conservative test of our hypothesis.
The number of daily tweets about heat waves in India is then normalised to account for the varying number of active Twitter users over time. The global number of active Twitter users per quarter, between 2010 and 2017, was accessed through the Statista website that collected and organised publicly available data from Twitter [48]. The dataset is shown in Figure 1. For finer temporal resolutions, a linear interpolation is used. The number of daily tweets about heat waves in India is then normalised to account for the varying number of active Twitter users over time. The global number of active Twitter users per quarter, between 2010 and 2017, was accessed through the Statista website that collected and organised publicly available data from Twitter [48]. The dataset is shown in Figure 1. For finer temporal resolutions, a linear interpolation is used. Finally, to compare Twitter data to heat wave definitions, the time series of daily tweets about heat waves in India is converted to binary using a 2-tweet threshold: i.e., we consider that a heat wave has occurred if we count at least two tweets per day (other thresholds were tested as well, but resulted in lower correlation with climate-based heat wave definitions).

Climate Data
To calculate climatic indicators and heat wave definitions we need temperature and relative humidity data for India. Station data at a daily temporal resolution is not easy to access in India, spatial coverage is not always sufficient, records length variable, and quality inconsistent; thus we use the European Centre for Medium-range Weather Forecasts (ECMWF) ERA-interim re-analysis, available between 1979 and 2017 at 0.75° lat/lon and 6 h resolution through the ECMWF API service [49]. ERA-interim provides air temperature at 2 m and relative humidity is derived from air and dew point temperatures [50]:

Population Data
We hypothesise that the mortality impact of a heat wave is proportional to the number of affected people. To consider this aspect, temperature, Heat Index and Excess Heat Factor (better defined in Section 2.4) scaled with population data are also considered and compared to mortality datasets. Population data is obtained from the Gridded Population of the World dataset, adjusted according to the United Nation World Population Prospect (UN WPP-Adjusted Population Density, v 4.10) [51]. The dataset refers to 2015 and is downloaded at a resolution of 0.25° lat/lon, subsequently re-gridded on the 0.75° grid of the ERA-interim climatic data. Finally, to compare Twitter data to heat wave definitions, the time series of daily tweets about heat waves in India is converted to binary using a 2-tweet threshold: i.e., we consider that a heat wave has occurred if we count at least two tweets per day (other thresholds were tested as well, but resulted in lower correlation with climate-based heat wave definitions).

Climate Data
To calculate climatic indicators and heat wave definitions we need temperature and relative humidity data for India. Station data at a daily temporal resolution is not easy to access in India, spatial coverage is not always sufficient, records length variable, and quality inconsistent; thus we use the European Centre for Medium-range Weather Forecasts (ECMWF) ERA-interim re-analysis, available between 1979 and 2017 at 0.75 • lat/lon and 6 h resolution through the ECMWF API service [49]. ERA-interim provides air temperature at 2 m and relative humidity is derived from air and dew point temperatures [50]:

Population Data
We hypothesise that the mortality impact of a heat wave is proportional to the number of affected people. To consider this aspect, temperature, Heat Index and Excess Heat Factor (better defined in Section 2.4) scaled with population data are also considered and compared to mortality datasets. Population data is obtained from the Gridded Population of the World dataset, adjusted according to the United Nation World Population Prospect (UN WPP-Adjusted Population Density, v 4.10) [51]. The dataset refers to 2015 and is downloaded at a resolution of 0.25 • lat/lon, subsequently re-gridded on the 0.75 • grid of the ERA-interim climatic data.

Heat-Wave Related Mortality
We use three heat wave excess mortality datasets to account for the uncertainty in heat-related mortality data: (1) the international EM-DAT database [52], (2) the official data from the National Disaster Management Authority (NDMA) [53] and (3) the data manually extracted from the seasonal and annual reports from India Meteorological Department (IMD) retrieved from the MAUSAM: Quarterly Journal of Meteorology, Hydrology, and Geophysics repository. All the sources provide annual data and the IMD reports also provide data at monthly resolution, which is then used to reinforce the analysis at a finer temporal scale.

Selection of Climatic Indicators
The correlation between mortality data, number of tweets and a set of nine climatic indicators is considered. As mortality data is only available at yearly scale, yearly climatic indicators are selected as well. The selected indicators are chosen to cover a variety of metrics (maximum daily temperature, mean daily temperature, Heat Index, Excess Heat Factor and affected population) and different statistics (absolute maximum or threshold exceedance):

Selection of Regions Most Affected by Heat Waves
Most of the data in this work is not available at regional scale. However, the IMD reports about the weather offer some information on the distribution of the heat-related deaths throughout the different Indian states.
A summary is shown in Table 1, and the position of the selected states and all the other states is shown in Figure 2. We cannot repeat the analysis for all the Indian states, thus we select the two most affected ones in the study period (IMD reports available only up to 2015). It must be noted that the IMD source of mortality data is the most uncertain one, thus we decided to test the approach on only two states, as the uncertainty becomes too large for smaller mortality numbers. According to the table, we select the states of Andhra Pradesh and Telangana. Subsequently, we download tweets containing the strings "heat wave Andhra Pradesh", "heatwave Andhra Pradesh", "heat wave Telangana", and "heatwave Telangana".

Selection of Heat Wave Definitions
Heat wave definitions, contrarily to climatic indicators, only return a binary outcome (heat wave/no heat wave) calculated on the basis of climatic data. Here some of the most common are selected.
2.4.1. The Official IMD Definition (IMD) Figure 2. Indian states. The two selected for the regional analysis being the most affected by heat waves in the study period, Andhra Pradesh and Telangana, are highlighted in the figure.

Selection of Heat Wave Definitions
Heat wave definitions, contrarily to climatic indicators, only return a binary outcome (heat wave/no heat wave) calculated on the basis of climatic data. Here some of the most common are selected.

The Official IMD Definition (IMD)
The IMD adopts a heat wave definition that uses a mix of absolute and relative thresholds. A heat wave is declared in any Indian location if at least one of the following three conditions occurs [43]: where T M is the maximum daily temperature, T M is the average of the maximum daily temperature over the 30-year reference period, and the symbol ∨ represent the logical operation "or". No minimum duration is set.

The 95th Percentile for 2+ Days of Daily Mean Temperature (T95)
Heat wave definitions based on the exceedance of a relative threshold for a certain duration are very popular and several combinations of relative thresholds and durations are tested in literature.
Here we select a threshold equal to the 95th percentile of daily mean temperatures for a duration of 2 or more days, as it is popular in literature [20,25,27,54].

The 95th Percentile for 2+ Days of Daily Heat Index (HI95)
The Heat Index (H I) has been used for a long time, especially in the USA, and is also known as apparent temperature. Although many definitions exist, we use an empirical equation that describes H I[-] as function of air temperature T[ • F] and relative humidity R[%] [55]: A heat wave is defined as a period of at least two days in which the mean daily heat index exceeds the 95th percentile of mean daily heat index [56].

The Excess Heat Factor (EHF)
The Excess Heat Factor (EHF) has been introduced relatively recently [3,57], but has grown in popularity [22,[58][59][60]. The EHF is the combination of two components: the Significance Excess Heat Index (EH I sig ) represents the 3-day average temperature to capture unusually high heat that is not sufficiently discharged overnight, while the Acclimatisation Excess Heat Index (EH I accl ) represents the 30-day average temperature, to consider people adaptation to previous climatic conditions: where T 3d is the average of the mean daily temperature over three days, T 95 is the 95th percentile of mean daily temperatures and T 30d is the 30-day average of mean daily temperatures. A heat wave is defined as a period of any length when the EHF is positive.

Evaluation of Climatic Heat Wave Definitions
As heat wave definitions are binary, we select five binary skill scores to compare the heat wave definitions to the Twitter data. The binary skill scores are described in Equations (7)- (11). They are 7 of 19 based on the following definitions: a is the number of heat wave days both identified by Twitter and by the considered climatic definition; b is the number of heat wave days occurred according to Twitter, but not captured by the climatic definition; c are the number of heat wave days that are not identified by Twitter, but that the climatic definition considers as heat wave days; d is the number of days that are not considered as heat wave days by neither Twitter nor the climatic definition:

Characteristics of Twitter Data
Examples of heat wave related tweets are given in Tables 2 and 3. Table 2 shows tweets containing the phrase "heat wave India" in January 2015, as an example of tweets that are not related to real-time heat wave events in India (as January is a month of lower temperatures).    Table 3 shows a small extract of the tweets containing the same phrase in April 2015 as an example of tweets likely related to an event happening in real-time, as April and May 2015 experienced one of the worst recent heat waves in India [61].
We count the number of tweets containing the phrase "heat wave India" or "heatwave India" each day to obtain a quantitative indicator (Figure 3). The time series have an exponential behaviour, which persists even after scaling by the global number of active Twitter users. Figure 4 shows the histograms of the number of tweets per day and of the number of tweets per day per million Twitter users in a log-log scale and the histograms show an almost linear behaviour.  Table 3 shows a small extract of the tweets containing the same phrase in April 2015 as an example of tweets likely related to an event happening in real-time, as April and May 2015 experienced one of the worst recent heat waves in India [61].
We count the number of tweets containing the phrase "heat wave India" or "heatwave India" each day to obtain a quantitative indicator (Figure 3). The time series have an exponential behaviour, which persists even after scaling by the global number of active Twitter users. Figure 4 shows the histograms of the number of tweets per day and of the number of tweets per day per million Twitter users in a log-log scale and the histograms show an almost linear behaviour.

Comparison with Mortality Data
The number of tweets per year containing the phrases "heat wave India" and "heatwave India" scaled by the number of active Twitter users shows a significant correlation with the three heat-related mortality datasets ( Figure 5). Three mortality datasets (EM-DAT, National Disaster Management Authority-NDMA, and India Meteorological Department-IMD), are used to better account for the uncertainty in heat-related excess death information. The Pearson and the Spearman's ranking correlation coefficients, measuring the degree of linear and monotonic relationship respectively, are calculated between the mortality data, the tweets, and the nine climate-based heat wave indicators presented in Section 2.2 are compared as well. The correlation between heat-related tweets and mortality is much stronger than between mortality and the climate-based indicators (Table 4). Twitter interest captures the extraordinary 2015 heat wave particularly well. We note also that this outlier does not overly affect the correlation, as it remains significant if the Spearman's Rank coefficient (which is more robust to outliers) is used instead (

Comparison with Mortality Data
The number of tweets per year containing the phrases "heat wave India" and "heatwave India" scaled by the number of active Twitter users shows a significant correlation with the three heatrelated mortality datasets ( Figure 5). Three mortality datasets (EM-DAT, National Disaster Management Authority-NDMA, and India Meteorological Department-IMD), are used to better account for the uncertainty in heat-related excess death information. The Pearson and the Spearman's ranking correlation coefficients, measuring the degree of linear and monotonic relationship respectively, are calculated between the mortality data, the tweets, and the nine climate-based heat wave indicators presented in Section 2.2 are compared as well. The correlation between heat-related tweets and mortality is much stronger than between mortality and the climate-based indicators ( Table 4). Twitter interest captures the extraordinary 2015 heat wave particularly well. We note also that this outlier does not overly affect the correlation, as it remains significant if the Spearman's Rank coefficient (which is more robust to outliers) is used instead ( Table 5).    The number of tweets scaled with the number of Twitter users is the only dataset that consistently reaches a significantly high correlation with all the three mortality datasets, both in terms of Pearson and Spearman's ranking correlation coefficient (significance above 0.9 for both correlation coefficients and for all mortality datasets). Given the small number of samples and the uncertainty in the mortality data, some of the other indicators also reach high correlation values with good significance, but are not consistent throughout the three mortality datasets and score lower correlation and significance values than the Twitter dataset (see for example T mM in Table 4 or T di f f M and H I di f f Mpop in Table 5). Our results therefore indicate that Twitter data is a better indicator of aggregate heat mortality than climatic indicators.
Mortality data from the EM-DAT and the NDMA datasets are only available at yearly scale. However, the IMD reports account for mortality at monthly scale too. The Pearson correlation coefficient between the number of Tweets per month per million user and the heat-related mortality per month is 0.96, while the Spearman's ranking correlation coefficient is 0.56 (both with significance >0.99), showing that the correlation holds at monthly scale as well. Figure 6 shows how the number of tweets per million user and the number of heat-related deaths compare at monthly scale. correlation and significance values than the Twitter dataset (see for example in Table 4 or and in Table 5).Our results therefore indicate that Twitter data is a better indicator of aggregate heat mortality than climatic indicators.
Mortality data from the EM-DAT and the NDMA datasets are only available at yearly scale. However, the IMD reports account for mortality at monthly scale too. The Pearson correlation coefficient between the number of Tweets per month per million user and the heat-related mortality per month is 0.96, while the Spearman's ranking correlation coefficient is 0.56 (both with significance >0.99), showing that the correlation holds at monthly scale as well. Figure 6 shows how the number of tweets per million user and the number of heat-related deaths compare at monthly scale.

Regional Comparison with Mortality Data
The same analysis is repeated for the states of Andhra Pradesh and Telangana. Results are reported in Tables 6 and 7.

Regional Comparison with Mortality Data
The same analysis is repeated for the states of Andhra Pradesh and Telangana. Results are reported in Tables 6 and 7.

Evaluation of Climatic Heat Wave Definitions
We have shown that heat wave related tweets are better correlated to heat-related mortality than other climatic indicators. Nevertheless, the use of climatic heat wave definitions is necessary, as weather data usually have longer historical records, at finer spatio-temporal resolution and allow for forecasting. Because mortality data are limited to the annual timescale, we investigate impactful heat wave detection by climate-based definitions using the daily twitter series as our reference heat wave series. This decision reflects the established strong correlation between mortality and heat wave tweets, which we assume can also identify impactful heat episodes at the daily timescale. We therefore converted the tweets to a binary series of heat wave occurrence based on a threshold of two heat wave tweets per day. Other thresholds were tested as well, but resulted in lower correlation with climate-based heat wave definitions.
These definitions are chosen either because of their relevance for the case study (IMD), or because of their popularity in literature (T95, HI95, and EHF). Contrary to the continuous climatic indicators considered for comparison with mortality, heat wave definitions are binary, i.e., differentiate between heat wave and no heat wave occurrence. For parity in our use of Twitter data as a reference we consider a heat wave day when at least two tweets about heat waves in India occur in the same day. The verification problem is of binary nature (heat wave/no heat wave), and five binary skill scores are used: Percentage Correct, Hit Rate, Miss Rate, False Alarm Rate, and Bias. The skill scores are calculated for each of the climate-based definitions and reported in Table 8. The calculated scores provide information on different aspects of the heat wave/no heat wave distribution identified with the different definitions. The Bias shows that all the definitions significantly over estimate the number of heat wave days, of 1.74 to 2.00 times the number of days identified as heat waves with Twitter. This has an effect on the False Alarm Rate, which is very high (0.4 to 0.52). However, not all the days identified as heat waves by Twitter are identified as heat waves by the other definitions, resulting in a Hit Rate between 0.86 and 0.90 (and a complimentary Miss Rate of 0.10 to 0.14). This overestimation of heat wave days is confirmed by the ratio between the number of heat wave days and the total number of days between 2010 and 2017 (Table 9). Table 9. Ratio between the number of days identified as heat wave days and the total number of days considered (TW = Twitter).

Discussion
At first, we look at the tweets containing the phrases "heat wave India" or "heatwave India". The occurrence of such tweets when no real-time heat wave event happens is rare and isolated in time, while the tweets referring to an event happening in real-time are much more frequent and tend to be re-tweeted multiple times (as shown by the repetition of the same text in multiple tweets). The tweets referring to a real-time heat wave event in India seem to be mostly from news channels or informative webpages (web links in Table 3), confirming that Twitter can be used as a proxy for news media [34,35,62]. This is also due to the use of the keywords "heat wave" and "heatwave", which is more formal than other popular expressions. However, when an event occurs, re-tweets, presumably mostly from the general public, constitute the majority of tweets, which suggests that Twitter can capture the reaction of the affected population. The tweet containing the string "Mercury crosses 40-degrees Celsius mark in north India", shown 6 times in Table 3, is actually re-tweeted 38 times on the 19th April alone and during the peak of the 2015 heat wave the count of heat wave related tweets reached more than 9000 tweets in one day on the 26th May 2015. Most of the tweets also contain a link to a webpage, where more information about the context can be retrieved.
The number of tweets containing the heat wave related phrases is the main indicator used in this work and is scaled by the number of active Twitter users over time to account for the different tweeting base. The number of users active worldwide is used because we do not limit the origin of tweets geographically. Twitter is used by around 30 million people in India, about 2.2% of the population [63]. However, we observed that many of the tweets are from media sources and other informative channels, which report significant events in the whole country. Furthermore, it is reasonable to assume that Twitter users are concentrated in cities, where about 40% of the Indian population lives, thus making the tweets relevant for a larger share of the population. Even after being scaled by the number of users, the number of tweets per day have an power law behaviour, probably due to the occurrence of re-tweets and strongly non-linear popularity dynamics [64,65] (Figures 3 and 4). This might be one of the reasons why annual Twitter data correlate better than temperature indicators with mortality data, suggesting that heat related mortality could have an exponential behaviour, as no significant adverse health effects are expected up to certain temperatures and then the impact on health gets exponentially worse for any increase in temperature or heat wave duration [66][67][68].
The comparison with some yearly temperature indicators in Tables 4 and 5 highlights the reason why a simple quantitative definition of heat wave is not easy to find: although temperature is the trigger for heat-related mortality by definition, it is not easy to identify one single indicator that summarises the heat threat to human health, but rather many factors (maximum daily temperature, minimum night temperature, duration of the extreme weather, indoor/outdoor conditions, humidity, adaptation, and more) play a role. While the climatic heat wave definitions try to identify heat waves using a combination of causes (it is hot, thus people feel uncomfortable), the Twitter-based heat wave identification detects heat waves using an effect (people feel uncomfortable, thus they tweet about it), which makes the nature of the datasets very different. For this reason, it is expected that the tweet indicator implicitly takes into consideration a multitude of complex effects (e.g., adaptation-people start tweeting less about heat wave as they get adapted to certain heat conditions).
The strong correlation between the number of tweets per million users and the number of heat-related deaths holds at monthly scale as well, suggesting that the relationship is strong at finer temporal scale as well.
Repeating the analysis at regional level on the two states of Andhra Pradesh and Telangana confirms the good ability of Twitter to capture the consequences of heat waves, in this case represented by heat-related mortality. In particular, a very high Pearson correlation coefficient is observed, which may be skewed by the 2015 event, but a high Spearman's ranking coefficient is observed as well, less affected by outliers. However, a better performance of climatic indicators is observed at regional level, in particular of the HI indicator, which seems to capture well the causality of heat waves and their consequences in the studied regions. Indeed, the two most affected states are geographically proximal, as shown in Figure 2, thus the climatic dynamics causing mortal heat waves are similar and more uniform, therefore easier to summarise in one climatic indicator. The South-East of India is more tropical and humid than other heatwave-prone states like Maharashtra, Madhya Pradesh, Uttar Pradesh or Gujarat. This means that the Heat Index, considering humidity as well as temperature, does well for Andhra Pradesh and Telangana, but is not able to capture all the different climatic dynamics causing uncomfortably hot conditions in India. Twitter, instead, seems to be able to capture heat-related mortality trends particularly well at medium-large scales, and therefore its added values lies in particular at larger scales.
Twitter-based heat wave identification shows very different characteristics compared to the climatic heat wave definitions. To start, notice the ratio between heat wave days and total days ( Table 9): it is striking that the climatic heat wave definitions identify a heat wave occurring in the Indian subcontinent almost 2 days out of 3, while Twitter identifies only 1 out of 3. Although they look like high figures, there are two aspects that need to be considered: (1) in this work a day is considered as a heat wave day if even only 1 location in India, a country of 3.3 million km 2 , is experiencing heat wave conditions; (2) all the climatic definitions are based on climatological statistics (mean or percentiles) that are calculated over the previous 30-year period and are hence not adjusted to warming in current climate. Several studies have already observed climatic changes on the Indian climate, with increases in mean and extreme temperatures [69,70], but also an increase in heat wave frequency [44,45] and our results are consistent with this trend. However, it is still noteworthy that Twitter identifies only around half the heat wave days compared to climatic definitions (Table 9). This suggests that, while climatic definitions are more conservative, which is a good characteristic for forecasts and warnings (i.e., it is better to have a false alarm than a missed warning), Twitter can better identify the days that are uncomfortable to the population. It must also be considered that we used an empirical two-tweet threshold for the binary Twitter time series: if we used a higher threshold, it would have resulted in an even larger difference between Twitter heat wave identification and climatic heat wave definitions.
Finally, four different climatic heat wave definitions are compared. The definition by IMD has the best hit rate (and complementarily the lowest miss rate). The T95 definition and the EHF definitions have a lower bias (−11% and −12% respectively, compared to IMD), resulting in a lower false alarm rate (−18% and −20% respectively) and higher percentage correct value (+8% and +10% respectively), which denotes less over-estimation of heat wave days, but have a lower hit rate (−3% and −2% respectively), which denotes less precision. The differences between the T95 and the EHF scores are minimal, but the EHF bias is slightly lower (−2%), suggesting that considering cumulative short-term effects and seasonal adaptation has a small, but observable effect. Finally, the HI95 definition, based on the Heat Index and thus corrected for humidity performs a little worse, having both high bias and low hit rate. The reason why the Heat Index is not performing as well as other indices is due to the fact that heat waves occur during the dry season in India, when humidity is low. Our results provide confidence in the IMD definition, which is operationally used to issue warnings. The high bias shows that, although lacking some precision, the definition is conservative and issues warnings in most potentially dangerous situations, while the high hit rate suggests precision in identifying heat waves in the Indian climate.
However, it is clear that, despite the differences between them, the climate-based definitions produce results more similar to each other than the heat wave identification method based on Twitter. The conservative nature of the climatic heat wave definitions, the possibility to be applied to future weather forecasts, and the availability of weather data at fine spatio-temporal scale makes the use of climatic heat wave definitions particularly well-suited to issue warnings and forecasts. Additionally, the availability of long time series of weather data allows the use of climate-based definitions when considering heat wave trends and climate change. However, Twitter showed significantly better performance in estimating heat related mortality that is not addressed by climatic heat wave definitions. More complex heat wave definitions considering climatic, socioeconomic and demographic factors could have performed better in capturing heat-related mortality, but it would reinforce the concept that heat-related mortality is not captured by any simple climatic indicator, but by a complex combination of factors. The Twitter signal and the climatic definitions can, therefore, be seen as complementary to one another.
The presented work is the first analysing the use of Twitter for heat wave identification at large geographical scale and as such it is more of a proof of concept rather than an exhaustive analysis of the methodology's advantages and disadvantages. India has been selected as a case study as it is a large developing country strongly affected by heat waves, but only limited and uncertain data was available for the analysis. Following work will need to verify how Twitter works to identify heat waves in different contexts and with more data, maybe using other languages than English. The use of Twitter data to identify heat waves is used as a proxy for heat wave mortality and morbidity, and as such it has a limitations: (1) only a part of the population uses Twitter and usually not the most affected portion (elderly, infants, homeless); (2) the selected keywords do not capture all the tweets about heat waves and not all the identified tweets are indeed about real time heat waves; (3) social media data is affected by popularity of certain topics and complex social dynamics, which may vary the frequency of heat wave related tweets independently on the heat wave occurrence. However, in spite of these approximations the proxy still shows a significant ability to identify dangerous heat wave events and therefore can be very useful.
A real-time tracking of heat wave related tweets can be used to identify real-time discomfort conditions, prioritising any response in space and time. This has already been used successfully for earthquake response for example [38], and our results suggest that a similar approach could be used to identify dangerous heat waves in real time as well. Additionally, heat wave related tweets can also be used as a time series of past heat waves, identifying impactful events to improve understanding of event drivers [71] and facilitate targeted adaptation [72]. This would be particularly, useful in developing countries where mortality data are scarce, difficult to access, and very uncertain, and for studies at larger scales. Indeed, one of the biggest limitations of heat wave impact studies so far is that they usually cannot address large (national/international) scales, as mortality data are available only at hospital/community level. Twitter data could help fill this gap in research.

Conclusions
This study has shown that the number of tweets about heat waves in India has a strong correlation with the number of heat-related excess deaths, holding through spatial and temporal scales, and that Twitter is more precise in identifying heat wave events that have an impact on the population. This is a precious resources that should not be seen as a replacement of climatic data, but rather an integration.
We see two primary role of Twitter data for heat wave identification. On the one hand, Twitter can be used in real time to detect heat wave events that are dangerous for the population, in particular at larger geographical scales. On the other hand, the scientific community is working hard to identify quantitative heat wave definitions able to capture the health effects of heat, but a great challenge is the lack of consistent, large scale, heat-related mortality or morbidity datasets. Several studies in several different communities result in different conclusions about the best heat wave definition in this regard. Twitter data, although less precise than hospital records, are available worldwide, are much more easily accessible, and could make the difference in identifying heat wave definitions that are effective in capturing heat impact on health globally. Although this study only analyses India and availability of data is limited, the conclusions could be relevant for other developing countries and more work needs to be done to evaluate Twitter strengths and limitations in a heat wave identification context. It is clear from this work, that the use of social media in identifying heat waves holds considerable promise for increasing societal resilience to the growing challenges posed by extreme heat.