Illustration by Dmitrii Kharchenko

Illustration by Dmitrii Kharchenko

Introduction

For those of us in the WEIRD (Western Educated Industrialized, Rich, and Democratic) part of the world, the Digital Economy (DE) is intertwined with our daily lives and nearly indistinguishable from other aspects of our national Gross Domestic Product (GDP). Yet, it is only in the last few years that the U.S. government began to formally define this aspect of our economy, leveraging the findings of other organizations such as the National Telecommunications and Information Administration (NTIA) and the Digital Economy Board of Advisors (DEBA).1

Defining digital markets is challenging due to various factors. For instance, transactions on spaces like social media platforms often have minimal direct consumer costs, relying heavily on advertising revenue. In fact, it is currently estimated that priced digital services account for at least 45% of the DE (as seen in Figure 2).2

The GDP, often looked to as our economic barometer, is not telling the full story; the DE is in a state of constant flux, growing and evolving faster than researchers can collect the data.3 Furthermore, societal shifts resulting from the COVID-19 pandemic—such as the widespread adoption of remote work, online education, and digital commerce—combined with the accelerating use of artificial intelligence, contribute significantly to this dynamic landscape. These factors provide a compelling case for studying this topic and deepening our understanding of our modern world.

Accurately assessing the value of free digital goods and services is crucial for effective management of the digital economy. This project brings awareness to this through visualizing the information provided in the Bureau of Economic Analysis’s report “U.S. Digital Economy: New and Revised Estimates, 2017–2022” and further highlights emerging trends. For more on the methodology behind the calculations visit the BEA.

Prepping the data for the charts:
code
    # load libraries
    library(treemap) # create a basic treemap
    library(d3treeR) # html tree mao
    library(htmlwidgets)
    library(plotly) # dynamic graphs
    library(tidyverse) # data wrangling
    library(readxl) # file reading

    # import data
    DE22 <- read_excel("docs/DE22.xlsx")

    # wrangle the data
    DE22 <-  DE22 %>% 
      mutate(Value = as.numeric(Value))

    # tree map colors
    de_palette0<- c(
      "#F279B2", # eCommerce
      "#E3FF3B", # infrastructure 
      "#C69FFF") # printed services 

    # line graph colors
    de_palette <- c(
      "Digital Economy" = "#555555",
      "Priced Digital Services" = "#B685FF",
      "Infrastructure" = "#E3FF3B",
      "E-Commerce" = "#FF2f88",
      "Federal Nondefense Digital Services" = "#084C97")

    # stacked bar graph colors
    # there is probably a better way to do this, but automation was failing me
    de_palette1 <- c(
      "Professional and business services" = "#B685FF",
      "Administrative and waste management services" = "#B685FF",
      "Computer systems design and related services" = "#B685FF",
      "Miscellaneous professional, scientific, and technical services" = "#B685FF",
      "Educational services, health care, and social assistance" = "#B685FF",
      "Educational services" = "#B685FF",
      "Management of companies and enterprises" = "#B685FF",
      "Information" = "#B685FF",
      "Broadcasting and telecommunications" = "#FF2f88",
      "Data processing, internet publishing, and other information services" = "#FF2f88",
      "Publishing industries, except internet (includes software)" = "#FF2f88",
      "Motion picture and sound recording industries" = "#FF2f88",
      "Transportation and warehousing" = "#F279B2",
      "Wholesale trade" = "#084C97",
      "Manufacturing" = "#FE7C58",
      "Computer and electronic products" = "#FE7C58",
      "Other durable goods" = "#FE7C58",
      "Nondurable goods"= "#FE7C58",
      "Retail Trade" = "#E3FF3B",
      "Other retail" = "#E3FF3B",
      "Food and beverage stores" = "#E3FF3B",
      "Motor vehicle and parts dealers" = "#E3FF3B",
      "General merchandise stores" = "#E3FF3B",
      "Other transportation and support activities" = "#555555",
      "Finance and insurance" = "#555555",
      "Real estate and rental and leasing" = "#555555",
      "Truck transportation" = "#555555",
      "Government" = "#555555",
      "Federal Government" = "#555555",
      "State and local government"= "#555555",
      "Other" = "#555555",
      "Utilities" =  "#555555",
      "Arts, entertainment, recreation, accommodation, and food services" = "#555555",
      "Construction" = "#555555")

What makes up the digital economy?

The estimates for the real value added by activity reveal that in 2022, the total Digital Economy was ~2.6 trillion dollars, with infrastructure accounting the largest portion of that, at roughly 945 Billion! The “value added”, refers to the monetary gains from sources such as compensation of employees, taxes, or revenue generated. 2

code
# guide: https://rdrr.io/github/timelyportfolio/d3treeR/man/d3tree2.html
# code creates a tree map, visit my github repo to see the code full code for the data tabs -> https://github.com/BrookemWalters/digitaleccon/blob/main/digital_markets.qmd

# prepare the data for the chart
real_value_activity <-  DE22 %>% 
  # remove subtotals
  filter(!str_detect(MicroAttribute, regex("_TOTAL", ignore_case = TRUE)),
    Measurement == "Digital Economy Real Value Added by Activity", # select measurement
    Year == "2022") %>% 
  select(Category, MicroAttribute, Bil_Dols) %>% 
  mutate( MicroAttribute= sub("_.*$", "", MicroAttribute),
          Bil_dollars = round(Bil_Dols, 1),
          # the d3 package doesn't allow for extra labels so combine the strings and make own label!
          MicroAttribute_labels = str_c(MicroAttribute, ", $", Bil_Dols, " B"))



# create a dynamic tree map
real_value <- treemap(real_value_activity,
    index = c("Category", "MicroAttribute_labels"),
    align.labels=list(
        c("center", "top"), 
        c("right", "center")),  
    vSize = "Bil_Dols",
    type = "index",
    vColor="MicroAttribute_labels",
    title = "Digital Economy Real Value Added by Activity",
    palette = de_palette0
  ) # end of treemap options

tree <- d3tree(real_value,
              width = "100%",
              height = "600px",
              rootname ="2022 Digital Economy Real Value Added by Activity (US Billions)",
              )



saveWidget(tree, file = "TreePlot.html", selfcontained = T)

2022 Digital Economy Real Value Added by Activity:

Tip

On the treemap below, click on an element to expand and reveal the value added by each activity.

  • E-commerce: “the remote sale of goods and services over computer networks”.

  • Federal non-defense digital services: “annual budget for federal non-defense government agencies whose services are directly related to supporting the digital economy”. (note hidden from tree-map due to low values)

  • Infrastructure: physical materials and organizational arrangements that support the existence and use of computer networks and the digital economy, primarily information and communications technology (ICT) goods and services”.

  • Priced digital services: “services related to computing and communication that are performed for a fee charged to the consumer”.

in millions 2017 2018 2019 2020 2021 2022
Digital Market: 1,839,372 1,956,835 2,092,357 2,227,354 2,439,735 2,593,348
Infrastructure: 629,798 677,037 731,936 790,468 882,084 944,697
Hardware 238,267 246,195 246,740 254,085 260,568 265,619
Software 391,531 430,963 486,019 538,027 626,225 686,946
E-Commerce: 409,601 420,936 424,624 467,669 466,006 470,406
Business-to- Business 309,496 308,708 308,832 321,891 315,434 304,534
Business-to-Consumer 100,106 112,377 116,024 146,378 151,133 167,672
Priced Digital Services: 799,673 858,915 938,124 969,133 1,102,138 1,198,392
Cloud Services 57,782 77,513 106,626 137,127 187,496 243,288
Telecommunications Services 417,618 432,245 457,233 440,881 472,051 491,346
Internet and Data Services 130,158 130,654 143,147 146,579 173,912 178,200
All Other Priced Digital Services 194,115 218,908 233,178 249,741 278,721 301,394
Federal Nondefense : 300 287 283 265 256 258

note, bold items are subtotals

Fig.1 Digital Economy Real Value Added by Activity



How has the digital market changed over time?

The area graph below reveals that the gross output of the digital economy has grown by ~36% over the last five years, with priced digital services accounting for 45% of the output annually. The gross output captures the value of goods and services produced.2

Digital Economy Gross Output by Activity, 2017-2022

Tip

On the area graph below, hoover the mouse over the plotted points to see the proportional relationship between the different types of economic activity.

2022 plots show the five year growth from 2017.

code
# https://plotly.com/r/styling-figures/
de_time <-  DE22 %>%
  filter(str_detect(MicroAttribute, regex("_TOTAL", ignore_case = TRUE))) %>% 
  filter(Measurement == "Real Digital Economy Gross Output by Activity") %>% 
  group_by(Category, Year) %>% 
    summarise(Bil_Dols= sum(Bil_Dols))


# create factors so the legend is in order of largest to smallest
de_time$Category <- factor(de_time$Category,
                          levels = c(
                            "Federal Nondefense Digital Services",
                            "E-Commerce",
                            "Infrastructure",
                            "Priced Digital Services",
                            "Digital Economy"))

gross_output_plot <- plot_ly(de_time, 
                x = ~Year, 
                y = ~Bil_Dols,
                color = ~Category, # Use color for different categories
                colors = de_palette,
                marker = list(sizeref = 8), 
                line = list(width = 2),
                fill = "tonexty") %>% 
  
  add_trace(
    type = "scatter",
    mode = "lines+markers",   
    text = ~ifelse(
      Year == 2022,
        paste( # show five year growth for 2022 data points
          "Five Year Growth: +",
          scales::percent((Bil_Dols[Year == 2022] - Bil_Dols[Year == 2017]) / Bil_Dols[Year == 2017]),
          "<br>Year: ", Year,
          "<br>Category: ", Category,
          "<br>$", formatC(Bil_Dols, big.mark = ",", format = "f", digits = 1), "B",
          "<br>% of Digital Economy: ",
          scales::percent((Bil_Dols /Bil_Dols[Category == "Digital Economy"]), accuracy = 1L)
      ),  

        paste( # else
          "<b>Year</b>: ", Year,
          "<br><b>Category</b>: ", Category,
          "<br>$", formatC(Bil_Dols, big.mark = ",", format = "f", digits = 1), "B",
          "<br><b>% of Digital Economy</b>: ",
          scales::percent((Bil_Dols /Bil_Dols[Category == "Digital Economy"]), accuracy = 1L))          
          ),
        hoverinfo = 'text') %>% 

  layout(
    margin = list(l=100, r=50, b=50, t=50, pad=10),
    legend =  list(title= "Real Digital Economy Gross Output by Activity",
      x = 0.0,
      y = 1.3),
    yaxis = list(title = "$Billions", showgrid = FALSE, tickformat = ","),
    xaxis = list (showgrid = FALSE))

gross_output_plot
  • E-commerce: “the remote sale of goods and services over computer networks”.

  • Federal non-defense digital services: “annual budget for federal non-defense government agencies whose services are directly related to supporting the digital economy”. (note hidden from tree-map due to low values)

  • Infrastructure: physical materials and organizational arrangements that support the existence and use of computer networks and the digital economy, primarily information and communications technology (ICT) goods and services”.

  • Priced digital services: “services related to computing and communication that are performed for a fee charged to the consumer”.

Fig.2 Real Digital Economy Gross Output by Activity



What is the digital market size in terms of productivity?

Professional and business services contain the largest share of the digital market’s workforce, with over 3 million employed in this sector and computer systems design and related services comprising nearly 79% of that total. 2

2022 Digital Economy Employment by Industry:

Tip

Hoover the mouse over the stacked bars to see which sectors are the largest employers by category.

code
de_employment <-  DE22 %>%
  filter(
    !str_detect(MicroAttribute, regex("_TOTAL", ignore_case = TRUE)),     
    Measurement == "Digital Economy Employment by Industry",
         Year == 2022,
         Value > 0) %>% 
  mutate(
      Subcategory = str_remove(Subcategory, "_SC"),
      Attribute = str_remove(Attribute, "_A"),
      SubAttribute = str_remove(SubAttribute, "_SA"),
      Subcategory_Wrapped = case_when( # shorten titles on the x-axis and create groupings to reduce clutter
      Subcategory == "Durable goods" ~ "Professional & Business Services",
      Subcategory == "Professional and business services" ~ "Prof. & Bus. Services",
      Subcategory == "Wholesale trade" ~ "Wholesale Trade",
      Subcategory == "Transportation and warehousing" ~ "Other",     
      Subcategory == "Government" ~ "Other",      
      Subcategory == "Finance, insurance, real estate, rental, and leasing" ~ "Other",  
      Subcategory == "Construction" ~ "Other", 
      Subcategory == "Utilities" ~ "Other", 
      Subcategory == "Arts, entertainment, recreation, accommodation, and food services" ~ "Other", TRUE ~ Subcategory)) %>%
  group_by(Subcategory, SubAttribute, Subcategory_Wrapped) %>% 
  summarise(Total_Employees = sum(Value))


# create factors to the bars are arranged largest to shortest
de_employment$Subcategory_Wrapped <- factor(de_employment$Subcategory_Wrapped,
                                    levels = c(
                                      "Prof. & Bus. Services",
                                      "Wholesale Trade",
                                      "Information",
                                      "Manufacturing",
                                      "Retail Trade",
                                      "Other"))

 # this sorts so the stacks will look pretty and orderd. SMH
SA_Factors <-  de_employment %>%
  group_by(SubAttribute) %>%
  summarise(Value = sum(Total_Employees)) %>%
  arrange(desc(Value))


de_employment$SubAttribute_factors <- factor(
  de_employment$SubAttribute,
  levels = c(SA_Factors$SubAttribute))


employ_plot <- plot_ly(
  de_employment,
  x = ~Subcategory_Wrapped,
  y = ~Total_Employees,
  color = ~SubAttribute_factors,
  colors = ~de_palette1,
  textposition = "none")%>% 

add_trace(
  type = "bar",
  text = ~paste(
    "<b>Employees:</b>",
    formatC(Total_Employees, big.mark = ",", format = "f", digits = 0),
    "<br><b>Category:</b>", Subcategory, 
    "<br><b>Industry:</b>", SubAttribute), 
    marker = list(
    line = list(
      width = .5,
      color = "white" )),
  hoverinfo = 'text') %>% 

  layout(
    showlegend = FALSE,
    margin = list(l=100, r=50, b=50, t=50, pad=10),
    xaxis = list(title = ""),
    yaxis = list(title = "Full & Part-Time Employees (Thousands)", showgrid = FALSE, tickformat = ","),
    barmode = 'stack' )
employ_plot
  • Information:
    • broadcasting and telecommunications
    • data processing
    • internet publishing, and other information services
    • publishing industries, except internet (includes software)
    • motion picture and sound recording industries
  • Manufacturing:
    • durable goods
      • computer and electronic products
      • other durable goods (wood, machinery, furniture , electrical equipment, etc.)
    • non-durable goods (food, paper, petrol etc.)
  • Professional and business services:
    • administrative and waste management services
    • educational services, health care, and social assistance
    • health care and social assistance
    • management of companies and enterprises
    • professional, scientific, and technical services
  • Retail Trade:
    • broadcasting and telecommunications
    • data processing
    • internet publishing, and other information services
    • publishing industries, except internet (includes software)
    • motion picture and sound recording industries
  • Wholesale Trade:
    • broadcasting and telecommunications
    • data processing
    • internet publishing, and other information services
    • publishing industries, except internet (includes software)
    • motion picture and sound recording industries
  • Other: a catch all for all other industries with low employee counts
    • arts
    • construction
    • federal ,state and local governments
    • mining
    • utilities
    • construction

note, industries with counts reported a 0 were excluded.

Fig.3 2022 Digital Economy Employment by Industry



Conclusion

Economists from the Stanford Institute for Economic Policy Research emphasize that the digital economy will continue to play an important role, as investments into this sector are benefited by economies of scale and network effects 4.” As shown in figure 2, an explosion of growth occured between 2017 and 20202. Considering that the top firms in our nation stem from the tech industry and primarily provide digital goods and services, it is crucial to measure and understand the impact of the digital economy on our GDP, a common source and compass for policy making3.

In summary, the digital market is a catalyst of our economic future. Understanding its impact—both quantifiable and transformative—is essential for informed policy-making and sustainable growth.

Footnotes

  1. K. Barefoot, D. Curtis, W. Jolliff, J.R. Nicholson, & R. Omohundro, R. (2018, March). Defining and Measuring the Digital Economy. Bureau of Economic Analysis (BEA).↩︎

  2. U.S. Bureau of Economic Analysis (BEA). (2023). U.S. Digital Economy: New and Revised Estimates, 2017–2022.↩︎

  3. E. Brynjolfsson, & A, Collis (2019, November). How Should We Measure the Digital Economy? Harvard Business Review.↩︎

  4. P. Tambe, L. Hitt, D. Rock, and E. Brynjolfsson. (2020, December) Digital Capital and Superstar Firms. The Stanford Institute for Economic Policy Research (SIEPR)↩︎