class: inverse, bottom background-image: url(https://images.unsplash.com/photo-1559827260-dc66d52bef19?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80) background-size: cover # .Large[Data Science for IR: Introductions] ## .small[Korbel School of International Studies] ## .small[bit.ly/spring-2026-du] #### .tiny[Dr. Evangeline Reynolds | 2026-03-31 | DU, Image credit: Silas Baisch, Upsplash] ??? Title slide # Hi! ``` r us_states_ref <- usmapdata::us_map() |> rename(geometry = geom, state_name = full, state_abbr = abbr) |> select(state_name, everything()) library(ggregions) geom_us_state <- write_geom_region_locale(us_states_ref) stamp_us_state <- write_stamp_region_locale(us_states_ref) geom_us_state_text <- write_geom_region_text_locale(us_states_ref) stamp_us_states_text <- write_stamp_region_text_locale(us_states_ref) ``` --- count: false .panel1-us-auto[ ``` r *tribble(~state, ~span, * "Illinois", .6, * "Virginia", .1 , * "Colorado", .4, * "New York", .15) ``` ] .panel2-us-auto[ ``` # A tibble: 4 × 2 state span <chr> <dbl> 1 Illinois 0.6 2 Virginia 0.1 3 Colorado 0.4 4 New York 0.15 ``` ] --- count: false .panel1-us-auto[ ``` r tribble(~state, ~span, "Illinois", .6, "Virginia", .1 , "Colorado", .4, "New York", .15) |> * ggplot() ``` ] .panel2-us-auto[ <!-- --> ] --- count: false .panel1-us-auto[ ``` r tribble(~state, ~span, "Illinois", .6, "Virginia", .1 , "Colorado", .4, "New York", .15) |> ggplot() + * aes(state_name = state, * fill = span) ``` ] .panel2-us-auto[ <!-- --> ] --- count: false .panel1-us-auto[ ``` r tribble(~state, ~span, "Illinois", .6, "Virginia", .1 , "Colorado", .4, "New York", .15) |> ggplot() + aes(state_name = state, fill = span) + * stamp_us_state() ``` ] .panel2-us-auto[ <!-- --> ] --- count: false .panel1-us-auto[ ``` r tribble(~state, ~span, "Illinois", .6, "Virginia", .1 , "Colorado", .4, "New York", .15) |> ggplot() + aes(state_name = state, fill = span) + stamp_us_state() + * geom_us_state() ``` ] .panel2-us-auto[ <!-- --> ] --- count: false .panel1-us-auto[ ``` r tribble(~state, ~span, "Illinois", .6, "Virginia", .1 , "Colorado", .4, "New York", .15) |> ggplot() + aes(state_name = state, fill = span) + stamp_us_state() + geom_us_state() + * scale_fill_viridis_c() ``` ] .panel2-us-auto[ <!-- --> ] --- count: false .panel1-us-auto[ ``` r tribble(~state, ~span, "Illinois", .6, "Virginia", .1 , "Colorado", .4, "New York", .15) |> ggplot() + aes(state_name = state, fill = span) + stamp_us_state() + geom_us_state() + scale_fill_viridis_c() + * scale_fill_viridis_c(end = .8, * begin = .3) ``` ] .panel2-us-auto[ <!-- --> ] <style> .panel1-us-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-us-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-us-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> <!-- adjust font size in this css code chunk, currently 80 --> <style type="text/css"> .remark-code{line-height: 1.5; font-size: 80%} @media print { .has-continuation { display: block; } } code.r.hljs.remark-code{ position: relative; overflow-x: hidden; } code.r.hljs.remark-code:hover{ overflow-x:visible; width: 500px; border-style: solid; } </style>