class: center, middle, inverse, title-slide # Statistical Investigations Lab (SIL) --- count: false .panel1-my_cars-auto[ ```r *library(tidyverse) ``` ] .panel2-my_cars-auto[ ] --- count: false .panel1-my_cars-auto[ ```r library(tidyverse) *library(janitor) ``` ] .panel2-my_cars-auto[ ] --- count: false .panel1-my_cars-auto[ ```r library(tidyverse) library(janitor) *url <- "https://raw.githubusercontent.com/acammack1234/ma206/main/commander_community_ties.csv" ``` ] .panel2-my_cars-auto[ ] --- count: false .panel1-my_cars-auto[ ```r library(tidyverse) library(janitor) url <- "https://raw.githubusercontent.com/acammack1234/ma206/main/commander_community_ties.csv" *read_csv(file = url, * guess_max = 10000) ``` ] .panel2-my_cars-auto[ ``` # A tibble: 95 × 137 DEPARTMENT NAME POPULATION LEG2011ID LEG2011TUR RDRLEG2011 PDCILEG11 <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> 1 Danané "Danan\xe9" 104672 193 45.4 26.2 3.97 2 Man "Podiagouin\… 21694 196 41.5 14.2 10.8 3 Danané "Mahapleu" 44368 194 39.8 11.5 NA 4 Vavoua "K\xe9tro-Ba… 24934 105 34.1 51.2 45.6 5 Vavoua "Vavoua" 134651 105 34.1 51.2 45.6 6 Man "Fagnampleu" 2967 196 41.5 14.2 10.8 7 Facobly "Facobly" 22407 91 0 0 0 8 Man "Man" 188704 197 51.1 53 3.18 9 Botro "Botro" 20337 58 64.2 NA 11.2 10 Séguéla "S\xe9gu\xe9… 63774 203 45.3 93.7 6.27 # … with 85 more rows, and 130 more variables: LEG2011WIN <chr>, # N2011WINPC <dbl>, MUN2013ID <dbl>, MUN2013TUR <dbl>, RDRMUN2013 <dbl>, # PDCIMUN13 <dbl>, MUN2013WIN <chr>, N2013WINPC <dbl>, # Ouattara2010votes <dbl>, total2010votes <dbl>, Ouattara2010vs <dbl>, # Primary.Ethnicity <chr>, Mining.EconActivity <chr>, PavedRoad.Access <dbl>, # Prefecture <chr>, Mairie <chr>, Gendarmerie.Police.Poste <chr>, # HealthClinic <chr>, Secondary.School <chr>, Bank <chr>, … ``` ] --- count: false .panel1-my_cars-auto[ ```r library(tidyverse) library(janitor) url <- "https://raw.githubusercontent.com/acammack1234/ma206/main/commander_community_ties.csv" read_csv(file = url, guess_max = 10000) %>% * clean_names() ``` ] .panel2-my_cars-auto[ ``` # A tibble: 95 × 137 department name population leg2011id leg2011tur rdrleg2011 pdcileg11 <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> 1 Danané "Danan\xe9" 104672 193 45.4 26.2 3.97 2 Man "Podiagouin\… 21694 196 41.5 14.2 10.8 3 Danané "Mahapleu" 44368 194 39.8 11.5 NA 4 Vavoua "K\xe9tro-Ba… 24934 105 34.1 51.2 45.6 5 Vavoua "Vavoua" 134651 105 34.1 51.2 45.6 6 Man "Fagnampleu" 2967 196 41.5 14.2 10.8 7 Facobly "Facobly" 22407 91 0 0 0 8 Man "Man" 188704 197 51.1 53 3.18 9 Botro "Botro" 20337 58 64.2 NA 11.2 10 Séguéla "S\xe9gu\xe9… 63774 203 45.3 93.7 6.27 # … with 85 more rows, and 130 more variables: leg2011win <chr>, # n2011winpc <dbl>, mun2013id <dbl>, mun2013tur <dbl>, rdrmun2013 <dbl>, # pdcimun13 <dbl>, mun2013win <chr>, n2013winpc <dbl>, # ouattara2010votes <dbl>, total2010votes <dbl>, ouattara2010vs <dbl>, # primary_ethnicity <chr>, mining_econ_activity <chr>, # paved_road_access <dbl>, prefecture <chr>, mairie <chr>, # gendarmerie_police_poste <chr>, health_clinic <chr>, … ``` ] --- count: false .panel1-my_cars-auto[ ```r library(tidyverse) library(janitor) url <- "https://raw.githubusercontent.com/acammack1234/ma206/main/commander_community_ties.csv" read_csv(file = url, guess_max = 10000) %>% clean_names() %>% * drop_na(postwarinfluence_index2, * fn_governance_index2, * commanderlocal_dummy) ``` ] .panel2-my_cars-auto[ ``` # A tibble: 93 × 137 department name population leg2011id leg2011tur rdrleg2011 pdcileg11 <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> 1 Danané "Danan\xe9" 104672 193 45.4 26.2 3.97 2 Man "Podiagouin\… 21694 196 41.5 14.2 10.8 3 Danané "Mahapleu" 44368 194 39.8 11.5 NA 4 Vavoua "K\xe9tro-Ba… 24934 105 34.1 51.2 45.6 5 Vavoua "Vavoua" 134651 105 34.1 51.2 45.6 6 Man "Fagnampleu" 2967 196 41.5 14.2 10.8 7 Facobly "Facobly" 22407 91 0 0 0 8 Man "Man" 188704 197 51.1 53 3.18 9 Botro "Botro" 20337 58 64.2 NA 11.2 10 Séguéla "S\xe9gu\xe9… 63774 203 45.3 93.7 6.27 # … with 83 more rows, and 130 more variables: leg2011win <chr>, # n2011winpc <dbl>, mun2013id <dbl>, mun2013tur <dbl>, rdrmun2013 <dbl>, # pdcimun13 <dbl>, mun2013win <chr>, n2013winpc <dbl>, # ouattara2010votes <dbl>, total2010votes <dbl>, ouattara2010vs <dbl>, # primary_ethnicity <chr>, mining_econ_activity <chr>, # paved_road_access <dbl>, prefecture <chr>, mairie <chr>, # gendarmerie_police_poste <chr>, health_clinic <chr>, … ``` ] --- count: false .panel1-my_cars-auto[ ```r library(tidyverse) library(janitor) url <- "https://raw.githubusercontent.com/acammack1234/ma206/main/commander_community_ties.csv" read_csv(file = url, guess_max = 10000) %>% clean_names() %>% drop_na(postwarinfluence_index2, fn_governance_index2, commanderlocal_dummy) %>% * select(department, * name, * postwarinfluence_index2, * fn_governance_index2, * commanderlocal_dummy, * fn_organizedmeetings_dummy, * postwarinfluence_index2, * ethnicity_northern) ``` ] .panel2-my_cars-auto[ ``` # A tibble: 93 × 7 department name postwarinfluenc… fn_governance_i… commanderlocal_… <chr> <chr> <dbl> <dbl> <dbl> 1 Danané "Danan\xe9" 4 2 0 2 Man "Podiagouin\xe… 0 2 0 3 Danané "Mahapleu" 2 2 0 4 Vavoua "K\xe9tro-Bass… 1 2 0 5 Vavoua "Vavoua" 4 5 0 6 Man "Fagnampleu" 0 2 0 7 Facobly "Facobly" 2 2 1 8 Man "Man" 4 6 0 9 Botro "Botro" 1 4 0 10 Séguéla "S\xe9gu\xe9la" 4 4 0 # … with 83 more rows, and 2 more variables: fn_organizedmeetings_dummy <dbl>, # ethnicity_northern <dbl> ``` ] --- count: false .panel1-my_cars-auto[ ```r library(tidyverse) library(janitor) url <- "https://raw.githubusercontent.com/acammack1234/ma206/main/commander_community_ties.csv" read_csv(file = url, guess_max = 10000) %>% clean_names() %>% drop_na(postwarinfluence_index2, fn_governance_index2, commanderlocal_dummy) %>% select(department, name, postwarinfluence_index2, fn_governance_index2, commanderlocal_dummy, fn_organizedmeetings_dummy, postwarinfluence_index2, ethnicity_northern) -> *df ``` ] .panel2-my_cars-auto[ ] <style> .panel1-my_cars-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-my_cars-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-my_cars-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- # preview ```r df %>% skimr::skim() ``` ``` Skim summary statistics n obs: 93 n variables: 7 group variables: ── Variable type:character ───────────────────────────────────────────────────── variable missing complete n min max empty n_unique department 0 93 93 3 15 0 32 name 0 93 93 3 26 0 93 ── Variable type:numeric ─────────────────────────────────────────────────────── variable missing complete n mean sd p0 p25 p50 p75 p100 commanderlocal_dummy 0 93 93 0.12 0.32 0 0 0 0 1 ethnicity_northern 0 93 93 0.58 0.5 0 0 1 1 1 fn_governance_index2 0 93 93 2.23 1.23 0 2 2 3 6 fn_organizedmeetings_dummy 0 93 93 0.59 0.49 0 0 1 1 1 postwarinfluence_index2 0 93 93 1.57 1.35 0 0 1 3 4 hist ▇▁▁▁▁▁▁▁ ▆▁▁▁▁▁▁▇ ▂▂▇▃▁▂▁▁ ▆▁▁▁▁▁▁▇ ▇▆▁▆▁▅▁▃ ``` <!-- adjust font size in this css code chunk, currently 80 --> <style type="text/css"> .remark-code{line-height: 1.5; font-size: 60%} @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>