Reports of coronavirus disease 2019 (COVID-19) cases began in December 2019. Soon after, the virus had spread around the world and became a pandemic. Social restrictions, quarantines, and other governmental policies in response to the pandemic altered normal operations across the world. One area significantly affected is human mobility. Typical movement patterns have been hindered by the pandemic. But inversely, mobility patterns can influence patterns of the virus. With this in mind, we created an interactive web application to visualize in near-real time the relationship between the COVID-19 pandemic and human mobility, as well as the impact of governmental policies at different spatial scales. The web application allows users to select a country at the global scale or a state or county for the USA and then displays a corresponding plot that compares human mobility to COVID-19 cases across time for the location, as well as to policy data. The application is useful for quickly revealing insightful patterns. First, the initial impact of the COVID-19 pandemic was a rather sudden decrease in mobility. Second, a relationship exists between mobility and COVID-19 offset by a lag, but that lag is not consistent over space or time. Third, spatial autocorrelation of relationship is apparent, meaning locations near each other share similar patterns. Overall, the application is a useful data visualization tool that helps uncover patterns that might otherwise go unnoticed. The application is available at this link: https://chrischapin7.shinyapps.io/covid19_vs_humanmobility/
On December 31, 2019, the World Health Organization (WHO) began investigating reported cases of a “viral pneumonia” in Wuhan, China. By March 11, 2020, this virus, now known as coronavirus disease 2019, or COVID-19, had spread around the world such that the WHO characterized it as a pandemic (WHO 2020). In response to this pandemic, social restrictions, quarantines, and other governmental policies continue to hinder normal operations throughout the world.
COVID-19 significantly and immediately impacted human mobility at various spatial scales. Human mobility focuses on the movement patterns of people from one location to another, across any mode of transportation (Montanari 2005). However, the pandemic has altered typical well-established human mobility patterns. For example, a study of human mobility in Tennessee, USA, found that public transportation ridership in Nashville and Chattanooga dropped by as much as 66.9 and 65.1% from 2019 baselines as a result of the pandemic (Wilbur et al. 2020). Similarly, a study of Mainland China found that since the start of the pandemic, a higher proportion of people used bicycles or private transportation instead of public transportation (Huang et al. 2020). But if COVID-19 affects mobility, the inverse relationship also holds true; mobility patterns can influence patterns of the virus. A study of the UK’s governmental pandemic response policies suggests that limiting mobility decreases the number of COVID-19-related deaths (Hadjidemetriou et al. 2020).
Clearly a relationship exists between human mobility and the COVID-19 pandemic, but potential questions still remain: What relationship existed between human mobility and COVID-19 in the months following initial quarantine? How has that relationship changed over time? Does the relationship vary across different places? Is the relationship different at the country, state, or county levels? How might governmental policies affect the relationship? While high-level research and statistical analysis may answer these questions, researchers could also benefit from a precursory understanding of the data while taking into consideration spatial heterogeneity. In this context, data visualization at various spatial scales, such as in the form of a dashboard or other interactive application, would assist research confronting the problems of the COVID-19 pandemic as well as informing policy decisions addressing the pandemic.
The Center for Systems Science and Engineering at Johns Hopkins University developed the COVID-19 Dashboard, a widely used application that visualizes pandemic data. The Johns Hopkins team aggregated reports from a wide array of sources to develop an interactive web-based dashboard that allows users to visualize and track reported cases of COVID-19 across different places in real time (Dong et al. 2020). The user-friendly application has proved to be a valuable tool to quickly understand the outbreak of the virus for any desired region or time. However, the Johns Hopkins dashboard does not contain mobility or policy data. Therefore, we created an interactive web application to visualize in near-real time the relationship between the COVID-19 pandemic and human mobility, as well as the impact of governmental policies at different spatial scales.
The web application includes three data sets: Apple Maps data representing human mobility, COVID-19 cases data, and government policy data related to COVID-19.
Apple Maps Data
Human mobility data comprises the first component of the application, expressed as daily requests for directions in Apple Maps since January 13, 2020 (Apple Inc 2020). Apple Inc. separates these routing requests into three modes of transportation: driving, representing private automobile travel; walking, representing travel by foot; and transit, representing travel by the use of public transportation. Apple Inc. (2020) released these data because of the COVID-19 pandemic and creates daily Mobility Trends Reports that include a time-series of daily routing requests available at country/region, sub-region, and city levels for geographies that meet a minimum threshold for direction requests per day. This data source seems a reasonable proxy for human mobility, as evident from its use in recent publications on human mobility (Cacciapaglia et al. 2020; Hadjidemetriou et al. 2020; Li and Tartarini 2020) or from the use of similar routing request data (Huang et al. 2020). However, it is noteworthy that Apple Maps usage only represents a snapshot of human mobility, since travelers might use another routing service like Google Maps or Waze or use no routing service at all. Routing request data might also tend to favor outsiders unfamiliar with an area, who utilize routing services more than locals.
COVID-19 Cases Data
The second component of the application consists of data regarding numbers of confirmed COVID-19 cases. The data accessed from the COVID-19 Data Repository by the Center for Systems Science and Engineering at Johns Hopkins University consists of an extensive compilation of data from a wide range of sources into aggregated data sets (Dong et al. 2020). Johns Hopkins uses this repository to support its COVID-19 Dashboard, updating it daily and including a time-series of daily confirmed COVID-19 cases since January 22, 2020, for different spatial scales including countries and states or counties for the USA (Dong et al. 2020).
Government Policy Data
The third component of the application is government policy data. Specifically, this consists of the number of COVID-19-related policies in place by a government on a given day. The University of Oxford’s COVID-19 Government Response Tracker, a project that uses a team of over 200 volunteers to systematically collect data on the policy responses taken by governments during the COVID-19 pandemic, provides this data set (Hale et al. 2020). Hosted on GitHub, the data set contains eighteen indicators of government response since January 1, 2020, for different spatial scales (Hale et al. 2020). Among these 18 indicators, the application includes only those classified as either containment and closure policies or health system policies, since these two classifications pertain to human mobility. Containment and closure policies include school closures, workplace closures, public event cancellations, restrictions on gatherings, public transportation closures, stay-at-home requirements, restrictions on internal movement, and international travel controls. Health system policies include public information campaigns, testing policies, contact tracing, and facial covering policies (Hale et al. 2020).
Having hypothesized that patterns of COVID-19 and human mobility were interrelated, we collected data sets and began exploratory analysis. However, we soon realized that a multitude of local factors caused relationships to vary considerably by geography, meaning that a one-sized-fits all approach to analysis would not work across different spatial entities. We considered limiting our study to just one or a few specific locations but had no strong research preferences toward any particular location and opted against such an approach. We also were interested in keeping our research broad considering that the pandemic has had worldwide impacts. We realized that visualizing the data would be necessary to gain a preliminary understanding, allowing more in depth research to later follow. With this in mind, we designed our application to provide clear and interpretable visualizations to diverse audiences. To do so, we attempt to use widely recognizable visualization techniques, such as time-series line-plots or a standardly colored choropleth map. Moreover, we recognize that users of our application might have different interests in the data, and so we made the visualizations interactive. The ability to query for a specific locality, either through a search bar or by clicking through a map, was also key in the application’s design, as we wanted potential geographic trends to also be discoverable.
Using R through R Studio, we built the web application from the three data sources. Specifically, we created the application using the R package, Shiny. This package allows data scientists to easily build interactive web applications (Chang et al. 2020). Within the Shiny interface, we built maps using the Leaflet mapping package (Cheng et al. 2019). Similarly, we created line plots using the ggplot2 data visualization package inside of the Plotly R library (Sievert et al. 2020; Wickham et al. 2020). In combination, these three main packages built the entire application in R. Additionally, Shiny allows for applications to be published to its servers, also conveniently allowing the application to be manually updated and republished. The application is accessible at this link: https://chrischapin7.shinyapps.io/covid19_vs_humanmobility/
The web application (Fig. 1) allows users to select a country at the global scale, as well as a state or county for the USA by either clicking on a map or searching from a drop down list. Based on this input, the application displays a plot that compares human mobility to COVID-19 cases across time for the given location, as well as policy data, if available. Conveniently, the plot will update when users select a new location. The plot itself is interactive, allowing users to move across the plots to see data at a specific point in time, or to select or deselect which data are displayed. The map from which users can select a geographical area is also colored using Jenks natural breaks classifications according to the cumulative number of COVID-19 cases in a given area, giving users a quick understanding of which areas might be most affected by the pandemic (Fig. 2).
The application is useful for quickly revealing underlying patterns between the three main variables: COVID-19 cases, human mobility, and government policy. To exemplify this, we have discussed a handful of case studies at each spatial scale in the following sections. Although these cases revealed interesting trends, our explanations are largely unsupported beyond the visualizations. We intend for them to serve as possible hypotheses that can later be expounded upon with subsequent research.
Generally, the human mobility data reveal peaks on weekends and valleys mid-week. The data also show seasonal trends in some places, since “normal” mobility patterns would typically fluctuate from the January 13 baseline depending on the time of year. Unfortunately, we cannot compare this data to years prior since Apple Inc. has not released data from prior years. Also, for this study, we limited all cases discussed till October 13, 2020, though the current application has been more recently updated.
Human mobility noticeably dropped in the USA around mid-March as the nation entered quarantine, a pattern visible in most countries (Fig. 3a). Logically, this decrease coincided with a sharp increase in COVID-19-related policies, such as stay-at-home orders or school closures. Confirmed cases of COVID-19 rose dramatically soon after, likely as testing became available. Over the next few months, walking and driving routing requests slowly returned to pre-pandemic levels. However, we found that public transit remained at around 50% of its original numbers, suggesting a plausible hypothesis that even as Americans went back out they were cautious of using public transportation.
Unlike the human mobility patterns of the United States, Japan’s transit patterns mostly match those of driving and walking (Figure 3b). This suggests the Japanese did not discriminate between modes of transportation. Furthermore, Japan’s initial drop in mobility is not as pronounced, and Japan seemingly returned to normal levels in a little over a month.
Apple Inc. did not release transit data for India, perhaps due to a lack of digital information on public transportation infrastructure, leaving only walking and driving patterns included in the aggregated data for the country (Figure 3c). In about a week’s time, requests for walking and driving both fell by around 70%, suggesting a strict adherence to government policies like stay-at-home orders. These policies had a lasting impact on human mobility, as routing requests remained low for a much longer period of time compared to the United States and Japan. The human mobility levels did not return to 100% until mid-September. Yet despite this, confirmed cases of COVID-19 rose exponentially, mirroring the mobility patterns attributed to strict enforcement of contact tracing and widespread testing. Notably, mobility patterns such as these can also have larger impact, such as the widespread drop in levels of air pollution across the megacities in India as a result of the drop in mobility resulting from nationwide lockdown (Sen Roy and Balling Jr. 2021).
Our analysis also analyzed mobility data at the state and county level for the USA. We selected four representative case studies at the state level described below.
In New York, a metropolitan state whose population is largely characterized by New York City, we see a relatively early spike in COVID-19 cases, just a few weeks after entering quarantine in mid-March (Fig. 4a). Later in the summer, however, daily cases declined, and mobility crept back towards normal. Driving eventually made a full recovery, perhaps pushed by activity outside of the city in upstate New York since walking and transit—two modes more common in the city—did not quite return to the baseline.
States close to New York, such as Connecticut, appear to exhibit similar patterns to those of New York, except walking patterns which more closely mimic driving patterns (Fig. 4b). This similarity, along with other regions of generally homogenous states, suggests that more advanced spatial analysis, such as Exploratory Spatial Data Analysis (ESDA), would find evidence of spatial autocorrelation. In other words, states near one another likely exhibit similar patterns of mobility and COVID-19 cases. ESDA or other analysis could similarly be used to test hypothesized relationships identified by the application’s visualizations between other sets of neighboring states. For example, the data suggest similarity among sets of states in the West (California, Arizona, Nevada), in the Great Plains (North Dakota, South Dakota, Wyoming, Montana), in the Midwest (Illinois, Indiana, Ohio, Michigan), in the South (Alabama, Mississippi, Tennessee, Arkansas), or in the Northeast (New Jersey, New York, Connecticut, Rhode Island, Massachusetts).
California, along with many western states, exhibits similar mobility patterns to those of the northeastern states, but encountered an increase in COVID-19 cases much later in the summer (Fig. 4c). California implemented COVID-19-related policies relatively quickly, amassing 22 policies by March 17, a number most other states took weeks longer to reach.
Oklahoma’s transit patterns contrast the transit patterns seen in other states and the USA as a whole (Fig. 4d). Transit requests in Oklahoma mostly returned to normal within a few months’ time, along with requests for driving and walking. Oklahoma also decreased its number of COVID-19-related policies sooner than other states, perhaps contributing to these mobility trends while also causing a later spike in cases of COVID-19.
At a finer spatial scale, county level patterns reveal even more detailed information that in some cases show the impact of local events.
Orleans Parish, Louisiana
Orleans Parish, Louisiana, coterminous with the city of New Orleans, represents an interesting case study (Fig. 5a). At the end of February, all forms of mobility spike by approximately 200% presumably as a result of the city’s celebration of Mardi Gras. Interestingly, a similarly steep spike of COVID-19 cases occurred about a month and a half later, paralleling the spike in mobility. The two are likely interrelated, though more research would be required to confirm this proposed relation isolated from other factors. The significant time lag is also noteworthy, perhaps attributable to a delay in the availability of testing or just the nature of an infectious spread, though such hypotheses would also require significant study beyond the application.
Meade County, South Dakota
Meade County, South Dakota, a mostly rural county seemingly unaffected by the pandemic until later in the summer, did not experience the same drop in mobility as most other parts of the United States (Fig. 5b). Meade County, however, is the site of the annual Sturgis Motorcycle Rally, which brought about a 1300% increase in driving requests in August. Predictably, this soon led to a spike in COVID-19 cases, albeit in limited numbers given the county’s smaller population. Again, a time lag exists between spikes in mobility and spikes in cases, though in this case the lag is not as long.
Miami-Dade County, Florida
Of course, most counties do not have a singularly impactful event like Mardi Gras or the Sturgis Motorcycle Rally. Still, the granularity of county-level data reveals trends missed at a more macro level, such as an exponential growth in confirmed cases in Miami-Dade County, Florida, that roughly corresponds with a return to normal among driving and walking requests (Fig. 5c). Specifically, Miami-Dade County does not have a very well-developed public transit infrastructure and is dominated more by private vehicle and rideshare services with distinct diurnal and weekday vs. weekend patterns (Scott et al. 2016; Sen Roy et al. 2020). While the patterns of Miami-Dade County, Florida’s most populous county, mostly mimic those of the entire state, the relationships between mobility, policy, and COVID-19 are not necessarily the same since local processes affect these relationships. The federal system of the USA encourages local governance as each local administrative unit has its own specific criteria. For example, even after Florida’s Governor lifted statewide orders restricting restaurant capacity, Miami-Dade County continued to locally impose limits (Allen 2020). This concept of varying relationships underscores the necessity to examine the interrelationships among these variables at different spatial scales.
Discussion and Conclusions
While each of the case studies above reveals information that could easily be explored in more detail, a few general trends can be surmised. First, most places affected by the COVID-19 pandemic and by subsequent government reaction saw a rather sudden decrease in mobility. Second, there exists a link between changes in confirmed cases of COVID-19 and changes in mobility, offset by a lag in time in most cases. The size of this lag, however, varies across different spatial scales or even across time within a specific spatial entity. In other words, a relationship exists between mobility and COVID-19, but the relationship changes over space or time. Third, the data infer a high degree of spatial autocorrelation of mobility and COVID-19 case patterns, meaning that locations near each other share similar patterns.
Overall, this application proves useful for uncovering patterns that might otherwise go unnoticed at different spatial scales. Researchers can use the application as a tool to conduct further study or to inform policy decisions that address the impacts of the pandemic. The case studies presented above offer examples of patterns, among many others, that could benefit from further research. The web application attempts to include as many spatial scales as possible to allow different people to view whichever regions concern them. We encourage others to explore the application and reveal useful information. This project can also serve as an exciting example of interactive data visualization. Even after concerns of the COVID-19 pandemic are over, the framework of the application can be used for similar visualizations. For instance, mobility patterns across different spatial scales could be similarly visualized after a natural disaster like a hurricane or earthquake. The current web application could be modified for different purposes with relative ease. In addition, this web application can be useful for policymakers and stakeholders with relatively simple tools.
Allen G (2020). Florida's Governor Lifts All COVID-19 Restrictions On Businesses Statewide. National Public Radio. 25 September 2020
Apple Inc (2020). COVID-19 - Mobility trends reports. https://covid19.apple.com/mobility (accessed 10.14. 20)
Cacciapaglia G, Cot C and Sannino F (2020). Mining Google and Apple mobility data: Twenty-one shades of European social distancing measures for COVID-19. arXiv preprint arXiv:2008.02117
Chang W, Cheng J, Allaire J, Xie Y and McPherson J (2020). Shiny: Web Application Framework for R. https://cran.r-project.org/web/packages/shiny/index.html (accessed 11.16.20)
Dong E, Du H, Gardner L (2020) An interactive web-based dashboard to track COVID-19 in real time. Lancet Infect Dis 20(5):533–534
Hadjidemetriou GM, Sasidharan M, Kouyialis G, Parlikad AK (2020) The impact of government measures and human mobility trend on COVID-19 related deaths in the UK. Transportation Research Interdisciplinary Perspectives 6:100167
Hale T, Webster S, Petherick A, Phillips T and Kira B (2020). Oxford COVID-19 Government Response Tracker. Blavatnik School of Government. (accessed 10.14.20).
Huang J, Wang H, Fan M, Zhuo A, Sun Y and Li Y, (2020). Understanding the Impact of the COVID-19 Pandemic on Transportation-related Behaviors with Human Mobility Data. KDD '20: Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. 3443-3450.
Li J, Tartarini F (2020) Changes in air quality during the COVID-19 lockdown in Singapore and associations with human mobility trends. Aerosol Air Qual Res 20(8):1748–1758
Montanari A (2005) Human mobility, global change and local development. Belgeo. 1(1-2):7–18
Scott MC, Sen Roy S, Prasad S (2016) Spatial Patterns of Off the System Traffic Crashes in Miami-Dade County, FL during 2005-2010. Traffic Injury Prevention 17:729–735. https://doi.org/10.1080/15389588.2016.1144878
Sen Roy S, Balling RC Jr (2021) Impact of the COVID-19 Lockdown on Air Quality in the Delhi Metropolitan Region. Appl Geogr 128:102418. https://doi.org/10.1016/j.apgeog.2021.102418
Sen Roy S, Perlman J, Balling RC Jr (2020) Analysis of Urban Mobility in South Florida using Uber Movement. Case Studies on Transport Policy 8(4):1393–1400. https://doi.org/10.1016/j.cstp.2020.10.003
Sievert C, Parmer C, Hocking T, Chamberlain S, Ram K, Corvellec M and Despouy P, (2020). Plotly: Create Interactive Web Graphics via 'plotly.js'. https://cran.r-project.org/web/packages/plotly/index.html (accessed 11.16.20).
Wickham H, Chang W, Henry L, Pedersen TL, Takahashi T, Wilke C, Woo K, Yutani H and Dunnington D, (2020). ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. https://cran.r-project.org/web/packages/ggplot2/index.html (accessed 11.16.20).
Wilbur M, Ayman A, Ouyang A, Poon V, Kabir R, Vadali A, Pugliese P, Freudberg D, Laszka A and Dubey A, (2020). Impact of COVID-19 on Public Transit Accessibility and Ridership. arXiv:2008.02413
World Health Organization (2020). Timeline of WHO’s response to COVID-19. https://www.who.int/news/item/29-06-2020-covidtimeline (accessed 11.16.20)
The authors did not receive any specific funding for this work.
This research work is carried out in compliance with transparency, moral values, honesty, and hard work. No human participation or animals are involved in this research work.
As per the literature review, this is neither a repetition of any work nor copied key data from other’s work. The methodology, findings, and conclusions made here belong to original research work as per our knowledge and belief.
Every step of processing for publication informed to all co-authors of this paper at the earliest, and everything is carried out with collective decision and consent.
Conflict of Interest
On behalf of all authors, the corresponding author states that there is no conflict of interest.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Chapin, C., Roy, S.S. A Spatial Web Application to Explore the Interactions between Human Mobility, Government Policies, and COVID-19 Cases. J geovis spat anal 5, 12 (2021). https://doi.org/10.1007/s41651-021-00081-y
- Human Mobility
- Apple Maps
- Web App
- Spatial Analysis