Lecture 13
Cornell University
INFO 5001 - Fall 2024
October 10, 2024
readr::read_csv()
downloader
package or curl
manifestoR
manifestoR
.Rprofile
or .Renviron
Connecting to Manifesto Project DB API...
Connecting to Manifesto Project DB API... corpus version: 2024-1
# A tibble: 5,151 × 175
country countryname oecdmember eumember edate date party partyname
<dbl> <chr> <dbl> <dbl> <date> <dbl> <dbl> <chr>
1 11 Sweden 0 0 1944-09-17 194409 11220 Communist Pa…
2 11 Sweden 0 0 1944-09-17 194409 11320 Social Democ…
3 11 Sweden 0 0 1944-09-17 194409 11420 People’s Par…
4 11 Sweden 0 0 1944-09-17 194409 11620 Right Party
5 11 Sweden 0 0 1944-09-17 194409 11810 Agrarian Par…
6 11 Sweden 0 0 1948-09-19 194809 11220 Communist Pa…
7 11 Sweden 0 0 1948-09-19 194809 11320 Social Democ…
8 11 Sweden 0 0 1948-09-19 194809 11420 People’s Par…
9 11 Sweden 0 0 1948-09-19 194809 11620 Right Party
10 11 Sweden 0 0 1948-09-19 194809 11810 Agrarian Par…
# ℹ 5,141 more rows
# ℹ 167 more variables: partyabbrev <chr>, parfam <dbl>, candidatename <chr>,
# coderid <dbl>, manual <dbl>, coderyear <dbl>, testresult <dbl>,
# testeditsim <dbl>, pervote <dbl>, voteest <dbl>, presvote <dbl>,
# absseat <dbl>, totseats <dbl>, progtype <dbl>, datasetorigin <dbl>,
# corpusversion <chr>, total <dbl>, peruncod <dbl>, per101 <dbl>,
# per102 <dbl>, per103 <dbl>, per104 <dbl>, per105 <dbl>, per106 <dbl>, …
tidycensus
sf
geometryload_variables()
usa_inc <- get_acs(
geography = "state",
variables = c(medincome = "B19013_001"),
year = 2022
)
usa_inc
# A tibble: 52 × 5
GEOID NAME variable estimate moe
<chr> <chr> <chr> <dbl> <dbl>
1 01 Alabama medincome 59609 377
2 02 Alaska medincome 86370 1083
3 04 Arizona medincome 72581 450
4 05 Arkansas medincome 56335 422
5 06 California medincome 91905 277
6 08 Colorado medincome 87598 508
7 09 Connecticut medincome 90213 730
8 10 Delaware medincome 79325 1227
9 11 District of Columbia medincome 101722 1569
10 12 Florida medincome 67917 259
# ℹ 42 more rows
ae-11
ae-11
(repo name will be suffixed with your GitHub name).renv::restore()
to install the required packages, open the Quarto document in the repo, and follow along and complete the exercises..Rprofile
or .Renviron