Skip to content

Instantly share code, notes, and snippets.

View gulinan's full-sized avatar

Gül İnan gulinan

View GitHub Profile
library(tidycensus)
library(tigris)
library(ggiraph)
library(tidyverse)
us_median_age <- get_acs(
geography = "state",
variables = "B01002_001",
year = 2019,
survey = "acs5",
@benmarwick
benmarwick / tweet-edits-to-archaeology-articles.R
Last active April 3, 2023 16:35
Using R with wikipedia for various things
# get recent changes from wikipedia
library(rvest)
n_changes <- 5000
recent_changes_url <- paste0("https://en.wikipedia.org/w/index.php?title=Special:RecentChanges&limit=", n_changes , "&days=1")
# connect to website
html <- read_html(recent_changes_url)