Febuary 5th Pre-class assignment

Author

Sabirin Muuse

Pre-Class Assginment Feb 5

library(ggplot2)

Choosing variables

Here are all the colomuns in the Midwest library, I will use the popwhite and popblack variables to make my scatterplot.

head(midwest)
# A tibble: 6 × 28
    PID county   state  area poptotal popdensity popwhite popblack popamerindian
  <int> <chr>    <chr> <dbl>    <int>      <dbl>    <int>    <int>         <int>
1   561 ADAMS    IL    0.052    66090      1271.    63917     1702            98
2   562 ALEXAND… IL    0.014    10626       759      7054     3496            19
3   563 BOND     IL    0.022    14991       681.    14477      429            35
4   564 BOONE    IL    0.017    30806      1812.    29344      127            46
5   565 BROWN    IL    0.018     5836       324.     5264      547            14
6   566 BUREAU   IL    0.05     35688       714.    35157       50            65
# ℹ 19 more variables: popasian <int>, popother <int>, percwhite <dbl>,
#   percblack <dbl>, percamerindan <dbl>, percasian <dbl>, percother <dbl>,
#   popadults <int>, perchsd <dbl>, percollege <dbl>, percprof <dbl>,
#   poppovertyknown <int>, percpovertyknown <dbl>, percbelowpoverty <dbl>,
#   percchildbelowpovert <dbl>, percadultpoverty <dbl>,
#   percelderlypoverty <dbl>, inmetro <int>, category <chr>
ggplot(
  data = midwest, 
  aes(
    x = popwhite,
    y = popblack
  )
) +
  geom_point()