Impact of natural disasters on consumer behavior: Case of the 2017 El Niño phenomenon in Peru

El Niño is an extreme weather event featuring unusual warming of surface waters in the eastern equatorial Pacific Ocean. This phenomenon is characterized by heavy rains and floods that negatively affect the economic activities of the impacted areas. Understanding how this phenomenon influences consumption behavior at different granularity levels is essential for recommending strategies to normalize the situation. With this aim, we performed a multi-scale analysis of data associated with bank transactions involving credit and debit cards. Our findings can be summarized into two main results: Coarse-grained analysis reveals the presence of the El Niño phenomenon and the recovery time in a given territory, while fine-grained analysis demonstrates a change in individuals’ purchasing patterns and in merchant relevance as a consequence of the climatic event. The results also indicate that society successfully withstood the natural disaster owing to the economic structure built over time. In this study, we present a new method that may be useful for better characterizing future extreme events.

Here P i (t) is the total number of purchases by individual i in a given month t, and |T | i is the number of months in which individual i made at least one purchase. It should be noted that we considered only individuals with more than $30 of purchases in all months. We then computed the normalized cumulative distribution function C(f ) as a function of the fraction f of people (12).
Based on the cumulative AMP, we split the population into nine economic classes (see Fig. S1 a). Subsequently, we derived a set of demographics from the individuals in our dataset S1 such as the social class distribution, population pyramid, and gender imbalance. The population pyramid of our dataset appeared to be in accordance with the population pyramid of the Peruvian population [4]. However, our dataset appeared to have a bias toward the male population because we observed a gender imbalance. This was also observed in a study by [17] that used the same type of dataset for Mexico instead of Peru.
Finally, we computed the GINI coefficient G (13) based on the (AMP) and found coefficient values ranging from G = 0.60 to 0.66 instead of G = 0.433, as provided by the World Bank [5]. This substantial difference between the two coefficients may be due to two phenomena. First, we may have had an overrepresentation of upper-class individuals in our dataset that may have biased some of our results [6]. Second, the GINI coefficient we computed here is based on the AMP only; that is, it is based on people's spending instead of taking into account their income plus the benefit received from social programs [7].
District level analysis of the Kullback-Leibler divergence In Fig. S2, we present the daily evolution of the KLD per district of the greater area of Lima (Peru) over the two years of our dataset. This figure illustrates that the KLD remained neutral (at approximately zero), which signifies that the spending distribution of the area remained consistent with the average spending behavior of the district. In contrast, when a divergence appears, it signifies that the spending distribution shifted from its normal behavior. Fig. 2 also demonstrates that the February 2017 events impacted most of Lima's districts, and a spike on February 20 can be clearly observed. A subset of districts was also impacted twice by the February and March events, including the district of Los Olivos, Magdalena del Mar, and San Miguel. The February event observed was partially due to flooding caused by the Rimac and Huaycoloro rivers affecting the district of San Juan de Lurigancho. Second, during the March event, there was a substantial increase in consumption due to low supply and the overvaluation of necessities, such as mineral water, rice, and meats. Among the 42 districts of Lima, official reports [8] established that the most affected districts were the districts of Chaclacayo, San Juan de Lurigancho, Cieneguilla, Punta Hermosa, Pucusana and Rimac (see Fig. S2). In Fig. S2, the KLD measure displays a spike of activity in the reported districts during the events. This spike is a clear indication that a sudden shift in the consumption pattern occurred during the events. However, at the macroscopic level, the change in consumption behavior did not seem to persist for a long time after the events. With regard to the variation in the impact of El Niño between February and March 2017 (see Fig. 3), there was a decrease in the number of negatively impacted districts from 20 in February to 17 in March (see Fig. S3 a). The same pattern occurred with positively impacted districts with a reduction from 11 in February to 8 in March (see Fig. S3 b). Finally, we note that more districts became neutral from: 12 in February and 18 in March (see Fig. S3 c).

k-core decomposition dynamic of the transaction graph
In Fig. S4 we consider the k-core decomposition [9] of the transaction graph to explore the graph evolution, and how many transactions are distributed in each of the k-shells of the transaction graph. In Fig. S4 a we considered each time slice of the transaction graph G t at time t and compared it with the shell number of a node u at t + ∆t (where ∆t = 1 day). The fact that the figure is not symmetric is an indication that when a node steps down from its k-shell position, it goes down many steps, on the contrary whenever a node enhances its k-shell position, it climbs up only one step at a time. In Fig. S4 b, we see how the number of transactions is distributed into each of the k-shells (the sum of the in-weights of all nodes that belong to the k-shell k).