You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3.0 KiB

---
output: rmarkdown::github_document
editor_options:
chunk_output_type: console
---
```{r pkg-knitr-opts, include=FALSE}
knitr::opts_chunk$set(
collapse = TRUE, fig.retina = 2, message = FALSE, warning = FALSE
)
options(width=120)
```

# loweslocations

This past week [Lowe's told their assemblers they were all out of a job](https://www.wsj.com/articles/lowes-lays-off-thousands-of-store-workers-11564680676). This decision impacts ~1-3 (sometimes more depending on the store) workers per [Lowe's store](https://www.lowes.com/Lowes-Stores) and Lowe's assemblers used to make between ~\$13.00 & \$18.00 USD/hour.

The `data` directory contains [`lowes-stores-geo.csv.gz`](data/lowes-stores-geo.csv.gz) which is lovingly hand-crafted transcription of all the locations listed at <https://www.lowes.com/Lowes-Stores>. The addresses have been geolocated (using [{rgeocodio}](https://git.rud.is/hrbrmstr/rgeocodio)) and contain:

- store name
- store published address
- store geocoded legit address
- store phone #
- county
- city
- state
- longitude
- latitude

which should be sufficient to enable data journalists to cross reference with census/economic data to facilitate potential regional impact reporting.

## Some Summary Info

```{r libs}
library(sf)
library(albersusa)
library(hrbrthemes)
library(tidyverse)
```

```{r data}
cols(
o_addr = col_character(),
fmt_addr = col_character(),
phone = col_character(),
city = col_character(),
county = col_character(),
state = col_character(),
lat = col_double(),
lng = col_double()
) -> lowes_cols

lowes <- read_csv(here::here("data/lowes-stores-geo.csv.gz"), col_types = lowes_cols)
```

```{r show-data}
head(lowes) %>%
knitr::kable("markdown")
```

```{r move-points}
filter(lowes, !(state %in% c("HI", "AK"))) %>%
select(lon=lng, lat) %>%
bind_rows(
filter(lowes, (state %in% c("HI", "AK"))) %>%
select(lng, lat) %>%
points_elided(.) %>%
select(lon=1, lat=2)
) %>%
st_as_sf(
coords = c("lon", "lat"),
crs = us_longlat_proj,
agr = "constant"
) -> pts
```

```{r points-map, fig.width=1000/72, fig.height=500/72, cache=TRUE}
ggplot() +
geom_sf(data = usa_sf("longlat"), fill = ft_cols$gray) +
geom_sf(data = pts, size = 0.5, alpha = 1/2, color = ft_cols$yellow) +
coord_sf(crs = us_laea_proj, datum = NA) +
labs(
x = NULL, y = NULL,
title = "Lowe's Locations"
) +
theme_ft_rc(grid="") +
theme(axis.text = element_blank())
```

```{r city-sum}
count(lowes, state, sort=TRUE) %>%
top_n(10) %>%
knitr::kable()
```

```{r county-sum}
count(lowes, county, state, sort=TRUE) %>%
top_n(10) %>%
knitr::kable()
```

Assuming $17/hr (~35K/yr) and no same-store re-hiring, ~**`r scales::dollar(nrow(lowes) * 35380)`** annual wages decrease across the whole list and for the top 10 counties:

```{r sal-sum}
count(lowes, county, state, sort=TRUE) %>%
mutate(wages_lost = scales::dollar(n * 35380)) %>%
top_n(10, wt = n) %>%
knitr::kable(align = "llrr")
```