1 Introduction

Food demand patterns have changed dramatically in Vietnam over the past 30 years. The “Đổi Mới” economic reforms of 1986 began a period of swift economic growth that had major positive impacts on the overall quality of life for Vietnamese citizens, including an improvement in diet quality (Dien et al., 2004; Dollar et al., 2004; Thang & Popkin, 2004). This increase in quantity, quality, and diversification of food types relied heavily on formal and informal wet markets. Currently, these food outlets continue to play a key role in food retail in both urban and rural areas; regardless of a household’s income status and geographic location, traditional wet markets account for the largest share of household food expenditure (Raneri et al., 2019).

Despite the development of modern retail outlets in urban and peri-urban areas (Vo & Smith, 2017), traditional wet markets remain the main source of fresh food (i.e., meat, fish and seafood, eggs, fruits and vegetables) in both rural and urban areas. They offer several advantages to consumers, such as easy access, freshness of food, and social interactions associated with trust and food origins (Wertheim-Heck et al., 2019). In Hanoi, wet markets still account for about 90% of vegetable sales, providing significant daily nutrient intake, including 56% of energy, 70% of protein, 80% of vitamins A and C, and approximately 70% of calcium, iron and zinc (Raneri & Wertheim-Heck, 2019). In contrast, modern retail outlets, including supermarkets and chain convenience stores, offer mostly non-food and ultra-processed food items (Harris et al., 2020). Hence these food outlets are not yet an important food source (Raneri et al., 2019), even for urban consumers. Therefore, despite recent development affecting the food retail sector, wet markets remain crucial for ensuring the food security of millions of consumers in Hanoi.

Given the importance of wet markets in Hanoi and in Vietnam in general, an understanding of food flows and trades within wet markets is critical for guiding policy makers in taking informed decisions to ensure food security for Vietnamese citizens. Nonetheless, food flows in wet markets remain largely invisible in official statistics due to the absence of traceability systems and the use of outdated sales registration systems. In fact, vendors and market management boards rely on manual records to track daily product sales, rather than following a standardized system. This recording method has demonstrated vulnerabilities, including errors in recording and the potential loss of records. This makes it challenging to study the impact of economic shocks on such markets. Consequently, alternative types of data are needed to better understand trends and consumer behavior in these markets.

In recent years, different types of cellphone metadata, such as location, date, and time a user makes a phone call, its duration, and its status (incoming, outgoing, or canceled), have been used to better understand human mobility and behavior (Ghahramani et al., 2019; Williams et al., 2015). This metadata has been explored to analyze the behavior of vulnerable populations for whom there is a lack of data, such as refugees and migrants (Hong et al., 2019; Kutscher & Kreß, 2018; Pastor-Escuredo et al., 2019). Traditionally, analysis of the behavior of such populations is heavily reliant on census and survey datasets and on interviews (Hong et al., 2019). Collection of such datasets is expensive and time consuming. Therefore, analysts consider cellphone data as efficient datasets, complementing traditional methods (Pastor-Escuredo et al., 2019). This interest in cellphone metadata analysis has exploded with the surge of the COVID-19 pandemic (Kishore et al., 2020). For instance, Google has made smartphone geolocation data, aggregated at global and national levels, publicly available to help policy makers to better understand the impact of the pandemic (Google LLC, 2022a).

Using mobile phone metadata for research has certain limitations. First, sampling bias is a significant concern. Analysis of mobile phone metadata is limited to individuals who own smartphones, which inherently introduces bias towards the population that can afford such devices (Lazer & Radford, 2017). Second, ownership bias poses a challenge. A smartphone is not always linked to a single person, as multiple individuals may use the same device. This makes it difficult to accurately attribute specific behaviors or patterns to an individual (Arai et al., 2016). Finally, while mobile phone metadata can reveal valuable information about behavioral patterns, it falls short of providing insight into the underlying reasons behind these patterns and how they change over time. Researchers must use complementary methods or rely on the existing literature to understand the motivations and drivers behind the observed behaviors.

The full magnitude of the impact of the COVID-19 pandemic on food systems and food environments is yet to be determined (Béné et al., 2021). During the first year of the pandemic, Vietnam’s very quick response was praised internationally. During 2020, only 1,456 cases were identified, and all were quickly quarantined. The country suffered only 35 deaths due to the virus (World Health Organization, 2020). Vietnam’s policy response to the COVID-19 pandemic was characterized by an immediate reaction, a high level of prioritization, and highly coordinated political mobilization (Đỗ et al., 2020). Vietnamese authorities had already issued seven COVID-19 related official documents before January 23, 2020 (Le et al., 2021), when the first two cases of COVID-19 were declared on Vietnamese territory. By the end of July 2020, 959 policy documents had been issued by 33 different public agencies, illustrating the prompt and proactive response of the Vietnamese government (Le et al., 2021).

None of the policies issued within the first year of the pandemic specifically targeted wet markets. Even during the “Hanoi lock-down” from March 31 to April 23, 2020 (Directive No. 16/CT-TTg), which consisted of stricter social distancing measures and included the closure of “non-essential” businesses, food businesses (including supermarkets, convenience stores and wet markets) were exempt from closure (Directive No. 05/CT-UBND). On the other hand, informal markets and street vending in general were banned throughout the city following a decision by Hanoi People’s Committee on March 13, 2020 (Official Letter 871/UBND-KT). Such restrictions together with reduced urban-rural mobility have had a strong negative impact on street vendor livelihoods (Turner et al., 2021).

To better characterize the behavioral changes of market actors and understand the impact of COVID-19 on Hanoi’s wet markets during the first stage of the pandemic, we analyzed and interpreted mobile device tracking data. From July 2019 to November 2020, 25 Wi-Fi access points were formally established in five wet markets under the direct supervision of the district authorities in Hanoi. The access points provided free internet access to market users while collecting data on the number of Wi-Fi-enabled devices present in the market at any given time. The data allowed us to understand the flows of food and people by characterizing the behavior of market actors and the frequency of their visits. We hypothesized that market actors changed their food purchasing behavior during the pandemic. Behavioral changes could be due to: (a) the swift response of the Vietnamese government, which resulted in restrictions that sharply reduced citizen mobility (Le et al., 2021); (b) fear of social interaction that could lead to contagion (Munster et al., 2018; Spiehler & Fischer, 2021); (c) fear about safety in wet markets triggered by reports linking the emergence of COVID-19 to a wet market in Wuhan, Hubei Province, China (Cohen, 2020; Li et al., 2020; Mizumoto et al., 2020; Spiehler & Fischer, 2021); and (d) reduced income (Kang et al., 2021). We explored consumer behavior by testing the following hypotheses:

  1. 1.

    The overall number of visits to wet markets dropped significantly during the first phase of the pandemic.

  2. 2.

    The frequency with which consumers purchased food from wet markets decreased during the first phase of the pandemic.

  3. 3.

    Consumers spent less time at wet markets.

  4. 4.

    Consumers changed the time of day at which they visited wet markets

  5. 5.

    Retailers reduced their visits to wholesale markets, leading to a significant decrease in inter-market visits.

Given the timeline of the initial project, we could determine a pre-shock baseline (based on data from the second half of 2019). Therefore, our results focus on the first six months of the outbreak, covering only the “first wave” of the COVID-19 pandemic in Vietnam

2 Materials and methods

2.1 Study area

Two Hanoi districts, Cầu Giấy and Đông Anh, one urban and one peri-urban (Haan et al., 2020; Huynh et al., 2021) were selected for this study. The traditional market system in Vietnam is usually divided into three categories based on the number of food stores: class 1: > 400 stores, class 2: 200–399 stores and class 3: < 200 stores. As shown in Table 1 and Fig. 1, five traditional markets, including wholesale and retail, were selected. To ensure representativeness of market types, two retail markets were selected in each district, one under Class 2 and the other under Class 3. As shown in Table 1, TO market is considered as a wholesale market at night and a retail market during the day. As there is no wholesale market in the urban district (Cầu Giấy), a wholesale market in a nearby urban district (Bắc Từ Liêm) was selected for the study, as it is known to provide food products to most of the markets in the surrounding area. The five selected markets are all under direct management of the district authorities.

Table 1 Characteristics of wet markets included in this study
Fig. 1
figure 1

Market locations in Hanoi, with background from Open Street Map (OpenStreetMap contributors, 2021), showing the five markets in the study: Đồng Xa (DX), Nghĩa Tân (NT), Trung Tâm (TT), Tó (TO) and Minh Khai (MK)

2.2 Data collection

To monitor the behavior of different market actors, we set-up Wi-Fi routers and signal amplifiers to register and keep track of each “Active Scanning” request received. Active scanning is a probe request regularly sent by any device with Wi-Fi connection enabled to detect available Wi-Fi hotspots. Devices must share their Media Access Control (MAC) address, a unique device identifier, when sending an active scanning request. This allows us to register all the devices present in the market, whether or not they are connected to the Wi-Fi network, and their movement in space and time. For instance, a simple metric that can be extracted from this system is to count the average number of individual phones passing near the Wi-Fi access points. Indeed, by counting the number of individual MAC addresses within a certain range of the access points, we can get an indicator of the number of people present in the market at 2-min intervals. To ensure anonymity of all the devices and their respective owners, all the collected MAC addresses were anonymized through a Secure Hash Algorithms (SHA-3 256) hashing function (Dworkin, 2015) together with a randomly generated 4096-bit salt value. The hashed MAC addresses ensure anonymity, while the hashing is consistent across all markets and during the whole period of the analysis. We can therefore ensure that a given MAC address found in two different markets or periods will correspond to the same device. Combining the original data with a large salt value is a common step in the application of a one-way cryptographic hash function, such as SHA-3 (Gilchrist, 2003). In this case, it is used as a secret key without which it is nearly impossible to retrieve the anonymized MAC address corresponding to a given original MAC address, even if both the database and the original MAC address are known.

The goal of this study was to assess the behavior changes of market actors before and after the first wave of the COVID-19 outbreak in Vietnam. Data available between July 2019 and July 2020 were compiled and aggregated among four periods with the exact same number of days, each starting on a Monday and ending on a Sunday. Each period is exactly 11 weeks. As described in Table 2, each of these periods represents a key step in the impact analysis.

Table 2 Definition of the periods studied for the impact analysis

The official number of daily COVID-19 cases was accessed and compiled for the same four periods from the World Health Organization (2020). Finally, a set of key measures implemented by the Vietnamese government to mitigate the propagation of the virus was compiled from multiple online sources and peer-reviewed literature.

2.3 Data filtering

To ensure comparability and to reduce noise in the data, a series of steps were implemented to filter the list of device observations that were collected. First, the period just before, during and immediately after Tết (lunar new year celebration, January 2020) was removed from the analysis, as it is a period with a markedly different pattern to the rest of the year, as seen in Fig. 2. Second, all randomized MAC addresses were removed from the database, to ensure high data quality. To increase security, modern devices generate a random MAC address for each access point with which they communicate (Apple Inc., 2022; Cisco Systems Inc., 2021; Google LLC, 2022b). The removal of randomized MAC addresses is implemented directly within the Wi-Fi routers, and we are therefore not able to report the number of observations that were discarded based on this criterion. The third step was to remove all observations with a signal strength (RSSI) of less than 30. Based on tests in situ, this threshold includes only devices that are up to about 5 m away from the access points and reduces the risk of registering devices outside of the markets. Finally, all devices that were seen only once and for less than 10 min during the whole study period were removed from the datasets. This was to remove passersby who were only very weakly related to the markets.

Fig. 2
figure 2

Time series showing the number of devices seen aggregated daily and across all markets during the study period. Key events and directives are highlighted as follows: 1) Prime Minister issued a first directive against COVID-19 (Official Letter No. 121/CD-TTg dated January 23, 2020); 2) Prime Minister established a national steering committee for prevention and control of COVID-19 (Decision 170/QD-TTg); 3) Prime Minister issued directive No. 16/CT-TTg ordering a nationwide isolation of 15 days from April 1 to 15, 2020; 4) No new community-transmitted cases were registered in the country from this moment until the end of the study, and all imported cases were kept under strict quarantine on arrival; and 5) Directive No. 16/CT-TTg was issued on April 23, 2020, ending national social-distancing measures

2.4 Data aggregation

2.4.1 Dataset 1: Aggregation at device level

For each device remaining after data filtering, the following metrics were computed:

  • An anonymized MAC address

  • The name of the market where the phone was seen

  • The median time at which the user is first seen in the markets (in minutes starting at 0 from midnight)

  • The median time at which the user is last seen in the markets (in minutes starting at 0 from midnight)

  • The average number of visits made to the market daily. A period of at least 2 h must elapse between two consecutive observations of the same user in the market for the observations to be counted as different visits.

  • The average time spent in the market per visit

  • The average number of visits per week

  • The total number of days that a user was seen in the market

  • Total time spent in the market

2.4.2 Dataset 2: Aggregation in time

Based on the data aggregated at the user level, two additional levels of aggregation were implemented to assess the impact of COVID-19 on market actors’ behavior. The first level is designed to assess whether an impact on the number of visits to the markets can be observed. We compiled visits into a daily time series within each market for the whole duration of the study.

2.4.3 Dataset 3: Aggregation by market user type

The third level of aggregation is designed to better understand which categories of market users were most impacted by the COVID-19 outbreak and the actions taken to mitigate propagation. This was achieved in two steps. First, the devices dataset was further filtered to only include devices that were seen in at least two different periods to increase comparability amongst periods. Second, each device was categorized into three types of behavior given the following rules:

Passerby:

devices seen between 2 and 11 times over the 11 weeks (strictly less than once a week).

Frequent:

devices seen between 11 and 44 times over the 11 weeks (once to strictly less than four times per week).

Very frequent:

devices seen between 44 and 77 times over the 11 weeks (between four and seven times per week).

Additionally, for each period studied, users were assigned to the following categories: “new” if the device had not been seen during previous periods, “out” for devices that were not seen again in the following period, and “break” for devices that skipped a period but were seen again during the study. These data were produced for each period to better understand the dynamics of change across time for each category.

2.4.4 Dataset 4: Aggregation at inter-market level

To study the connectivity of the different markets, all the devices that were detected in pairs of markets were identified and compiled into a weighted network graph. Each vertex of the graph represents a market, while the weighted edges represent the strength of the connection between each pair of markets, measured by the total number of devices seen in both markets during each of the four key periods studied. These graphs are particularly useful to visualize the level of connectivity between each pair of markets.

2.5 Hypothesis testing

All the hypotheses presented hereafter were tested following the standard method of assessing and rejecting the alternative null hypothesis under a certain significance level. The level chosen for this study to reject the null hypothesis, and thus validate the original hypothesis, was set to P < 0.01.

Hypothesis 1:

The overall number of visits to wet markets dropped significantly during the first phase of the pandemic.

To explore the existence of a drop in wet market visits during the shock period, we tested the null hypothesis stipulating that no change was observed amongst the four periods studied. We computed the daily average number of visits, based on the time series from dataset 2, over the four periods of the study and compared each period against the baseline. A Student’s t-test was used to verify the significance level of differences in frequency of visits.

Hypothesis 2:

The frequency with which consumers went to purchase food at wet markets decreased during the first phase of the pandemic.

To better understand the impact of the first phase of the pandemic on the frequency of visits, we normalized dataset 4 with respect to the baseline for the pre-shock, shock, and aftershock data. We then computed descriptive statistics metrics for each period to explore the differences within each category of market user with respect to the baseline.

Hypothesis 3:

Consumers spent less time in wet markets.

To identify a statistically significant difference in the duration of time that consumers spent in the market, we tested the null hypothesis that there was no significant difference amongst the periods studied. To do so, we used the average duration spent in the market per visit from dataset 1. The first step of the analysis was to define consumers as owners of devices that were seen in retail markets for strictly less than one hour per visit. We then compared the distribution of durations in each period with the baseline using a two-sample Kolmogorov-Smirnov test. As an alternative hypothesis for the Kolmogorov-Smirnov test, we defined the visits that happened during the periods following the baseline as being shorter.

Hypothesis 4:

Consumers changed the time of day at which they visited wet markets.

To identify a shift in consumer behavior in terms of the time of day at which markets were visited, we used the median time at which devices were first seen in the markets from dataset 1. As previously, we first defined consumers as owners of devices that were seen in retail markets for strictly less than one hour per visit. We then computed the distribution of times at which devices were observed in the markets separately for the morning and afternoon and performed a peak analysis to identify the two busiest times of the day. Finally, we tested the null hypothesis that no change was observed with respect to the baseline for each subsequent period using a two-sided Kolmogorov–Smirnov test.

Hypothesis 5:

Retailers reduced their visits to wholesale markets, leading to a significant decrease in inter-market visits.

To assess if there was a significant decrease in inter-market visits, we tested the null hypothesis that no difference can be observed between the baseline and subsequent periods. To do so, we used dataset 4. First, we normalized the connectivity strengths of the pre-shock, shock, and aftershock periods with respect to the baseline. We then computed the average normalized weights and performed a Student’s t-test to assess if the null hypothesis could be rejected.

3 Results

3.1 Data filtering

Scanning the markets every two minutes over all the time periods studied yielded a total of 173,668,702 observations, where each observation is a specific device being seen at a specific date and time (Table 3). After filtering out all observations with signal strengths too weak to be included, 13,238,809 usable observations remained. After aggregating these observations, a total of 656,789 different devices were observed in the markets between July 29, 2019 and July 5, 2020.

Table 3 Total observations before and after data filtering

3.2 Hypothesis testing

Hypothesis 1:

The overall number of visits to wet markets dropped significantly during the first phase of the pandemic.

Figure 2 shows the time series of the number of devices seen daily, together with the official number of COVID-19 cases published by the Vietnamese authorities. The first COVID-19 cases were registered during Tết festivities. A series of measures was taken very quickly, and, for instance, schools were asked to remain closed after the Tết break for a duration of three months. As cases were increasing in the country, the Hanoian authorities mandated a partial lock-down between April 5 and 23, 2020. Finally, after the lock-down and most other restrictions were lifted, no additional community-transmitted cases were registered in the city; subsequent cases were those imported from foreign countries and were kept under strict quarantine.

As shown in Fig. 2, the number of devices seen daily in the markets was on average lower following Tết celebrations and for the whole remaining period analyzed. The impact analysis shows that the average number of devices seen in the markets dropped from \(\mathrm{1,1}28\pm 164\) during the baseline to \(836\pm 128\) during the shock period and \(787\pm 176\) during the aftershock period (Table 4). On the other hand, the pre-shock period is relatively similar to the baseline, with devices seen daily on average. For both the shock and aftershock periods, the Student’s t-test found that the null hypothesis, stipulating that there are no differences between these periods and the baseline, should be rejected with \(P<0.001\) in both cases. There is therefore a statistically significant decrease in the number of visits to the wet markets between the baseline and the shock and aftershock periods. On the other hand, \(P=0.6>0.01\) was observed when comparing the pre-shock period to the baseline, resulting in the conclusion that there is no statistically significant difference between those two periods. As shown in Table 4, a statistically significant difference between the baseline and pre-shock periods was identified only in TO market, which registered a \(16\%\) decrease with respect to the baseline during the pre-shock period. Overall, NT market was the most sharply impacted with a drop of \(48\%\) observed during the shock period and \(49\%\) during the aftershock period. TT, DX and TO markets saw a decrease in frequency of visits of between \(12\%\) and \(32\%\) during the shock period and a slight increase in frequency of visits during the aftershock period, with values ranging between \(8\%\) and \(20\%\) below that of the baseline period. Finally, the wholesale market (MK) registered one of the smallest decreases during the shock period (\(11\%\)) but this was followed by the sharpest decrease recorded during the aftershock period of \(47\%\) compared to the baseline. This finding should be interpreted in light of the many power outages that occurred in MK market during the aftershock period. Although measures were taken to mitigate the impact of missing data, as explained in the Materials and Methods section above, a lack of data values occurred very frequently in the aftershock period in this market and thus the frequency of visits rate may be underestimated.

Table 4 Number of devices seen in each market and relative difference with respect to the baseline

In summary, we conclude that the overall number of visits to wet markets dropped significantly during the first phase of the pandemic, confirming our first hypothesis.

Hypothesis 2:

The frequency with which consumers went to purchase food at wet markets decreased during the first phase of the pandemic.

Figure 3 and Table 5 show the changes in actor behavior during each of the periods studied. Across all the periods studied, passersby represent \(89.8\%\pm 1.2\%\) of the total population, frequent visitors \(7.6\%\pm 0.7\%\) and very frequent visitors \(2.5\%\pm 0.5\%\). Although very frequent visitors make up the smallest share of the whole population, it is this category that registered the sharpest changes during the shock and aftershock periods. With respect to the baseline, very frequent visitors decreased by \(37\%\) during the shock period and \(47\%\) during the aftershock period. On the other hand, passersby decreased by \(17\%\) and \(25\%\) over the same periods. Finally, frequent visitors decreased by \(33\%\) during the shock period and remained at this level during the aftershock period.

Fig. 3
figure 3

Change in behavior of market actors in terms of the frequency of market visits during each study period. The categories of market actors are: “new” if the device had not been seen during previous periods, “out” for devices that were not seen again in the following period, and “break” for devices that skipped a period but were seen again during the study. Node values represent the number of devices seen for each period and each category (rounded to three significant figures)

Table 5 Relative change in market visit frequency by different actor categories with respect to the baseline period

As illustrated in Fig. 3, of the \(47\%\) reduction in very frequent actors seen during the shock and aftershock period compared to the baseline, \(58.6\%\) of actors reduced the frequency of their visits from 4–7 times per week to 1–4 visits per week. Another \(7.4\%\) reduced their visits to less than once per week. Finally, \(34\%\) were not seen again during the study. This represents 1955 devices that were seen at least four times per week during the baseline and pre-shock periods that were not seen in subsequent periods. Indeed, as shown in Fig. 3, across all categories and for the whole duration of the study, a share of devices left the markets, never to be seen again. The proportion of devices categorized as very frequent that left the study area during the shock and aftershock periods more than doubled when compared to the baseline and pre-shock periods.

In summary, the significant drop in overall number of visits to wet markets is characterized as a sharp reduction in market visit frequency, confirming our second hypothesis.

Hypothesis 3:

Consumers spent less time in wet markets.

As shown in Fig. 4, most visits registered with the system in place lasted between 2 and 20 min. The average duration observed during the baseline was 10.8 min with a standard deviation of 8.6 min (Table 6).

Fig. 4
figure 4

Distribution of visit duration in minutes for all retail markets during each period studied. Density is the percentage of total observations at a given duration

It is important to note that the filtering used to select observations to be included in this study was very restrictive. Only observations with very high signal strength were considered. This was to ensure the selection of devices that were seen within the food area of the wet markets and not in the surrounding shops nor on the streets around the markets. The durations presented here are therefore not representative of the overall time spent in the markets but rather the time spent within close range of the Wi-Fi access points scattered around the food area of the wet markets.

As shown in Table 6, the average visit duration was very consistent during the whole study. Indeed, the two-sample Kolmogorov-Smirnov test results show that the null hypothesis stipulating that consumers did not change their habits in term of visit duration cannot be rejected for any of the periods analyzed, given the significance level chosen for this study. Hypothesis 3 is therefore not confirmed based on the data gathered for this study.

Table 6 Average visit duration and standard deviation, in minutes, for all retail markets studied. P values are the results of one-sided Kolmogorov-Smirnov tests to either confirm or reject the null hypothesis that no change was observed between visit durations during the baseline period and the periods studied

Hypothesis 4:

Consumers changed the time of day at which they visited wet markets.

As shown in Fig. 5, there are two peak times during the day corresponding to rush hours when people are traveling to work in the morning and returning home in the afternoon. To compare the shock period to the baseline, the day was split into two periods: the morning, 04:00–13:30; and the afternoon, 13:30–20:00.

Fig. 5
figure 5

Intra-day distribution of visits shorter than 60 min for each period studied. Density is the percentage of total observations at a given duration. Dashed vertical lines represent the morning and afternoon peak times observed during the baseline, and solid vertical lines show the morning and afternoon peak times observed during the shock period

As shown in Fig. 5 and Table 7, a clear shift in the peak time for visits shorter than 60 min can be observed during the shock period when compared to the baseline. Indeed, this effect was particularly strong during the morning period, as the peak time was.

Table 7 Morning and afternoon peak times of visits shorter than 60 minutes for each period studied

The two-sample Kolmogorov-Smirnov test results show that the null hypothesis stipulating that both the morning and afternoon samples come from the same distribution as the baseline can be rejected with P < 0.001. This confirms hypothesis 4, showing that consumers significantly changed the time of day at which they visited wet markets during the shock period. However, this effect was not observed during the aftershock period.

Hypothesis 5:

Retailers reduced their visits to wholesale markets, leading to a significant decrease in inter-market visits.

As seen in Fig. 6, although all market pairs registered inter-market visits, there are two clear clusters of markets strongly linked to each other. The first cluster encompasses both peri-urban markets (TT, TO) while the second cluster includes both urban markets together with the wholesale market (DX, NG, MK).

Fig. 6
figure 6

Network of inter-market links, showing the number of visits seen in each pair of markets as registered during each period studied. On each link, values show the total number of devices seen in both markets during the baseline together with a chart showing how this figure changed during the following periods with respect to the baseline. The width of the line between any two markets represents the volume of observations where devices were recorded at both locations

As shown in Fig. 6, the average level of inter-market visits during the pre-shock period was about \(106\%\pm 20\%\) that observed during the baseline. This level dropped to \(66\%\pm 17\%\) during the shock period and increased to \(75\%\pm 33\%\) during the aftershock period. Although the aftershock period shows a slight increase in comparison with the shock period, it is also the period with the greatest heterogeneity. As shown in Fig. 6, all market pairs saw a decrease in inter-market visits during the shock period. Some pairs of markets saw levels increase during the aftershock or return to values close to that of the baseline (e.g., MK-DX, MK-TT). Some market pairs retained the same level in the aftershock period as that observed during the shock period (e.g., TT-TO) and others registered a further decrease in inter-market visits during the aftershock period (e.g., NG-TO, NG-DX).

As presented in Table 8, the result of the one-tailed Student’s t-test shows that the null hypothesis, stipulating that similar numbers of inter-market visits were registered during the shock and pre-shock periods, can be rejected with \(P<0.001\). One can thus conclude that during the shock period, the strength of inter-market connectivity was significantly lower than during the pre-shock period. Finally, the null hypothesis of the aftershock being similar to the pre-shock period cannot be rejected with a statistically significant level (\(P=0.023>0.01)\). In summary, although the connectivity levels observed during the aftershock period are on average \(75\%\) lower than the baseline, the high variance observed in the data does not permit the identification of a statistically significant difference between pre-shock and after-shock levels.

Table 8 Relative number of people traveling between markets with respect to the baseline period

4 Discussion

In summary, our results show that a sharp decrease was observed in the number of people visiting traditional markets after the first COVID-19 cases were recorded (-26%) as well as a statistically significant drop in the frequency with which people visited the markets, confirming hypotheses 1 and 2. The category of devices for which the strongest decrease was observed were those that were previously seen on more than four days per week (-37%). Some of these devices were seen with less frequency but there is also a large proportion that were not observed again during the study. Additionally, we observed that the daily peak time of visits to the retail markets shifted from 08:00 during the baseline and pre-shock periods to 09:30 during the shock period. This effect was only observed during the shock period and disappeared during the aftershock. A shift was also observed during the afternoon peak time, but it was of 30 min only. Such a shift confirms hypothesis 4. On the other hand, we could not conclude that consumers changed the duration of time they spent in the market during the shock and aftershock periods based on the data collected for this study, thus rejecting hypothesis 3. Finally, the connectivity between markets was also shown to drop significantly during the same period (\(66\%\pm 17\%\) of the level observed during the baseline), confirming hypothesis 5.

These findings are in line with similar sharp impacts observed in Vietnam and other South-East Asian countries. Indeed, the COVID-19 pandemic and its related restrictions had devastating effects on food markets in Vietnam; food supply chains were compromised, informal wet markets were closed, and poverty and food insecurity worsened (Kang et al., 2021; Nguyen et al., 2021; van Melik et al., 2021). The pandemic severely affected food environments, access to and availability of fresh food, and reduced household incomes (Nguyen et al., 2021). In urban areas, the effect was magnified, as there is evidence of higher job losses and reduced income (76.5%), and a larger reduction (31%) in food expenditures (Kang et al., 2021).

Although Hanoi People’s Committee requested district and ward authorities to eliminate informal wet markets and street vending activities (Official Letter 871/UBND-KT), none of the policies issued within the period of this study specifically targeted formal wet markets. Indeed, even during the period with the strictest restrictions on mobility, from March 31 to April 23, 2020 (Directive No. 16/CT-TTg), food businesses were exempt from closure (Directive No. 05/CT-UBND). Furthermore, during the period studied, a very low number of COVID-19 cases were observed in the country; as of August 31, 2020, only 509 cases were reported (with 0 deaths) (World Health Organization, 2020). Therefore, the strong impact of the pandemic observed in this study cannot be explained by a single policy nor by the outbreak of the virus itself.

There are several factors affecting consumer behavior that are possible explanations for the changes observed through the confirmation of our initial hypotheses. The confirmation of hypotheses 1 and 2 shows a sharp decrease in frequency of visits to wet markets, which can be explained by: (i) a shift from wet markets to other outlets and online shopping as a reaction to the perceived risks regarding wet markets and to mobility restriction measures, (ii) reduced visit frequency combined with purchases of bigger quantities of fresh food as a reaction to mobility restriction measures and public health messaging, (iii) a shift from fresh food purchases to purchases of products with longer shelf-life as a component of food storing strategies to cope with food scarcity events or imposed home quarantines, (iv) loss of income among vulnerable populations, and (v) a reduction in informal activities in the vicinity of the studied markets. The confirmation of hypothesis 4 shows a significant shift in the main peak time for shopping, which can be explained by (vi) strategies to cope with restrictions such as strict work from home policies. Finally, the confirmation of hypothesis 5 shows a significant decrease in inter-market visits. This can be explained by the restrictions in mobility already mentioned as well as by (vii) an overall decrease in sales resulting in decreased exchanges between wholesale and retail markets. These topics are discussed in more depth below.

Perceived safety risk:

The confirmation of hypotheses 1 and 2 shows that at the very early stage of the pandemic, market visits dropped significantly in terms of both the overall number of visits and the frequency of visits. In Vietnam, food safety has been a major concern of consumers for many decades but only influences food choices to some extent (Nguyen-Viet et al., 2017; Vandevijvere et al., 2019). Although consumers tend to see traditional wet markets as more prone to food safety issues, the transition from wet markets to modern food outlets such as supermarkets has been very slow in Vietnam compared to countries with a similar level of economic development (Wertheim-Heck et al., 2014). Supermarkets are perceived as inconvenient and time-consuming, and the safe foods they offer are considered more expensive and less fresh. Supermarkets mainly contribute to the consumption of ultra-processed foods (Wertheim-Heck et al., 2019). We suspect that the COVID-19 outbreak and the related “fear for safety” generated among consumers might have accelerated the transition process from “dirty” wet markets perceived as unsafe to “clean” modern outlets perceived as safer (Ha et al., 2020; The University of Adelaide, 2018). Furthermore, although Vietnamese consumers tend to distrust online platforms for food products (Kim Dang et al., 2018), a very sharp increase in the use of such platforms has been observed since the pandemic started, especially in urban areas (Nguyen et al., 2021). Altogether, negative narratives around wet markets might have exacerbated a slow ongoing process in urban areas of Vietnam that unveils a profound change in consumer perceptions of wet markets in favor of more modern outlets such as supermarkets and online platforms. This process might have led some consumers to avoid purchasing food products in wet markets and may account for a share of the sharp decrease in devices seen in the markets since the pandemic started.

Less frequent visits for larger purchases:

The confirmation of hypothesis 2 shows that there is a clear drop in the frequency of visits to markets. Indeed, as shown in Table 5, the number of devices seen very frequently in the markets dropped by 37% with respect to the baseline during the shock period and 47% during the aftershock period. Despite consumers’ negative perception and low level of trust regarding overall food safety of wet markets, they are still largely used for purchasing fresh food (Ha et al., 2020). Vietnamese consumers tend to shop daily (Wertheim-Heck et al., 2014), purchasing small quantities to get the freshest food possible. This is particularly important for meat (Unger et al., 2019), fish and seafood (purchased alive) and leafy vegetables whose shelf-life is very short. An increased perceived risk of frequenting wet markets during the pandemic together with the implementation of strict social distancing measures resulting in mobility restrictions might have led to a shift in consumers’ practices.

Diet shift toward more processed food:

Although the phenomenon is not consistent globally and across all populations, it is clear that the COVID-19 crisis induced a diet shift. Both favorable and unfavorable changes were reported, with one trend being the increased consumption of unhealthy food, including processed and ultra-processed food (Buckland et al., 2021; Deschasaux-Tanguy et al., 2021). For some population categories, lock-down events and the related emotional distress caused by such mobility restrictions seem to be associated with increased snacking, increased consumption of sweets, and decreased consumption of fresh food, especially fish and fruits (Deschasaux-Tanguy et al., 2021). In addition, we can hypothesize that consumers stockpiling and hoarding food tend to choose longer shelf-life products and less fresh food, for obvious perishability reasons. In Vietnam, food hoarding was reported in the news preceding announcement of the lock-down (Cao Mai Phuong, 2021). As already mentioned above, processed products and those with long shelf-life are commonly found in modern outlets such as supermarkets and online platforms. This process has potentially strengthened the trend of consumers reducing their visits to traditional markets in favor of more corporate retail options. This factor might thus explain to some extent the drop in market visits observed with the confirmation of hypotheses 1 and 2.

Income loss among vulnerable populations:

In Vietnam and other Southeast Asian countries, the COVID-19 pandemic and its related restrictions had a strong negative impact on poor and vulnerable populations (Boughton et al., 2021; Kang et al., 2021; Parks et al., 2020; Turner & Binh, 2021). Notably, the pandemic led to a substantial reduction in both income levels and household food expenditures, with a disproportionately adverse impact on poor populations, particularly those living in urban areas (Kang et al., 2021; Nguyen et al., 2021). It is important to highlight that poor urban communities predominantly depend on wet markets as their primary source for procuring food (Raneri et al., 2019). Consequently, it is reasonable to suggest that the observed decline in household food expenditures (Kang et al., 2021; Nguyen et al., 2021) has adversely affected the functioning of wet markets, as evidenced by the decrease in the number of visits made to the wet markets included in our study.

Ban on informal activities:

While the markets selected for this study were all formal markets under direct management of the district authorities, it is common for informal traders to operate on the outskirts of formal markets (Maruyama & Trung, 2010). Enforcing a decision from March 13, 2020 (Official Letter 871/UBND-KT), local authorities severely limited street vending activities across the city. Given the geographic proximity of informal and formal vendors, the reduction in the number of informal traders, as well as their usual customers, probably influenced the overall reduction in traffic observed by our system within formal markets.

Strategies to cope with mobility restrictions:

We can assume that during the baseline and pre-shock period, and thus in normal circumstances, many of the consumers visiting the market during the morning and afternoon peak times are commuting (mostly by motorbike) and stopping at the markets (staying on their bikes) before or after going to work. Devices observed during this time therefore probably belong to active people, with likely more resources. On the other hand, people going before or after rush hour are more likely to be older (retired, and on foot, thus living in close proximity to the markets), or unemployed, thus with fewer time constraints and the ability to avoid peak times. During the shock, the city of Hanoi was placed under a partial lockdown, with non-essential businesses closed and office workers required to work from home (Directive No.16/CT-TTG). As shown by the validation of hypothesis 4, it is likely that consumers had to change their daily routine to adapt to these restrictions, which resulted in a shift in the morning and afternoon peak times. However, it is key to note that although the shopping time shifted, the overall shape of the distribution itself, with a main peak during the morning and another peak in the late afternoon, remained the same during the shock period. There was therefore little impact of the mobility restrictions in terms of increasing social distancing within the wet markets.

Decreased exchange between wholesale and retail markets

A decrease in visit frequency is not necessarily linked to a drop in income as consumers might buy more goods per visit to the markets. Nonetheless, the confirmation of hypothesis 5 shows a decline in inter-market visits during the shock period. As shown in Fig. 6, the number of inter-market visits between the wholesale market Minh Khai and the retail markets Đồng Xa and Nghĩa Tân dropped by 39% and 47% respectively. Similarly, inter-market visits between (wholesale at night) and Trung Tâm (retail) markets dropped by 25% during the shock period. This drop in inter-market visits probably relates to a decrease in business-to-business activities, i.e., retailers purchasing fewer products from wholesale markets. This decrease could be explained by an overall reduction in demand at retail markets, generating a loss of income for retailers. This is in line with the observation of Kang et al. (2021) who found a 31% decrease in food expenditures during the first year of the pandemic.

Tracking the number and movement of Wi-Fi enabled devices has some limitations. Firstly, although the proportion of people owning a smartphone in urban areas is high and continues to increase (Newzoo, 2021), the most marginalized populations do not yet have access to high-end technologies. A large proportion of such populations is therefore invisible to the system used in this study to quantify the number of visits to wet markets. The popularization of using such an approach to study social processes might create a bias by excluding these populations and further marginalizing vulnerable communities. This study only provides a first glimpse of COVID-19 impacts on Vietnamese wet markets, requiring further study with additional micro analysis. Secondly, the observed drop in the number of visits and in visit frequency does not necessarily involve reductions in income, as consumers might buy larger quantities during each visit to the markets. The results presented in this study are however corroborated by other studies that have found a strong negative impact on entire food supply chains (Kang et al., 2021). Thirdly, this study follows a small market sample during a relatively short period of time, furthermore, frequent power outages in the Minh Khai wholesale market during the aftershock period resulted in increased variability in the data. These limitations were nevertheless mitigated during analysis by removing this market for computation of metrics related to consumer behaviors. Finally, this study was conducted with high standards for anonymization of data. Even if the aggregated version of the database is made publicly available, a known MAC address from a given device cannot be linked to its anonymized record in the database. This was, however, developed after data collection and it is not a feature built into the access points installed in the markets. There is a need for the development of strong frameworks for the ethical use of phone metadata, as proposed by Kishore et al. (2020).

Our results suggest that wet markets have been affected since the early stages of the COVID-19 outbreak in Vietnam. Although we do not have data for the period after July 2020, the observed phenomena during the first semester of 2020 were likely emphasized in 2021, due to (i) a stronger amplitude of the outbreak, and (ii) further restrictions to access to markets, with for instance the implementation of a ticket system to regulate the days and times at which Hanoi citizens were allowed to go grocery shopping (official letter 1304/UBND-KT by Tây Hồ district authorities on July 26, 2021).

4.1 Policy recommendations

Given the importance of wet markets (Raneri & Wertheim-Heck, 2019; Wertheim-Heck et al., 2019), the sharp decrease observed in the number of people visiting traditional markets since the very beginning of the pandemic raises concerns regarding food security and livelihoods of the most vulnerable urban poor populations, as many rely on wet markets for both food purchases and livelihoods. We provide a series of recommendations to increase the resilience of wet markets and guarantee food security for the poor during such a crisis.

First, it is critical to mitigate consumers’ negative perception of wet markets in terms of food safety. Consequently, this effort can reduce the shift from wet markets to corporate retail outlets, ensuring accessibility to and affordability of fresh food. To do so, wet markets and related infrastructure should be upgraded with the aim of enabling the adoption of improved practices regarding hygiene and food safety conditions across all market actors. This recommendation is in line with the plan issued in 2021 by the Hanoi People’s Committee for the development and management of Hanoi wet markets in 2021–2025, during which 169 wet markets will be upgraded and 141 will be newly constructed (Plan 228/KH-UBND dated October 12, 2021). Additionally, traceability systems need to be implemented and standardized in wet markets, especially for fresh food products.

Second, in the interest of public health, policy should reverse the shift from fresh and nutritious food to less healthy processed food (Fiolet et al., 2018; Hall et al., 2019; Srour et al., 2019; Vandevijvere et al., 2019). We therefore recommend the strengthening of public health messaging related to nutrition and health, highlighting the importance of eating fresh and nutritious food during pandemics to maintain healthy immune systems and lower the risks of disease (Aman & Masood, 2020).

Finally, it is crucial to emphasize that the COVID-19 pandemic has disproportionately affected poor communities that are already disadvantaged and vulnerable, leading to a substantial decline in their income and food expenditures (Adams-Prassl et al., 2020; Kang et al., 2021), and affecting the wet markets on which they rely for procuring food. Therefore, to mitigate the negative consequences faced by these populations, authorities should take proactive measures, such as implementing robust safety nets and financial support mechanisms. Additionally, efforts should be made to increase the recognition and inclusion of informal vendors operating in and around the wet markets, as vital contributors to the local economy. Authorities and researchers should also conduct retailer and consumer surveys to complement cell phone metadata with analysis that sheds more light on behavior. By adopting such measures, policymakers can foster a more equitable and resilient socio-economic environment, thereby alleviating the challenges faced by the marginalized and vulnerable segments of society.