Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions data/curated/new_submission/cleaning.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Data read in from roundabouts package, cleaning removes strange tags, separates country, town, county, and state columns.
# Separates lat and long columns and fixes data types

roundabouts <- roundabouts::roundabouts

roundabouts_clean <- roundabouts |>
dplyr::mutate(address = stringr::str_remove(address, stringr::fixed("<![CDATA["))) |> # remove strange tags from address field
dplyr::mutate(address = stringr::str_remove(address, stringr::fixed("]]>"))) |>
dplyr::mutate(country = stringr::str_extract(address, "\\([^)]+\\)$"), # extract string within last bracket
country = stringr::str_remove_all(country, "[\\(\\)]"), # remove brackets
address2 = stringr::str_remove(address, "\\s*\\([^)]+\\)$")) |> # remove last () from original address
tidyr::separate(address2, into = c("town_city", "county_area", "state_region"), sep = ",") |> # separate address by comma
tidyr::separate(coordinates, into = c("lat", "long"), sep = ",") |> # separate latitude longitude by comma
dplyr::select(name, address, town_city, county_area, state_region, country, lat, long, everything()) |> # reorder variables
dplyr::mutate(lat = as.numeric(lat), long = as.numeric(long), # fix data types
year_completed = as.integer(year_completed),
approaches = as.integer( approaches),
driveways = as.integer(driveways))
11 changes: 11 additions & 0 deletions data/curated/new_submission/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This week we are exploring data from the [`roundabouts` package](https://github.com/EmilHvitfeldt/roundabouts) by Emil Hvitfeldt.
The roundabouts package provides a R friendly way to access the roundabouts database which is compiled by [Kittelson & Associates](https://roundabouts.kittelson.com/)
and contains information about the location, configuration, and construction of roundabout intersections around the world.

> “It started with an inventory of U.S. roundabouts that identified 150 sites,” Lee says. “One thing led to another, and now we’re at
over 20,000 records in the database.”

- How has roundabout construction evolved over time? Are certain regions adopting them faster than others?
- What types of intersections are most commonly converted to roundabouts?
- Where are the roundabouts with the most unusual configurations (highest number of approaches/driveways)?

16 changes: 16 additions & 0 deletions data/curated/new_submission/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: "Roundabouts across the world"
article:
title: "How Many Roundabouts Are in the United States?"
url: "https://www.kittelson.com/ideas/how-many-roundabouts-are-in-the-united-states/"
data_source:
title: "roundabouts package"
url: "https://github.com/EmilHvitfeldt/roundabouts"
images:
# Please include at least one image, and up to three images
- file: "roundabouts_hex.png"
alt: >
Hexagonal illustration of a roundabout with three cars circling around a central island. The circular island features four green trees or bushes arranged in a clover-like pattern. The cars include an orange car, a red car, and a yellow car. Gray roads with white dashed lane markings connect to the roundabout from multiple directions, surrounded by green grass areas. The word 'roundabouts' appears in yellow text on the road.
credit:
post: "Jen Richmond"
github: "@jenrichmond"
bluesky: "@jenrichmondPhD"
Loading
Loading