The Impact of the COVID-19 Pandemic on Changes in Eating Habits for Different Neighborhood Characteristics

Uijeong Hwang

02 August, 2022

$('<div id="chunkBody"></div>').insertAfter(".foldable");
$("#chunkBody").append('<div id = "map"></div>');
$("#map").append('<div id = "sideBarMap"></div>');

$("#sideBarMap").append('<div id = "sliderContainer"></div>');
$("#sideBarMap").append('<div id = "dropdownContainer"></div>');
$("#sideBarMap").append('<div id = "legendContainer"></div>');
$("#sideBarMap").append('<div id = "barPlot"></div>');

$("#sliderContainer").append('<div class = "sliderContent"></div>');
$(".sliderContent").append('<p style="margin-bottom:7px; font-size:16px; font-weight: 500;"> <span id="sliderValue"></span> </p>');
$(".sliderContent").append('<input id="sliderRange" class="slider" type="range" min="0" max="33" value="0" step="1"></input>');
$(".sliderContent").append('<p style="text-align:left; margin-bottom: 0em; margin-top: 5px"> July 2019 - <span style="float:right"> - April 2022 </span> </p>');

$("#dropdownContainer").append('<div class = "dropdownContent"></div>');
$(".dropdownContent").append('<p style="margin-bottom:7px;"> Type of restaurants </p>');
$(".dropdownContent").append('<select name="dropdown" id="dropdown"> <option value="all">All</option> <option value="healthy">Healthy Food</option> <option value="snack">Snack & Dessert</option> <option value="fast">Fast-food</option> <option value="other">Other foods</option> </select>');


$("#legendContainer").append('<div class = "legendContent"></div>');
$(".legendContent").append('<p style="margin-bottom:7px; font-size:15px;"> Visitors in the selected month </p>');
$(".legendContent").append('<div id = "legendRect"></div>');
$(".legendContent").append('<p style="text-align:left; margin-bottom: 0em; margin-top: 5px"> Low <span style="float:right"> High </span> </p>');

let slider = document.getElementById("sliderRange");
let sliderValue = document.getElementById("sliderValue");
let dropdown = document.getElementById("dropdown");
NiceSelect.bind(dropdown);

const yymm = ['July 2019', 'August 2019', 'September 2019', 'October 2019', 'November 2019', 'December 2019',
              'January 2020', 'February 2020', 'March 2020: first Covid-19 case in the US', 'April 2020', 'May 2020', 'June 2020',
              'July 2020', 'August 2020', 'September 2020', 'October 2020', 'November 2020', 
              'December 2020: vaccination started',
              'January 2021', 'February 2021', 'March 2021', 'April 2021', 'May 2021', 'June 2021',
              'July 2021', 'August 2021', 'September 2021', 'October 2021', 'November 2021', 'December 2021',
              'January 2022', 'February 2022', 'March 2022', 'April 2022']

sliderValue.innerHTML = yymm[slider.value]; // Display the default slider value

let page_width = $("#map").width()
let width = page_width
let height = page_width*0.7

d3.select("#map")
  .style("width", width + "px")
  .style("height", height + "px");

mapboxgl.accessToken = 'pk.eyJ1IjoidWh3YW5nMyIsImEiOiJja3d0bGh4cG8wemxtMm5xcTJ1anc4ajlxIn0.GPUcPfwoUXy6pItqRUvifw';
const map = new mapboxgl.Map({
    container: 'map', // container ID
    style: 'mapbox://styles/uhwang3/cl65mb11m001q15lcdpvr8efm',
    center: [-84.709340, 33.798925], // starting position [lng, lat]
    zoom: 8.5 // starting zoom
});

const colors = ['#223F9A','#2C51BE','#482BBD','#7A0DA6','#AE0E7F','#CF1750','#E31A1A','#FD7900','#FFC800','#FAE300'];

const yymmMap = ['2019-07', '2019-08', '2019-09', '2019-10', '2019-11', '2019-12',
                '2020-01', '2020-02', '2020-03', '2020-04', '2020-05', '2020-06',
                '2020-07', '2020-08', '2020-09', '2020-10', '2020-11', '2020-12',
                '2021-01', '2021-02', '2021-03', '2021-04', '2021-05', '2021-06',
                '2021-07', '2021-08', '2021-09', '2021-10', '2021-11', '2021-12',
                '2022-01', '2022-02', '2022-03', '2022-04']

const yymmPlot = ['X2019.07', 'X2019.08', 'X2019.09', 'X2019.10', 'X2019.11', 'X2019.12',
                  'X2020.01', 'X2020.02', 'X2020.03', 'X2020.04', 'X2020.05', 'X2020.06',
                  'X2020.07', 'X2020.08', 'X2020.09', 'X2020.10', 'X2020.11', 'X2020.12',
                  'X2021.01', 'X2021.02', 'X2021.03', 'X2021.04', 'X2021.05', 'X2021.06',
                  'X2021.07', 'X2021.08', 'X2021.09', 'X2021.10', 'X2021.11', 'X2021.12',
                  'X2022.01', 'X2022.02', 'X2022.03', 'X2022.04']

map.on('load', () => {
  map.addSource('visit_monthly',  {type: 'vector', url: "mapbox://uhwang3.visit_monthly" });
  map.addSource('atl_boundary',  {type: 'vector', url: "mapbox://uhwang3.atl_boundary" });
  map.addSource('atl_metro_boundary',  {type: 'vector', url: "mapbox://uhwang3.atl_metro_boundary" });

  map.addLayer(
    {
      'id': 'atl_boundary',
      'type': 'line',
      'source': 'atl_boundary',
      'source-layer': 'atl_boundary',
      'paint': {
        'line-color': '#cad4ed',
        'line-width': 1
      }
    },
  );
  
  map.addLayer(
    {
      'id': 'atl_metro_boundary',
      'type': 'line',
      'source': 'atl_metro_boundary',
      'source-layer': 'atl_metro_boundary',
      'paint': {
        'line-color': 'rgba(69,81,110,0.5)',
        'line-width': 0.6
      }
    },
  );
  
  map.addLayer(
    {
      'id': 'visit_monthly',
      'type': 'circle',
      'source': 'visit_monthly',
      'source-layer': 'visit_monthly',
      'paint': {
        'circle-color': {
          'property' : yymmMap[0],
          'stops': [[0, colors[0]], [10, colors[1]], [50, colors[2]], [100, colors[3]], [170, colors[4]], [250, colors[5]],
                    [350, colors[6]], [500, colors[7]], [700, colors[8]], [1000, colors[9]]]
        },
        'circle-radius': 1.3
      }
    },
  );
})

let foodTypeDict1 = {"healthy":1, "fast":0, "snack":3, "other":2} 

function drawPlot(yymm){
  
  if (dropdown.value == 'all'){
    var trace1 = {
      x: [data[1]['food_type'], data[3]['food_type'], data[0]['food_type'], data[2]['food_type']],
      y: [data[1][yymm], data[3][yymm], data[0][yymm], data[2][yymm]],
      width: [0.4, 0.4, 0.4, 0.4],
      name: 'Take-out',
      type: 'bar'
    };
  
    var trace2 = {
      x: [data[1+4]['food_type'], data[3+4]['food_type'], data[0+4]['food_type'], data[2+4]['food_type']],
      y: [data[1+4][yymm], data[3+4][yymm], data[0+4][yymm], data[2+4][yymm]],
      width: [0.4, 0.4, 0.4, 0.4],
      name: 'Dine-in',
      type: 'bar'
    };
  
    var plotData = [trace1, trace2];
  
    var layout = {barmode: 'stack',
      paper_bgcolor: 'rgba(0,0,0,0)',
      plot_bgcolor: 'rgba(0,0,0,0)',
      colorway: ['#8577a6','#8fbac2'],
      font: {color: 'white', family: 'Raleway'},
      legend: {font: {color: 'white', family: 'Raleway'}},
      yaxis: {range: [0, 4000000]}
    };
  } else {
    var trace1 = {
      x: [data[foodTypeDict1[dropdown.value]]['food_type']],
      y: [data[foodTypeDict1[dropdown.value]][yymm]],
      width: [0.4],
      name: 'Take-out',
      type: 'bar'
    };
  
    var trace2 = {
      x: [data[foodTypeDict1[dropdown.value]]['food_type']],
      y: [data[foodTypeDict1[dropdown.value]+4][yymm]],
      width: [0.4],
      name: 'Dine-in',
      type: 'bar'
    };
  
    var plotData = [trace1, trace2];
  
    var layout = {barmode: 'stack',
      paper_bgcolor: 'rgba(0,0,0,0)',
      plot_bgcolor: 'rgba(0,0,0,0)',
      colorway: ['#8577a6','#8fbac2'],
      font: {color: 'white', family: 'Raleway'},
      legend: {font: {color: 'white', family: 'Raleway'}},
      yaxis: {range: [0, data[foodTypeDict1[dropdown.value]]['max'] + data[foodTypeDict1[dropdown.value]+4]['max']]}
    };
  }
  

  Plotly.newPlot(barPlot, plotData, layout, {displayModeBar: false});
}

let yymmVal = 0
drawPlot(yymmPlot[yymmVal])


function redrawPlot(yymm) {
  d3.selectAll('#barPlot').remove()
  $("#sideBarMap").append('<div id = "barPlot"></div>');
  drawPlot(yymm)
};

slider.addEventListener('input', (sr) => {
  sliderValue.innerHTML = yymm[sr.target.value];

  map.setPaintProperty(
    'visit_monthly', 
    'circle-color', {
      'property' : yymmMap[sr.target.value],
      'stops': [[0, colors[0]], [10, colors[1]], [50, colors[2]], [100, colors[3]], [170, colors[4]], [250, colors[5]],
              [350, colors[6]], [500, colors[7]], [700, colors[8]], [1000, colors[9]]]
    }
  )
  
  yymmVal = sr.target.value
  redrawPlot(yymmPlot[yymmVal])
  
})

let foodTypeDict2 = {"healthy": "Healthy food", "fast":"Fast-food", "snack":"Snack & Dessert", "other":"Other types"} 

dropdown.addEventListener('change', () => {
  
  
  console.log(dropdown.value)
  
  if (dropdown.value == 'all') {
    map.setFilter('visit_monthly', null)
  } else {
    map.setFilter('visit_monthly', ['==', 'food_type', foodTypeDict2[dropdown.value]])
  }
  
  redrawPlot(yymmPlot[yymmVal])
  
})

1. Introduction

The Covid-19 pandemic has completely changed our lifestyles. Our eating behaviors are certainly one of the primary things that were affected in negative ways:

Those changes in eating habits must have been different by neighborhoods. The accessibility to healthy, affordable food is not the same for everyone: some neighborhoods can easily access fresh food while others are inundated by fast-food outlets. It is typically harder for marginalized communities to access healthy food at a low price, which puts them at risk of environment-linked nutritional issues (Morland et al., 2002). In times of crisis with the global pandemic, they are likely to have more difficulties securing healthy food options.

This article explores 1) how the Covid-19 pandemic has affected the eating habits in the U.S., and 2) how the changes in eating habits differ by neighborhood characteristics by analyzing restaurant visiting patterns before and during the pandemic.

2. Data at a Glance

The map you have seen at the beginning is made using data from SafeGraph. SafeGraph provides high-quality data on Point-of-interest (POI)s and their visitors’ foot traffics that are captured from anonymous mobile data. The data contain:

  • Information on POIs: place ID, name, brand, NAICS code, category tag, location information…

  • Weekly visitor pattern: number of visits and visitors1, where they came from, and how long they stayed…

kable(cbind(file.restaurant %>% 
             select(-date_range_start_yymm, -date_range_end_yymm, -visitor_home_bg,
                    -dwell.10.down, -dwell.20.down, -dwell.60.down, -dwell.60.up),
            file.restaurant %>% select(visitor_home_bg)) %>% .[5:7,], format = "html", row.names = F) %>% 
  kable_styling("hover", full_width = T)
placekey date_range_start date_range_end visit_counts visitor_counts distance_from_home median_dwell name brand top_category sub_category category_tag city take.out dine.in fast.food in.city visitor_home_bg
2021-02-01 2021-02-08 83 71 14784 15.0 Chipotle Mexican Grill Chipotle Mexican Grill Restaurants and Other Eating Places Limited-Service Restaurants Counter Service,Lunch,Mexican Food,Catering,Dinner Norcross 49 34 0 0 {“130890212162”:4,“450450026091”:4,“131350503203”:4,“131510704022”:4,“130890218062”:4,“131210092001”:4,“410050230011”:4,“131350504211”:4,“131350504331”:4,“130237903004”:4,“131350504253”:4,“131350502202”:4,“130890233094”:4,“131210114202”:4,“131350502142”:4,“131350504171”:4,“130890234182”:4}
2021-02-01 2021-02-08 112 71 10200 79.5 Dominick’s Restaurants and Other Eating Places Limited-Service Restaurants Italian Food Buford 13 99 0 1 {“131390016081”:6,“131390016052”:5,“131350501063”:5,“131350506101”:4,“131350505233”:4,“131350501031”:4,“131390016073”:4,“131390015021”:4,“131350506082”:4,“131390016072”:4,“131350506102”:4,“131350502123”:4}
2021-02-01 2021-02-08 620 527 7506 10.0 Olive Garden Olive Garden Restaurants and Other Eating Places Full-Service Restaurants Lunch,Italian Food,Casual Dining,Catering,Dinner Snellville 409 211 0 1 {“131350507242”:21,“131350507131”:18,“131350505442”:17,“131350505461”:16,“131350506081”:14,“131350507181”:14,“131350505431”:12,“131350507243”:12,“131350506082”:11,“131350507273”:11,“131350507213”:10,“131350507182”:10,“132971105042”:9,“132971105082”:8,“131350507261”:8,“132971105031”:8,“131350507201”:8,“131350507133”:7,“131350507203”:7,“130119701001”:7,“131350507262”:7,“131350507282”:6,“131350507202”:6,“131350507301”:6,“131350505441”:5,“131350507091”:5,“132971101003”:5,“131350507272”:5,“130131805011”:5,“131350505463”:5,“131350507184”:5,“131350504231”:4,“131350507211”:4,“132470604062”:4,“131350504293”:4,“131350505451”:4,“131350507123”:4,“131350507191”:4,“131350505432”:4,“131210119002”:4,“131350506083”:4,“130890232122”:4,“131350507281”:4,“131350505413”:4,“132971106032”:4,“131350507141”:4,“131339503022”:4,“131210114144”:4,“131350505362”:4,“132971105061”:4,“131350506063”:4,“131350505214”:4,“130131805031”:4,“132971106012”:4,“132171001003”:4,“131350504291”:4,“131350504301”:4,“131350507241”:4,“130890233123”:4,“132190303001”:4,“132971105073”:4,“131350506071”:4,“131350507153”:4,“131350507132”:4,“132971105062”:4,“131350507183”:4,“131350505311”:4,“130890219071”:4,“131350507214”:4,“131350504292”:4,“132930101002”:4,“130890219121”:4,“131350505342”:4,“131350503092”:4,“132971105051”:4}

This study utilizes the category_tag of restaurant POIs to analyze consumption patterns by types of food. Each POI can have multiple category tags:

rownames(file.restaurant) <- NULL
tag_example <- file.restaurant %>% 
  select(name, category_tag) %>% 
  filter(str_detect(name, 'Dunkin|Burger King|Salata')) %>% 
  .[duplicated(.) == F,]

kable(tag_example, format = "html", row.names = F) %>% 
  kable_styling("hover", full_width = T)
name category_tag
Dunkin’ Snacks,Counter Service,Dessert,Donut Shop,Coffee Shop
Burger King Counter Service,Late Night,Lunch,Fast Food,Drive Through,Breakfast,Dinner,Burgers
Salata Counter Service,Salad,Sandwich Shop,Lunch,Healthy Food,Vegetarian Food,Catering,Dinner

I focus on three major keywords commonly mentioned in the literature: Snacks & Dessert, Fast-food, and Healthy food. Those tags are superordinate terms that encompass many food types:

all.tags <- poi.r$category_tag
time_tag <- c('Breakfast', 'Brunch', 'Lunch', 'Dinner', 'Late Night')
place_tag <- c('Counter Service', 'Take Out and Delivery Only', 'Drive Through', 
              'Catering', 'Casual Dining', 'Buffet', 'Diner', 'Truck or Cart', 
              'Cafeteria', 'Bar or Pub', 'Fine Dining', 'Sports Bar', 'Wine Bar')

three.tags <- c('Snacks|Dessert', 'Fast Food', 'Healthy Food')

tagExamine <- function(tag_name){
  temp <- all.tags[str_detect(all.tags, tag_name)]
  total.num <- length(temp)
  
  temp %<>% lapply(function(x) {str_split(x, ',')}) %>% 
    unlist() %>% 
    .[!str_detect(., 'Snacks|Dessert|Fast Food|Healthy Food')] %>% 
    as.data.frame()

  colnames(temp) <- 'tag'
  temp %<>% filter(!tag %in% c(time_tag, place_tag)) %>% 
    group_by(tag) %>% 
    summarize(frequency=n()/total.num)
  
  temp$frequency <- formattable::percent(temp$frequency, digits = 0)
  temp <- temp[order(-temp$frequency),]
  return(head(temp, 10))
}

tag_freq <- cbind(tagExamine(three.tags[1]),
                  tagExamine(three.tags[2]),
                  tagExamine(three.tags[3]))

colnames(tag_freq) <- c('Snacks & Dessert', 'Freq.', 'Fast-food', 'Freq.', 'Healthy Food', 'Freq.')

kable(tag_freq, format = "html", row.names = F, align = c('l','r','l','r','l','r')) %>% 
  kable_styling("hover", full_width = T)
Snacks & Dessert Freq. Fast-food Freq. Healthy Food Freq.
Coffee Shop 40% Burgers 56% Smoothie & Juice Bar 38%
Bakery 31% Fried Chicken 18% Salad 38%
Tea House 22% Mexican Food 13% Mediterranean Food 22%
Ice Cream Shop 20% Ice Cream Shop 7% Vegetarian Food 21%
Smoothie & Juice Bar 16% Pizza 4% Drinks 15%
Donut Shop 14% Southwestern Food 4% Sandwich Shop 14%
Burgers 5% Chinese Food 3% Hawaiian Food 10%
Frozen Yogurt Shop 5% Seafood 3% Greek Food 9%
Drinks 5% Chicken Wings 3% American Food 9%
Salad 4% Fish & Chips 3% Vegan Food 5%

3. Changes in Eating Habit During the Pandemic

The figure below shows the changes in total restaurant visit count and Covid-19 cases in the Atlanta metro area from July 1, 2019 to May 2, 2022. At the very early phase of the pandemic, the total visits remained much lower than the pre-pandemic level. As the vaccination rate increased in early 2021, the total visit count bounced back again and recorded about 80% of the pre-pandemic level. In late 2021, the visit count decreased again as the Omicron variant became rampant, but the trend soon recovered.

To compare the restaurant visiting patterns before and during the pandemic time, this study selected two periods of time that are two years apart. July to December 2019 is referred to as Before Covid-19, and July to December 2021 is referred to as During Covid-19 in this article.

# total visitor trend
total.trend <- file.restaurant %>%
  group_by(date_range_end) %>%
  summarize(visit_counts = sum(visit_counts)) %>%
  mutate(date = as.Date(date_range_end)) %>% 
  mutate(visit_counts_2wk.ma = 
           rollmean(visit_counts, k = 2, fill = NA, align = 'center'))

p <- ggplot() + 
  covidCaseViz('Visit counts', max(total.trend$visit_counts_2wk.ma, na.rm = T)) +
  geom_line(data = total.trend, aes(date, visit_counts_2wk.ma, color = 'Restaurant Visits'), lwd = 1) +
  ggtitle('Total restaurant visit counts') +
  scale_color_manual(values = c(custom.color[1])) +
  scale_x_date(date_breaks = '3 months', date_labels = "%b`%y", expand = c(0, 0)) +
  theme_bw() +
  theme_saved

#ggsave('img/plot1.png', p, bg = 'transparent', width = 10, height = 7)

If we look at take-out and dine-in separately2, the impact on decreases in visits has always been greater for dine-in visits than take-out visits. After vaccination started, the take-out visits quickly recovered above 90% of what it was before the pandemic. On the other hand, the dine-in visits have gradually recovered from around 55% in January 2021 to 80% in May 2022.

# take-out vs. dine-in
file.restaurant %<>% mutate(take.out = dwell.10.down + dwell.20.down,
                     dine.in = dwell.60.down + dwell.60.up)

dwell.time2 <- file.restaurant %>%
  group_by(date_range_end) %>%
  summarize(across(c('take.out', 'dine.in'), sum)) %>%
  mutate(date = as.Date(date_range_end)) %>%
  pivot_longer(cols = c('take.out', 'dine.in'), names_to = 'dwell_time', values_to = 'visit_counts')

take.out <- dwell.time2 %>% 
  filter(dwell_time == 'take.out') %>% 
  mutate(visit_counts_2wk.ma = rollmean(visit_counts, k = 2, fill = NA, align = 'center'))

dine.in <- dwell.time2 %>% 
  filter(dwell_time == 'dine.in') %>% 
  mutate(visit_counts_2wk.ma = rollmean(visit_counts, k = 2, fill = NA, align = 'center'))

# comparison to July 2019
temp.mean <- mean(take.out$visit_counts_2wk.ma
                  [str_detect(take.out$date_range_end, '2019-07')])
take.out %<>% mutate(visit_counts_2wk.ma.bench = visit_counts_2wk.ma/temp.mean)

temp.mean <- mean(dine.in$visit_counts_2wk.ma
                  [str_detect(dine.in$date_range_end, '2019-07')])
dine.in %<>% mutate(visit_counts_2wk.ma.bench = visit_counts_2wk.ma/temp.mean)

take.out.dine.in <- rbind(take.out %>% mutate(type = 'Take-out'), 
                          dine.in %>% mutate(type = 'Dine-in'))

ggplot() +
  covidCaseVizPct('Benchmarked value', max(take.out$visit_counts_2wk.ma.bench, na.rm = T)) +
  geom_line(data = take.out.dine.in, 
            aes(date, visit_counts_2wk.ma.bench, col = type), lwd = 1) +
  scale_color_manual(values = c(custom.color[1], custom.color[2])) + 
  scale_x_date(date_breaks = '3 months', date_labels = "%b`%y", expand = c(0, 0)) +
  ggtitle('Take-out & Dine-in visit counts (compared to July 2019)') +
  theme_bw() + 
  theme_saved

The table below summarizes that the restaurant visits has decreased by around 20% while the take-out ratio has increased by 6%.

restaurant.before.covid <- file.restaurant %>% 
  filter(date_range_start_yymm %in% c('2019-07','2019-08','2019-09',
                                      '2019-10','2019-11','2019-12'))

restaurant.during.covid <- file.restaurant %>% 
  filter(date_range_start_yymm %in% c('2021-07','2021-08','2021-09',
                                      '2021-10','2021-11','2021-12'))

bv <- restaurant.before.covid$visit_counts
dv <- restaurant.during.covid$visit_counts
btv <- restaurant.before.covid$take.out
dtv <- restaurant.during.covid$take.out

##### visit count change and take-out ratio
summary <- data.frame(visit.before = paste(format(round(sum(bv)/1e6, 2), trim = T), 'million'), 
                      visit.during = paste(format(round(sum(dv)/1e6, 2), trim = T), 'million'), 
                      visit.change = formattable::percent(sum(dv)/sum(bv) - 1, digits = 1), 
                      take.out.before = formattable::percent(sum(btv)/sum(bv), digits = 1),
                      take.out.during = formattable::percent(sum(dtv)/sum(dv), digits = 1))

colnames(summary) <- c('Visits before Covid-19', 'Visits during Covid-19', 'Relative change in visits', 
                       'Take-out ratio before Covid-19', 'Take-out ratio during Covid-19')

kable(summary, format = "html", escape = F, row.names = F) %>% 
  kable_styling("hover", full_width = T)
Visits before Covid-19 Visits during Covid-19 Relative change in visits Take-out ratio before Covid-19 Take-out ratio during Covid-19
20.03 million 16.16 million -19.3% 43.4% 49.4%

Visits in the Snacks & Desserts and the Fast-food decreased by 2% and 13% respectively. Both the categories experienced decreases but not as much as total visits, which means the share of the two categories among total visits in fact increased during the pandemic. However, visits in the Healthy food category significantly decreased; -45% is the largest decline among the entire food-related tags.

time <- c('Breakfast', 'Brunch', 'Lunch', 'Dinner', 'Late Night')
place <- c('Counter Service', 'Take Out and Delivery Only', 'Drive Through', 
           'Catering', 'Casual Dining', 'Buffet', 'Diner', 'Truck or Cart', 
           'Cafeteria', 'Bar or Pub', 'Fine Dining', 'Sports Bar', 'Wine Bar')
food <- c('American Food', 'Asian Food', 'Bagel Shop', 'Bakery', 'BBQ and Southern Food',
          'Bubble Tea Shop', 'Burgers', 'Cajun and Creole Food', 'Caribbean Food',
          'Chicken Wings', 'Chinese Food', 'Cocktail Lounge', 'Coffee Shop',
          'Deli', 'Dessert', 'Donut Shop', 'Drinks', 'Fast Food', 'Fried Chicken',
          'Healthy Food', 'Hot Dogs', 'Ice Cream Shop', 'Indian Food', 'Italian Food',
          'Japanese Food', 'Korean Food', 'Latin American Food', 'Mediterranean Food',
          'Mexican Food', 'Pizza', 'Salad', 'Sandwich Shop', 'Seafood','Smoothie & Juice Bar',
          'Snacks', 'Soup', 'Steak House', 'Sushi', 'Tapas', 'Tea House', 'Thai Food',
          'Vegetarian Food', 'Vietnamese Food')
  
visitByTag <- function(file.restaurant) {
  tag <- lapply(unique(file.restaurant$category_tag), function(x) {str_split(x, ',')}) %>% 
    unlist() %>% 
    unique() %>% 
    sort() %>% 
    .[2:length(.)]
  
  total.visit.by.tag <- data.frame(tag = tag, visit.before = NA, visit.before.take.out = NA,
                                   visit.during = NA, visit.during.take.out = NA)
  
  for (i in 1:nrow(total.visit.by.tag)) {
    
    temp1 <- restaurant.before.covid %>% filter(str_detect(category_tag, tag[i]))
    temp2 <- restaurant.during.covid %>% filter(str_detect(category_tag, tag[i]))
    
    total.visit.by.tag$visit.before[i] <- sum(temp1$visit_counts)
    total.visit.by.tag$visit.before.take.out[i] <- sum(temp1$take.out)
    total.visit.by.tag$visit.during[i] <- sum(temp2$visit_counts)
    total.visit.by.tag$visit.during.take.out[i] <- sum(temp2$take.out)
  }

  total.visit.by.tag %<>% mutate(visit.before.take.out.ratio = round(visit.before.take.out/visit.before, 3),
                                 visit.during.take.out.ratio = round(visit.during.take.out/visit.during, 3),
                                 change.rate = round(visit.during/visit.before - 1, 3),
                                 visit.before.share = round(visit.before/sum(visit.before), 3))
  
  total.visit.by.tag %<>% mutate(tag.type = case_when(
    tag %in% time ~ 'time',
    tag %in% place ~ 'place',
    tag %in% food ~ 'food',
    TRUE ~ NA_character_))

  return(total.visit.by.tag)
}

total.visit.by.tag <- visitByTag(file.restaurant)

snack.dessert.visit <- total.visit.by.tag %>% 
  filter(tag %in% c('Snacks', 'Dessert')) %>% 
  select(tag, visit.before, visit.during, visit.before.take.out, visit.during.take.out)

snack.dessert.visit %<>% group_by() %>% 
  summarize(visit.before = sum(visit.before),
            visit.during = sum(visit.during),
            visit.before.take.out = sum(visit.before.take.out),
            visit.during.take.out = sum(visit.during.take.out)) %>% 
  mutate(tag = 'Snack & Dessert',
         change.rate = round(visit.during/visit.before - 1, 3),
         visit.before.take.out.ratio = round(visit.before.take.out/visit.before, 3),
         visit.during.take.out.ratio = round(visit.during.take.out/visit.during, 3)) %>% 
  select(tag, visit.before, visit.during, change.rate,
         visit.before.take.out.ratio, visit.during.take.out.ratio)

fast.healthy.visit <- total.visit.by.tag %>% 
  filter(tag %in% c('Fast Food', 'Healthy Food')) %>% 
  select(tag, visit.before, visit.during, change.rate,
         visit.before.take.out.ratio, visit.during.take.out.ratio)

three.tag.visit <- rbind(snack.dessert.visit, fast.healthy.visit) %>% 
  mutate(visit.before = paste(format(round(visit.before/1e6, 2), trim = T), 'million'), 
         visit.during = paste(format(round(visit.during/1e6, 2), trim = T), 'million'), 
         change.rate = formattable::percent(change.rate, digits = 1), 
         visit.before.take.out.ratio = formattable::percent(visit.before.take.out.ratio, digits = 1),
         visit.during.take.out.ratio = formattable::percent(visit.during.take.out.ratio, digits = 1))
   
colnames(three.tag.visit) <- c('Tag', 'Visits before Covid-19', 'Visits during Covid-19', 'Relative change in visits', 
                       'Take-out ratio before Covid-19', 'Take-out ratio during Covid-19')

three.tag.visit %>% 
  mutate(`Relative change in visits` = color_text("#5765ff", "#ff6363")(`Relative change in visits`), 
         `Take-out ratio before Covid-19` = color_text("#5765ff", "#ff6363")(`Take-out ratio before Covid-19`), 
         `Take-out ratio during Covid-19` = color_text("#5765ff", "#ff6363")(`Take-out ratio during Covid-19`)) %>% 
  kable(format = "html", escape = F, align = c("l","r","r","r","r","r"), row.names = F) %>% 
  kable_styling("hover", full_width = T)
Tag Visits before Covid-19 Visits during Covid-19 Relative change in visits Take-out ratio before Covid-19 Take-out ratio during Covid-19
Snack & Dessert 2.87 million 2.82 million -1.6% 54.4% 62.1%
Fast Food 4.52 million 3.93 million -13.1% 68.1% 77.7%
Healthy Food 0.30 million 0.16 million -44.9% 31.9% 35.1%

The following table clearly shows that types of food that are not so take-out-friendly have experienced huge decreases in visitors during the pandemic.

total.visit.by.tag.food <- total.visit.by.tag %>% filter(tag.type == 'food')
total.visit.by.tag.food %<>% select(tag, visit.before, visit.during, change.rate, 
                                    visit.before.take.out.ratio, visit.during.take.out.ratio)

total.visit.by.tag.food <- total.visit.by.tag.food[order(total.visit.by.tag.food$change.rate, decreasing = T),]

total.visit.by.tag.food %<>% mutate(
  visit.before = formattable::comma(visit.before, digits = 0),
  visit.during = formattable::comma(visit.during, digits = 0),
  change.rate = formattable::percent(change.rate, digits = 0),
  visit.before.take.out.ratio = formattable::percent(visit.before.take.out.ratio, digits = 0),
  visit.during.take.out.ratio = formattable::percent(visit.during.take.out.ratio, digits = 0),
  
)

total.visit.by.tag.food.vis <- total.visit.by.tag.food

colnames(total.visit.by.tag.food.vis) <- c('Tag', 'Visits before Covid-19', 'Visits during Covid-19', 
                                       'Relative change in visits', 
                                       'Take-out ratio before Covid-19', 'Take-out ratio during Covid-19')

total.visit.by.tag.food.vis %>% 
  mutate(`Relative change in visits` = color_text("#5765ff", "#ff6363")(`Relative change in visits`), 
         `Take-out ratio before Covid-19` = color_text("#5765ff", "#ff6363")(`Take-out ratio before Covid-19`), 
         `Take-out ratio during Covid-19` = color_text("#5765ff", "#ff6363")(`Take-out ratio during Covid-19`)) %>% 
  kable("html", escape = F, align = c("l","r","r","r","r","r"), row.names = F) %>% 
  kable_styling("hover", full_width = T, font_size = 14)
Tag Visits before Covid-19 Visits during Covid-19 Relative change in visits Take-out ratio before Covid-19 Take-out ratio during Covid-19
Bubble Tea Shop 104,550 120,161 15% 42% 43%
Donut Shop 330,693 359,016 9% 66% 76%
Tea House 581,770 606,348 4% 56% 62%
Korean Food 195,949 202,191 3% 31% 32%
Snacks 1,239,789 1,267,688 2% 56% 64%
Bakery 854,432 817,690 -4% 52% 60%
Dessert 1,626,369 1,553,023 -4% 53% 60%
Japanese Food 374,394 350,137 -6% 32% 34%
Coffee Shop 1,477,134 1,379,455 -7% 50% 58%
Hot Dogs 112,594 104,129 -8% 53% 62%
Cajun and Creole Food 174,249 154,430 -11% 45% 51%
Chicken Wings 1,411,482 1,230,799 -13% 46% 52%
Burgers 4,166,289 3,626,535 -13% 64% 73%
Fast Food 4,515,609 3,925,649 -13% 68% 78%
Latin American Food 109,917 95,371 -13% 39% 42%
Mexican Food 1,675,357 1,447,637 -14% 40% 43%
Vietnamese Food 146,259 125,497 -14% 33% 34%
Sushi 393,687 336,486 -14% 30% 31%
Fried Chicken 754,163 641,437 -15% 66% 75%
Mediterranean Food 205,079 171,911 -16% 37% 40%
Asian Food 246,298 202,471 -18% 34% 35%
Pizza 1,136,808 928,472 -18% 38% 42%
Deli 600,346 486,154 -19% 51% 56%
Salad 627,900 507,121 -19% 34% 39%
Ice Cream Shop 780,580 629,271 -19% 49% 60%
Chinese Food 558,698 448,859 -20% 43% 48%
Soup 236,375 189,874 -20% 37% 40%
Drinks 618,448 491,995 -20% 24% 27%
Caribbean Food 213,035 167,084 -22% 45% 48%
Smoothie & Juice Bar 501,707 388,491 -23% 43% 46%
American Food 2,776,838 2,128,812 -23% 30% 31%
Thai Food 173,261 132,230 -24% 37% 39%
BBQ and Southern Food 897,798 683,463 -24% 33% 34%
Sandwich Shop 1,872,191 1,423,005 -24% 41% 45%
Italian Food 599,052 447,298 -25% 30% 33%
Cocktail Lounge 561,898 417,456 -26% 29% 30%
Indian Food 131,755 97,920 -26% 34% 37%
Steak House 655,647 481,167 -27% 22% 22%
Seafood 950,662 664,180 -30% 32% 33%
Vegetarian Food 134,410 93,666 -30% 35% 40%
Bagel Shop 140,872 97,673 -31% 37% 44%
Tapas 138,011 91,321 -34% 26% 28%
Healthy Food 296,682 163,520 -45% 32% 35%

4. Eating Habits and Neighborhood Characteristics

The following table describes the relative changes in restaurant visits in nine different groups of neighborhoods categorized by median household income and minority population (%).

The relationships between income level and changes in restaurant visits are clear:

  • The visit count in the snacks & desserts category, on average, has increased in low- and mid-income neighborhoods while it has decreased in the high-income neighborhoods.

  • The visit count in the fast-food category, on average, has also decreased more in the high-income neighborhoods.

  • The visit count in the healthy food category has significantly decreased in neighborhoods with low and mid proportions of minority populations regardless of their income level.

  • In neighborhoods with high proportions of minority populations, on the other hand, changes in visit count in the healthy food category were associated with income level: low-income & high-minority neighborhoods experienced an 80% decrease, while high-income & high-minority neighborhoods showed a 39% increase although the t-test was not significant.

The minority population (%) and the changes in restaurant visits did not show a consistent relationship. Particularly, the behaviors of neighborhoods with high minority population (%) were considerably different from the others, while there was not much difference between neighborhoods with low minority population (%) and the ones with mid minority population (%). For example, among the low-income neighborhoods, the ones with high proportions of minority population have experienced a huge decline in total restaurant visits while the other two groups experienced slight decreases.

counties <- c("Fulton","Gwinnett","Cobb","DeKalb","Clayton"
              ,"Cherokee","Forsyth","Henry","Paulding","Coweta","Douglas","Fayette",
              "Carroll","Newton","Bartow","Walton","Rockdale","Barrow",
              "Spalding","Pickens","Haralson","Dawson","Butts",
              "Meriwether","Morgan","Pike","Lamar","Jasper","Heard")

census.sf <- get_acs('block group',
                     variables = c(income = 'B19013_001',
                                   pop = 'B01003_001',
                                   white = 'B02001_002',
                                   median.age = 'B01002_001'),
                     year = 2019,
                     county = counties,
                     geometry = TRUE,
                     state = "GA",
                     output = "wide")

census.sf %<>% mutate(income = incomeE,
                      minority = (popE-whiteE)/popE,
                      median.age = median.ageE) %>%
  select(geo.id = GEOID, income, minority, median.age) %>%
  mutate(income.cate = case_when(
    is.na(income) ~ NA_character_,
    income < 40000 ~ '1. 40,000 or less',
    income < 100000 ~ '2. 40,000-100,000',
    TRUE ~ '3. 100,000 or more')) %>%
  mutate(minority.cate = case_when(
    is.na(minority) ~ NA_character_,
    minority < 0.3 ~ '1. 0-30%',
    minority < 0.7 ~ '2. 30-70%',
    TRUE ~ '3. 70-100%')) %>%
  mutate(age.cate = case_when(
    is.na(median.age) ~ NA_character_,
    median.age <= 35 ~ '1. -35',
    median.age <= 45 ~ '2. 35-45',
    TRUE ~ '3. 45-'))

census <- census.sf %>% st_set_geometry(NULL)
poi.r.sf %<>% st_join(census.sf)
file.restaurant %<>% left_join(poi.r.sf %>%
                                 st_set_geometry(NULL) %>%
                                 select(placekey, geo.id), by = 'placekey')
setwd(temp.wd)
load('visits_list_long.RData')

visit.before.covid <- visits.list.long %>%
  filter(str_detect(date_range_start,
                    '2019-07|2019-08|2019-09|2019-10|2019-11|2019-12')) %>%
  group_by(placekey, home_bg) %>%
  summarize(visit.before = sum(visitor))

visit.during.covid <- visits.list.long %>%
  filter(str_detect(date_range_start,
                    '2021-07|2021-08|2021-09|2021-10|2021-11|2021-12')) %>%
  group_by(placekey, home_bg) %>%
  summarize(visit.during = sum(visitor))


visit.before.covid %<>% left_join(census, by = c('home_bg' = 'geo.id'))
visit.during.covid %<>% left_join(census, by = c('home_bg' = 'geo.id'))

visit.before.covid %<>% drop_na()
visit.during.covid %<>% drop_na()

visit.before.covid %<>% left_join(poi.r %>% select(placekey, category_tag), by = 'placekey')
visit.during.covid %<>% left_join(poi.r %>% select(placekey, category_tag), by = 'placekey')

visit.before.covid %<>% as.data.frame()
visit.during.covid %<>% as.data.frame()

income.cate <- sort(unique(visit.before.covid$income.cate))
minority.cate <- sort(unique(visit.before.covid$minority.cate))
age.cate <- sort(unique(visit.before.covid$age.cate))

total.visit.by.tag.by.group.empty <- data.frame(
  tag = rep(food, each = length(income.cate)*length(minority.cate)*length(age.cate)),
  income.cate = rep(rep(income.cate, each = length(minority.cate)*length(age.cate)),
                    times = length(food)),
  minority.cate = rep(rep(minority.cate, each = length(income.cate)),
                      times = length(food)*length(age.cate)),
  age.cate = rep(age.cate, times = length(income.cate)*length(minority.cate)*length(food)))


for (i in 1:length(food)) {

  temp1 <- visit.before.covid %>% filter(str_detect(category_tag, food[i])) %>%
    group_by(income.cate, minority.cate, age.cate) %>%
    summarize(visit.before = sum(visit.before)) %>%
    mutate(tag = food[i]) %>%
    as.data.frame()

  temp2 <- visit.during.covid %>% filter(str_detect(category_tag, food[i])) %>%
    group_by(income.cate, minority.cate, age.cate) %>%
    summarize(visit.during = sum(visit.during)) %>%
    mutate(tag = food[i]) %>%
    as.data.frame()

  temp3 <- total.visit.by.tag.by.group.empty %>%
    left_join(temp1, by = c('tag', 'income.cate', 'minority.cate', 'age.cate')) %>%
    left_join(temp2, by = c('tag', 'income.cate', 'minority.cate', 'age.cate')) %>%
    drop_na()

  temp3 %<>% mutate(combined.cate = str_c(income.cate, '_', minority.cate))

  if (i == 1) {
    total.visit.by.tag.by.group <- temp3
  } else {
    total.visit.by.tag.by.group %<>% rbind(temp3)
  }
}
rm(total.visit.by.tag.by.group.empty)

total.visit.by.tag.by.group %<>% mutate(tag.type = case_when(
  tag %in% time ~ 'time',
  tag %in% place ~ 'place',
  tag %in% food ~ 'food',
  TRUE ~ NA_character_))

total.visit.by.tag.by.group.food <- total.visit.by.tag.by.group %>% filter(tag.type == 'food')

## number of BGs by category
visit.before.covid %>% group_by(home_bg, income.cate, minority.cate) %>% summarize(n=n()) %>%
  group_by(income.cate, minority.cate) %>% summarize(n=n())
visit.during.covid %>% group_by(home_bg, income.cate, minority.cate) %>% summarize(n=n()) %>%
  group_by(income.cate, minority.cate) %>% summarize(n=n())


## t-test
inc.cate <- c('1. 40,000 or less','2. 40,000-100,000','3. 100,000 or more')
min.cate <- c('1. 0-30%','2. 30-70%','3. 70-100%')


visit.before.covid.bg <- visit.before.covid %>%
  group_by(home_bg, income.cate, minority.cate, category_tag) %>%
  summarize(visit.before = sum(visit.before, na.rm = T))

visit.during.covid.bg <- visit.during.covid %>%
  group_by(home_bg, income.cate, minority.cate, category_tag) %>%
  summarize(visit.during = sum(visit.during, na.rm = T))


beforeDuringComparison <- function(inc.cate, min.cate, tag){

  before <- visit.before.covid.bg %>%
    filter(str_detect(category_tag, tag) &
             income.cate == inc.cate & minority.cate == min.cate) %>%
    group_by(home_bg) %>%
    summarize(visit.before = sum(visit.before, na.rm = T))

  during <- visit.during.covid.bg %>%
    filter(str_detect(category_tag, tag) &
             income.cate == inc.cate & minority.cate == min.cate) %>%
    group_by(home_bg) %>%
    summarize(visit.during = sum(visit.during, na.rm = T))

  data <- left_join(before, during, by = 'home_bg')

  return(t.test(data$visit.before, data$visit.during, paired = T)$p.value)
}

tag.cate <- c('Snacks|Dessert','Fast Food','Healthy Food','')

for (i in 1:length(inc.cate)){
  for (j in 1:length(min.cate)){
    for (k in 1:length(tag.cate)){
      beforeDuringComparison(inc.cate[i], min.cate[j], tag.cate[k])
    }
  }
}

One important factor that may explain the relationship between the eating habit change and minority population (%) is the geographical location of the neighborhoods. As shown in the maps below, neighborhoods with high minority population (%) are concentrated near the City of Atlanta, while neighborhoods with low minority population (%) are mostly in suburbs.

tm_shape(census.sf) + 
  tm_fill(col = 'minority.cate', title = 'Minority (%)', palette = custom.color) +
  tm_shape(metro) + tm_borders(col = '#3b3b3b', lwd = 0.6) +
  tm_shape(atl) + tm_borders(col = 'red', lwd = 1.3) +
  tm_view(set.view = 9)

The pattern is more distinct for low-income neighborhoods. This necessitates a further analysis that takes account of the geographical aspect and built environment, which will be discussed in the section 6: Factors Related to Changes in Fast-food Consumption.

census.lowincome <- census.sf %>% filter(income.cate == '1. 40,000 or less') %>% st_transform(4326)
tm_shape(census.lowincome) + tm_fill(col = 'minority.cate', title = 'Minority (%)', 
                                     palette = custom.color) +
  tm_shape(metro) + tm_borders(col = '#3b3b3b', lwd = 0.6) +
  tm_shape(atl) + tm_borders(col = 'red', lwd = 1.3) +
  tm_view(set.view = 9)

Following ANOVA results confirm that both neighborhood income and minority population (%) are significantly associated with the changes in food consumption.

betweenGroupComparison <- function(tag){
  if (tag == ''){
    before <- visit.before.covid.bg
    during <- visit.during.covid.bg
  } else {
    before <- visit.before.covid.bg %>% filter(str_detect(category_tag, tag))
    during <- visit.during.covid.bg %>% filter(str_detect(category_tag, tag))
  }

  change <- left_join(before, during, by = c('home_bg','income.cate','minority.cate')) %>%
    mutate(change = visit.during/visit.before)
  
  cat('Visits in "', tag,'" ~ Income (-$40,000 / $40,000-100,000 / $100,000-)\n', sep = "")
  cat(' * p-value = ', summary(aov(change ~ income.cate, data = change))[[1]]$`Pr(>F)`[1], sep = "")
  cat('\n')
  cat('\n')
  
  cat('Visits in "', tag,'" ~ Minority population (-30% / 30-70% / 70%-)\n', sep = "")
  cat(' * p-value = ', summary(aov(change ~ minority.cate, data = change))[[1]]$`Pr(>F)`[1], sep = "")
  cat('\n')
}

betweenGroupComparison('Snacks|Dessert')
## Visits in "Snacks|Dessert" ~ Income (-$40,000 / $40,000-100,000 / $100,000-)
##  * p-value = 3.269937e-66
## 
## Visits in "Snacks|Dessert" ~ Minority population (-30% / 30-70% / 70%-)
##  * p-value = 2.864162e-167
betweenGroupComparison('Fast Food')
## Visits in "Fast Food" ~ Income (-$40,000 / $40,000-100,000 / $100,000-)
##  * p-value = 8.312509e-206
## 
## Visits in "Fast Food" ~ Minority population (-30% / 30-70% / 70%-)
##  * p-value = 6.890923e-142
betweenGroupComparison('Healthy Food')
## Visits in "Healthy Food" ~ Income (-$40,000 / $40,000-100,000 / $100,000-)
##  * p-value = 4.438908e-24
## 
## Visits in "Healthy Food" ~ Minority population (-30% / 30-70% / 70%-)
##  * p-value = 1.922992e-13

5. Changes in Fast-food Consumption

Fast-food takes up a significant part of the contemporary diet in the U.S. Before the pandemic, fast-food consumption (%) was around 20 - 30% as shown in the following figures. It was particularly higher in neighborhoods with low median household income, a high proportion of minority population, and the ones that are in suburbs.

When the pandemic started, fast-food consumption (%) spiked up to almost 40%. It then soon stabilized at a higher value than the pre-pandemic level. The fast-food consumption (%) has been maintained at about 2-3%p higher than before, even until the most recent point in time of the data. This implies that people are still consuming fast-food slightly more than they were before the pandemic, even though they have been slowly returning to dine-in restaurants (as we have seen in the section 3).

This trend is found in any type of neighborhood only except for low-income neighborhoods. The fast-food consumption (%) of low-income neighborhoods has gone down to the pre-pandemic level around September 2021. This is not intuitively understandable, but one clear thing is that this cannot be interpreted solely by the income since the income, the minority population (%), and whether it is in a city or suburb are not independent of each other. Therefore, this study conducts a linear regression to examine the ceteris paribus effect of each neighborhood characteristic.

poi.census <- st_join(poi.r.sf %>% st_transform(st_crs(census.sf)) %>% select(placekey), 
                      census.sf, join = st_intersects) %>%
  st_set_geometry(NULL) %>%
  mutate(income.cate = case_when(
    is.na(income) ~ NA_character_,
    income < 40000 ~ '1. 40,000 or less',
    income < 100000 ~ '2. 40,000-100,000',
    TRUE ~ '3. 100,000 or more')) %>%
  mutate(minority.cate = case_when(
    is.na(minority) ~ NA_character_,
    minority < 0.3 ~ '1. 0-30%',
    minority < 0.7 ~ '2. 30-70%',
    TRUE ~ '3. 70-100%')) %>%
  select(placekey, income.cate, minority.cate)

file.restaurant %<>% left_join(poi.census, by = 'placekey')

# income
fast.food.income <- file.restaurant %>%
  group_by(date_range_end, fast.food, income.cate) %>%
  summarize(visit_counts = sum(visit_counts)) %>%
  spread(key = fast.food, value = visit_counts) %>%
  rename(f = '1', nf = '0') %>%
  mutate(date = as.Date(date_range_end)) %>%
  drop_na() %>%
  as.data.frame()

fast.food.income1 <- fast.food.income %>%
    filter(income.cate == "1. 40,000 or less") %>%
    mutate(f.2wk.ma = rollmean(f, k = 2, fill = NA, align = 'center'),
           nf.2wk.ma = rollmean(nf, k = 2, fill = NA, align = 'center')) %>%
    mutate(fast.food.ratio = f.2wk.ma/(f.2wk.ma+nf.2wk.ma))

fast.food.income2 <- fast.food.income %>%
    filter(income.cate == "2. 40,000-100,000") %>%
    mutate(f.2wk.ma = rollmean(f, k = 2, fill = NA, align = 'center'),
           nf.2wk.ma = rollmean(nf, k = 2, fill = NA, align = 'center')) %>%
    mutate(fast.food.ratio = f.2wk.ma/(f.2wk.ma+nf.2wk.ma))

fast.food.income3 <- fast.food.income %>%
    filter(income.cate == "3. 100,000 or more") %>%
    mutate(f.2wk.ma = rollmean(f, k = 2, fill = NA, align = 'center'),
           nf.2wk.ma = rollmean(nf, k = 2, fill = NA, align = 'center')) %>%
    mutate(fast.food.ratio = f.2wk.ma/(f.2wk.ma+nf.2wk.ma))

fast.food.income <- rbind(fast.food.income1 %>% mutate(type = '1. ~ $40,000'),
                        fast.food.income2 %>% mutate(type = '2. $40,000 ~ $100,000'),
                        fast.food.income3 %>% mutate(type = '3. $100,000 ~'))

ggplot() +
  covidCaseVizPct('Fast-food ratio', max(fast.food.income$fast.food.ratio, na.rm = T)) +
  geom_line(data = fast.food.income, 
            aes(date, fast.food.ratio, col = type), lwd = 1) +
  scale_color_manual(values = c(custom.color[1], custom.color[2], custom.color[3])) + 
  scale_x_date(date_breaks = '3 months', date_labels = "%b`%y", expand = c(0, 0)) +
  ggtitle('Fast-food ratio: by median household income') +
  theme_bw() + 
  theme_saved

# race
fast.food.race <- file.restaurant %>%
  group_by(date_range_end, fast.food, minority.cate) %>%
  summarize(visit_counts = sum(visit_counts)) %>%
  spread(key = fast.food, value = visit_counts) %>%
  rename(f = '1', nf = '0') %>%
  mutate(date = as.Date(date_range_end)) %>%
  drop_na() %>% 
  as.data.frame()

fast.food.race1 <- fast.food.race %>% 
  filter(minority.cate == "1. 0-30%") %>% 
  mutate(f.2wk.ma = rollmean(f, k = 2, fill = NA, align = 'center'),
         nf.2wk.ma = rollmean(nf, k = 2, fill = NA, align = 'center')) %>% 
  mutate(fast.food.ratio = f.2wk.ma/(f.2wk.ma+nf.2wk.ma))

fast.food.race2 <- fast.food.race %>% 
  filter(minority.cate == "2. 30-70%") %>% 
  mutate(f.2wk.ma = rollmean(f, k = 2, fill = NA, align = 'center'),
         nf.2wk.ma = rollmean(nf, k = 2, fill = NA, align = 'center')) %>% 
  mutate(fast.food.ratio = f.2wk.ma/(f.2wk.ma+nf.2wk.ma))

fast.food.race3 <- fast.food.race %>%
  filter(minority.cate == "3. 70-100%") %>% 
  mutate(f.2wk.ma = rollmean(f, k = 2, fill = NA, align = 'center'),
         nf.2wk.ma = rollmean(nf, k = 2, fill = NA, align = 'center')) %>% 
  mutate(fast.food.ratio = f.2wk.ma/(f.2wk.ma+nf.2wk.ma))

fast.food.race <- rbind(fast.food.race1 %>% mutate(type = '1. ~ 30%'),
                        fast.food.race2 %>% mutate(type = '2. 30 ~ 70%'),
                        fast.food.race3 %>% mutate(type = '3. 70% ~'))

ggplot() +
  covidCaseVizPct('Fast-food ratio', max(fast.food.race$fast.food.ratio, na.rm = T)) +
  geom_line(data = fast.food.race, 
            aes(date, fast.food.ratio, col = type), lwd = 1) +
  scale_color_manual(values = c(custom.color[1], custom.color[2], custom.color[3])) + 
  scale_x_date(date_breaks = '3 months', date_labels = "%b`%y", expand = c(0, 0)) +
  ggtitle('Fast-food ratio: by minority population') +
  theme_bw() + 
  theme_saved

fast.food.ratio.city <- file.restaurant %>%
  filter(in.city == 1) %>%
  group_by(date_range_end, fast.food) %>%
  summarize(visit_counts = sum(visit_counts)) %>%
  mutate(date = as.Date(date_range_end)) %>%
  as.data.frame() %>%
  spread(key = fast.food, value = visit_counts) %>%
  rename(f = '1', nf = '0') %>%
  mutate(f.2wk.ma = rollmean(f, k = 2, fill = NA, align = 'center'),
         nf.2wk.ma = rollmean(nf, k = 2, fill = NA, align = 'center')) %>%
  mutate(fast.food.ratio = f.2wk.ma/(f.2wk.ma+nf.2wk.ma))

fast.food.ratio.suburb <- file.restaurant %>%
  filter(in.city == 0) %>%
  group_by(date_range_end, fast.food) %>%
  summarize(visit_counts = sum(visit_counts)) %>%
  mutate(date = as.Date(date_range_end)) %>%
  as.data.frame() %>%
  spread(key = fast.food, value = visit_counts) %>%
  rename(f = '1', nf = '0') %>%
  mutate(f.2wk.ma = rollmean(f, k = 2, fill = NA, align = 'center'),
         nf.2wk.ma = rollmean(nf, k = 2, fill = NA, align = 'center')) %>%
  mutate(fast.food.ratio = f.2wk.ma/(f.2wk.ma+nf.2wk.ma))

fast.food.loc <- rbind(fast.food.ratio.city %>% mutate(type = 'city'),
                       fast.food.ratio.suburb %>% mutate(type = 'suburb'))

ggplot() +
  covidCaseVizPct('Fast-food ratio', max(fast.food.loc$fast.food.ratio, na.rm = T)) +
  geom_line(data = fast.food.loc, 
            aes(date, fast.food.ratio, col = type), lwd = 1) +
  scale_color_manual(values = c(custom.color[1], custom.color[2])) + 
  scale_x_date(date_breaks = '3 months', date_labels = "%b`%y", expand = c(0, 0)) +
  ggtitle('Fast-food ratio: by city/suburb') +
  theme_bw() + 
  theme_saved

7. Summary

  1. The analyses based on restaurant visiting data confirmed what the survey-based studies found: people have been eating unhealthier during the pandemic.

    1. People are eating more snacks, desserts, and fast-food, but less healthy food such as salad, Mediterranean food, and vegetarian food.
    2. A preference for take-out to avoid social interactions during the pandemic led to a preference for unhealthy food like snacks, desserts, and fast-food.
  2. People in low-income neighborhoods have had an unhealthier diet than people in the high-income neighborhood. However, the relationship between the minority population (%) and the changes in eating habits was mixed,

  3. Urbanness (e.g., high walkability, high density, short distance to a grocery store, and a great number of nearby restaurants) has a positive effect on reducing fast-food consumption and the impact gets greater in neighborhoods where the initial fast-food consumption (%) is high.

    1. Eating habits of people in neighborhoods with high fast-food consumption, which are typically marginalized communities, are more strongly influenced by the surrounding environment than others.
  4. Low SES (e.g., low education, low income, and a high proportion of minority population) is associated with an increase in the consumption of fast-food.

    1. The eating habits of marginalized populations have gotten unhealthier during the pandemic.

Efforts should be made to ensure that people in marginalized neighborhoods have access to various food options within a walkable distance.

  1. Fast-food consumption (%) is still higher than the pre-pandemic average.
    1. Even though people are slowly returning to restaurants as dine-in customers, their fast-food consumption (%) is still 2-3% higher than before the pandemic.

References

Alamri, E. S. (2021). Effects of COVID-19 home confinement on eating behavior: A review. Journal of Public Health Research, 10(3).
Ammar, A., Brach, M., Trabelsi, K., Chtourou, H., Boukhris, O., Masmoudi, L., Bouaziz, B., Bentlage, E., How, D., Ahmed, M., & Mueller, P. (2020). Effects of COVID-19 home confinement on physical activity and eating behaviour preliminary results of the ECLB-COVID19 international online-survey. MedRxiv.
Cheikh Ismail, L., Osaili, T. M., Mohamad, M. N., Marzouqi, A. A., Jarrar, A. H., Jamous, D. O. A., Magriplis, E., Ali, H. I., Sabbah, H. A., Hasan, H., AlMarzooqi, L. M. R., Stojanovska, L., Hashim, M., Obaid, R. R. S., Saleh, S. T., & Dhaheri, A. S. A. (2020). Eating habits and lifestyle during COVID-19 lockdown in the united arab emirates: A cross-sectional study. Nutrients, 12(11), 3314.
Cummings, J. R., Ackerman, J. M., Wolfson, J. A., & Gearhardt, A. N. (2021). COVID-19 stress and eating and drinking behaviors in the united states during the early stages of the pandemic. Appetite, 162, 105163.
Morland, K., Wing, S., Roux, A. D., & Poole, C. (2002). Neighborhood characteristics associated with the location of food stores and food service places. American Journal of Preventive Medicine, 22(1), 23–29.
O’Connell, M., Smith, K., & Stroud, R. (2021). The dietary impact of the COVID-19 pandemic. Journal of Health Economics, 102641.
Robinson, E., Boyland, E., Chisholm, A., Harrold, J., Maloney, N. G., Marty, L., Mead, B. R., Noonan, R., & Hardman, C. A. (2021). Obesity, eating behavior and physical activity during COVID-19 lockdown: A study of UK adults. Appetite, 156, 104853.
Ruiz-Roso, M. B., Carvalho Padilha, P. de, Mantilla-Escalante, D. C., Ulloa, N., Brun, P., Acevedo-Correa, D., Arantes Ferreira Peres, W., Martorell, M., Aires, M. T., Oliveira Cardoso, L. de, & Carrasco-Marín, F. (2020). Covid-19 confinement and changes of adolescent’s dietary trends in italy, spain, chile, colombia and brazil. Nutrients, 12(6), 1807.
Scarmozzino, F., & Visioli, F. (2020). Covid-19 and the subsequent lockdown modified dietary habits of almost half the population in an italian sample. Foods, 9(5), 675.
Sidor, A., & Rzymski, P. (2020). Dietary choices and habits during COVID-19 lockdown: Experience from poland. Nutrients, 12(6), 1657.
Yang, G. Y., Lin, X. L., Fang, A. P., & Zhu, H. L. (2021). Eating habits and lifestyles during the initial stage of the COVID-19 lockdown in china: A cross-sectional study. Nutrients, 13(3), 970.

  1. ‘Number of visitors’ indicates the total number of unique visitors while ‘number of visits’ can count repeated visits by a same visitor during the counting period.↩︎

  2. Since the data do not explicitly distinguish the take-out customers and dine-in customers, this study estimates the number of take-out visitors based on the time they stayed in that place: if a visitor stayed less than 20 minutes, the visit is assumed to be take-out.↩︎