tidyverse / tidyr

Tidy Messy Data
https://tidyr.tidyverse.org/
Other
1.39k stars 418 forks source link

Add dataset with some extraction challenges #1401

Open hadley opened 2 years ago

hadley commented 2 years ago

Ideas:

hadley commented 2 years ago
# https://twitter.com/buddyherms/status/1576966150680121344
vt_census <- tidycensus::get_decennial(
  geography = "block",
  state = "VT",
  county = "Washington",
  variables = "P1_001N",
  year = 2020
  )

vt_census |> 
  tidyr::separate(
    GEOID,
    into = c("state", "county", "tract", "block"),
    sep = c(2, 5, 11, 15)
    )
hadley commented 1 year ago

See code in https://gist.github.com/hadley/61f0bcaf79c695eca46c06be55ffad69