Show Code
library(sf)
library(ggplot2)
zones <- st_read("data/china_shock/china_shock_gender.gpkg", quiet = TRUE)
jobs <- read.csv("data/china_shock/china_shock_gender_long.csv")Model report 2 — Diversity in a Globalized World
library(sf)
library(ggplot2)
zones <- st_read("data/china_shock/china_shock_gender.gpkg", quiet = TRUE)
jobs <- read.csv("data/china_shock/china_shock_gender_long.csv")The best-known finding about the China shock concerns places. Autor, Dorn and Hanson (2013) showed that the American commuting zones most exposed to Chinese imports lost the most factory jobs. But a place is not a single worker, and factory work is not a single kind of job. Clothing and textile plants employed many women; car-parts and machinery plants employed mostly men.
One plausible reason to expect the shock to reach these groups at different times is the order in which Chinese exports are thought to have grown. First came cheap, labour-intensive goods such as clothing, shoes and fabric. Then, after China joined the World Trade Organization in December 2001, came furniture, metal products and electronics. If so, women’s factory jobs should have been hit first and men’s later.
This report asks whether men and women lost factory work in the same way when Chinese imports arrived.
The data comes from Autor, Dorn and Hanson (2013) and is organised by commuting zone: a cluster of counties close enough that people live in one and work in another. The continental United States has 722. For each zone we observe Chinese import competition, in thousands of dollars of imports per worker. We also observe the change in factory employment, separately for women and men, over two periods: 1990–2000 and 2000–2007. Table 1 shows how the data is laid out.
knitr::kable(head(jobs[, c("czone", "period", "sex", "exposure", "change", "base")], 4),
digits = 2, row.names = FALSE)| czone | period | sex | exposure | change | base |
|---|---|---|---|---|---|
| 100 | 1990-2000 | Women | 5.29 | -3.89 | 14.52 |
| 100 | 1990-2000 | Men | 5.29 | -3.92 | 26.79 |
| 100 | 2000-2007 | Women | 6.62 | -4.14 | 10.64 |
| 100 | 2000-2007 | Men | 6.62 | -5.03 | 22.88 |
change is the change in the group’s factory employment, in percentage points. base is the share of the zone’s employment the group held in factories at the start of the period.
The two groups started from very different places. In 1990, men’s factory employment was about twice women’s: roughly 16% against 8%. A loss of three points means much more to a group that started at 8 than to one that started at 16. We therefore measure change in two ways: in percentage points, and as a share of each group’s own starting level. We leave out zones where almost no one in a group worked in factories at the start, a few dozen and nearly all in the women’s data, because dividing by a tiny base produces meaningless percentages.
Figure 1 shows where women worked in factories in 1990. They were concentrated in the Southeast, in North Carolina, Tennessee, South Carolina and Georgia, the centre of the American textile and clothing industry.
ggplot(zones) +
geom_sf(aes(fill = mfg_women_start), color = NA) +
scale_fill_viridis_c(option = "rocket", direction = -1,
name = "% of women\nin factories") +
labs(title = "Where women worked in factories, 1990") +
theme_void()Figure 2 shows where Chinese competition was strongest in the 1990s. The two maps overlap, most clearly in Tennessee and North Carolina, but they are not the same map. Georgia and South Carolina had many women in factories yet faced only average competition. Kentucky and Missouri faced heavy competition with far fewer women in factories. Across all zones, the correlation between the two is 0.40.
ggplot(zones) +
geom_sf(aes(fill = exposure), color = NA) +
scale_fill_viridis_c(option = "magma", direction = -1, trans = "sqrt",
name = "Import\ncompetition") +
labs(title = "Where Chinese import competition was strongest, 1990–2000") +
theme_void()Figure 3 shows where women’s factory employment fell. The largest declines were in North Carolina, Georgia, South Carolina and Tennessee. The losses followed where women worked, including in the two states where competition was only average.
ggplot(zones) +
geom_sf(aes(fill = mfg_change_women), color = NA) +
scale_fill_viridis_c(option = "viridis",
name = "Change in\nwomen's factory\nemployment") +
labs(title = "Change in women's factory employment, 1990–2000") +
theme_void()Figure 4 compares the two groups for 1990–2000. Each dot is a commuting zone: further right means more Chinese competition, and lower means a larger fall in factory employment.
first <- jobs[jobs$period == "1990-2000", ]
ggplot(first, aes(x = exposure, y = change, color = sex)) +
geom_point(alpha = 0.3, size = 1) +
geom_smooth(method = "lm") +
scale_color_manual(values = c(Women = "#b44527", Men = "#0f6f96"), name = NULL) +
labs(title = "In the 1990s, the line for women falls much faster",
x = "Import competition from China (thousand USD per worker)",
y = "Change in factory employment (percentage points)") +
theme_minimal()The lines differ clearly. For women, each additional thousand dollars of competition per worker went with about 0.22 percentage points less factory employment. For men the line is almost flat. The confidence bands overlap where competition was low, which describes most zones, and separate as it rises. In the 1990s, then, Chinese competition was associated with falling factory employment for women but not for men.
If the shock widened to new industries after 2001, men’s losses should also begin to track import competition. Figure 5 repeats the comparison for both periods.
ggplot(jobs, aes(x = exposure, y = change, color = sex)) +
geom_point(alpha = 0.25, size = 0.8) +
geom_smooth(method = "lm") +
scale_color_manual(values = c(Women = "#b44527", Men = "#0f6f96"), name = NULL) +
facet_wrap(~ period) +
labs(title = "Counting percentage points",
subtitle = "In the 1990s only women's line falls; after 2001 both do",
x = "Import competition from China (thousand USD per worker)",
y = "Change in factory employment (percentage points)") +
theme_minimal()They do. In 2000–2007 both lines slope steeply downward, and men’s slightly more: about 0.43 points per thousand dollars, against 0.33 for women. Counted in percentage points, the shock appears to begin with women and spread to men.
Percentage points ignore the difference in starting levels. Figure 6 redraws the same data with each change expressed as a share of the group’s own factory employment at the start.
ggplot(jobs, aes(x = exposure, y = rel_change, color = sex)) +
geom_point(alpha = 0.25, size = 0.8) +
geom_smooth(method = "lm") +
scale_color_manual(values = c(Women = "#b44527", Men = "#0f6f96"), name = NULL) +
facet_wrap(~ period) +
labs(title = "Counting how much of each group's own factory work disappeared",
subtitle = "After 2001 the lines are parallel, but women's sits lower throughout",
x = "Import competition from China (thousand USD per worker)",
y = "Change as a share of where each group started (%)") +
theme_minimal()The sequence survives the change of measure. After 2001 the two slopes are identical: about 1.7% of the starting level lost per thousand dollars of competition. What changes is the answer to who lost more. Women’s line sits below men’s in both periods. Between 2000 and 2007, women lost 29% of their starting factory employment on average and men 14%. That gap is as wide in zones with almost no Chinese competition as in the most exposed ones.
Three conclusions follow.
First, Chinese competition and women’s factory work overlapped geographically, above all in Tennessee and North Carolina. The overlap is partial: women also lost heavily in textile states that faced only average competition.
Second, the link between imports and job losses reached women first. In the 1990s it shows up clearly only for women. After 2001 it is as strong for men, whichever way the change is measured.
Third, who lost more depends on the denominator. In percentage points of local employment, men lost slightly more after 2001: 2.6 points against 2.3. Measured against what each group had, women lost twice as much. The first measure describes places and the second describes people, and both are legitimate. But the second also shows that women’s larger relative losses appear even where Chinese competition was minimal. This data therefore cannot attribute that gap to the China shock.
The maps did work the graphs could not. The scatterplots show that competition and job loss move together. Only the maps show that they met in the textile belt, which is what made the industry explanation worth considering.
Zones with more import competition also lost more factory employment, but that is a correlation. Something else could have driven both, and establishing cause would need methods we have not used.
The industry explanation fits the timing and the maps, but we did not test it. Checking it would require import data broken down by industry, which exists and which we did not use.
We count shares of employment, not people. A falling share can mean that factory jobs disappeared or that other employment grew around them. And two periods are two snapshots: they cannot show whether change was gradual or sudden.
| What we did | AI? | What we asked | How we checked |
|---|---|---|---|
| Fixing a blank map | Yes | Why nothing appeared when we drew it | Compared with the class example, re-ran it |
| Choosing map colours | Yes | Which colour scale suits skewed numbers | Tried three and chose by looking |
| Deciding the question | No | — | — |
| Writing the interpretation | No | — | — |
| The WTO date | Yes | When China joined the WTO | Checked the WTO website: December 2001 |
The prompt that mattered most was this one:
“I have a table called
jobswith one row per zone, per period, per sex. I want one scatterplot per period, with men and women in different colours. Show me the ggplot code and explain each line.”
Its first answer put both periods into a single panel, where the points overlapped and no pattern was visible. Adding facet_wrap(~ period) split them. That is when we could see the two lines converge, which set up the second half of this report.
Autor, D. H., Dorn, D., & Hanson, G. H. (2013). The China Syndrome: Local Labor Market Effects of Import Competition in the United States. American Economic Review, 103(6), 2121–2168.