project-wondrous-starmie

Proposal

library(tidyverse)
library(skimr)
library("haven")   

Data 1

Introduction and data

  • Identify the source of the data.

    • NYTimes
  • State when and how it was originally collected (by the original data curator, not necessarily how you found the data).

    • Each participant was asked: How often do you wear a mask in public when you expect to be within six feet of another person?

    • July 2 - July 14, 2020

  • Write a brief description of the observations.

    • COUNTYFP: county FIPS code

    • NEVER: Share of people who responded never to the question

    • RARELY: Share of people who responded never to the question

    • SOMETIMES: Share of people who responded never to the question

    • FREQUENTLY: Share of people who responded never to the question

    • ALWAYS: Share of people who responded never to the question

Research question

  • A well formulated research question. (You may include more than one research question if you want to receive feedback on different ideas for your project. However, one per data set is required.)
    • Are responses of counties affected by whether the county belongs to a “blue” or “red” state?
  • A description of the research topic along with a concise statement of your hypotheses on this topic.
    • Our group is researching practices with mask wearing at the start of the COVID pandemic (2020). We wanted to study whether or not counties belonging to either a red or blue state would affect how likely people would wear a mask. I hypothesize that there would be no notable difference - this was near the beginning of the covid pandemic, before it was politicized. Therefore, I do not believe that belonging to a red or blue state would particularly affect mask usage rates.
  • Identify the types of variables in your research question. Categorical? Quantitative?
    • COUNTYFP: Categorical
    • NEVER: Quantitative
    • RARELY: Quantitative
    • SOMETIMES: Quantitative
    • FREQUENTLY: Quantitative
    • ALWAYS: Quantitative

Glimpse of data

mask_use_by_county <- read_csv("data/mask-use-by-county.csv") 
Rows: 3142 Columns: 6
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (1): COUNTYFP
dbl (5): NEVER, RARELY, SOMETIMES, FREQUENTLY, ALWAYS

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
skimr::skim(mask_use_by_county)
Data summary
Name mask_use_by_county
Number of rows 3142
Number of columns 6
_______________________
Column type frequency:
character 1
numeric 5
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
COUNTYFP 0 1 5 5 0 3142 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
NEVER 0 1 0.08 0.06 0.00 0.03 0.07 0.11 0.43 ▇▃▁▁▁
RARELY 0 1 0.08 0.06 0.00 0.04 0.07 0.12 0.38 ▇▆▂▁▁
SOMETIMES 0 1 0.12 0.06 0.00 0.08 0.12 0.16 0.42 ▅▇▂▁▁
FREQUENTLY 0 1 0.21 0.06 0.03 0.16 0.20 0.25 0.55 ▂▇▃▁▁
ALWAYS 0 1 0.51 0.15 0.12 0.39 0.50 0.61 0.89 ▁▆▇▅▂

Data 2

Introduction and data

  • Identify the source of the data.

The Pew Research Center

  • State when and how it was originally collected (by the original data curator, not necessarily how you found the data).

    The sample consisted of the American Trends Panel (ATP). The ATP is a national, probability-based online panel of adults living in households in the United States. In January of 2019, a questionnaire was mailed to all ATP panelists (5,817 people) that shared their address. All panelists with an email address received an email invitation and up to four email reminders if they did not respond to the survey. All ATP panelists that consented to SMS messages received an SMS invitation and up to four SMS reminders.

  • Write a brief description of the observations.

    Each observation represents an American. ATP panelists were recruited from three large national, overlapping, dual-frame land-line and cellphone random-digit-dial (RDD) surveys and one national address-based sample (ABS) survey conducted for the Pew Research Center.

Research question

  • A well formulated research question. (You may include more than one research question if you want to receive feedback on different ideas for your project. However, one per data set is required.)

What factors affect American’s trust in scientific experts the most?

  • A description of the research topic along with a concise statement of your hypotheses on this topic.

In an era when science and society often appear to collide, it is important to gage the public’s confidence in our scientists. The area of science, political party, educational background, and religious background of an American are all examples of factors that can affect their trust in scientific experts. We hypothesize that the educational background and political party of Americans has the greatest factor in how much they trust scientific experts.

  • Identify the types of variables in your research question. Categorical? Quantitative?

The variables in my research question are categorical.

Glimpse of data

# add code here
            
library("haven")
library(readr)
data2 <- read_sav("data/ATP W42.sav") 
csv2 <- write_csv(x=data2, file="from_sav_data.csv")
skimr::skim(csv2)
Data summary
Name csv2
Number of rows 4464
Number of columns 195
_______________________
Column type frequency:
numeric 195
________________________
Group variables None

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
QKEY 0 1.00 1.601233e+11 8.164814e+10 100363.00 2.015016e+11 2.01801e+11 2.018011e+11 2.018012e+11 ▂▁▁▁▇
Device_Type_W42 0 1.00 1.830000e+00 9.400000e-01 1.00 1.000000e+00 1.00000e+00 3.000000e+00 3.000000e+00 ▇▁▂▁▆
LANG_W42 0 1.00 9.020000e+00 1.400000e-01 9.00 9.000000e+00 9.00000e+00 9.000000e+00 1.000000e+01 ▇▁▁▁▁
FORM_W42 0 1.00 1.500000e+00 5.000000e-01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 2.000000e+00 ▇▁▁▁▇
PAST_W42 2238 0.50 1.380000e+00 3.640000e+00 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
FUTURE_W42 2238 0.50 1.660000e+00 6.240000e+00 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
DOV_FUTURE_W42 2238 0.50 1.500000e+00 5.000000e-01 1.00 1.000000e+00 1.50000e+00 2.000000e+00 2.000000e+00 ▇▁▁▁▇
FUTURE_BOE_OE1_W42 3351 0.25 4.128000e+01 7.856000e+01 10.00 1.200000e+01 1.40000e+01 6.100000e+01 9.970000e+02 ▇▁▁▁▁
FUTURE_BOE_OE2_W42 4061 0.09 3.375000e+01 2.267000e+01 10.00 1.400000e+01 2.50000e+01 4.500000e+01 1.020000e+02 ▇▅▂▁▁
FUTURE_BOE_OE3_W42 4289 0.04 4.654000e+01 7.655000e+01 10.00 2.000000e+01 4.00000e+01 5.000000e+01 9.970000e+02 ▇▁▁▁▁
FUTURE_WOE_OE1_W42 3351 0.25 7.873000e+01 1.229500e+02 10.00 2.300000e+01 7.30000e+01 9.900000e+01 9.970000e+02 ▇▁▁▁▁
FUTURE_WOE_OE2_W42 4283 0.04 4.207000e+01 2.884000e+01 10.00 2.000000e+01 2.80000e+01 5.100000e+01 1.060000e+02 ▇▃▂▂▂
FUTURE_WOE_OE3_W42 4419 0.01 4.291000e+01 2.983000e+01 10.00 2.000000e+01 3.10000e+01 5.100000e+01 1.050000e+02 ▇▃▂▁▂
SC1_W42 2226 0.50 1.750000e+00 5.110000e+00 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
SC1POS_W42_OE1_W42 2811 0.37 3.538000e+01 3.134000e+01 10.00 1.300000e+01 2.00000e+01 5.200000e+01 1.040000e+02 ▇▂▁▁▂
SC1POS_W42_OE2_W42 3657 0.18 4.012000e+01 2.630000e+01 10.00 1.300000e+01 3.20000e+01 5.600000e+01 1.060000e+02 ▇▇▅▃▂
SC1POS_W42_OE3_W42 4053 0.09 4.591000e+01 2.616000e+01 10.00 2.100000e+01 4.10000e+01 6.100000e+01 1.030000e+02 ▇▇▆▅▂
SC1NEG_W42_OE1_W42 3927 0.12 9.749000e+01 1.156200e+02 10.00 6.700000e+01 9.90000e+01 1.080000e+02 9.990000e+02 ▇▁▁▁▁
SC1NEG_W42_OE2_W42 4402 0.01 7.235000e+01 3.844000e+01 10.00 4.500000e+01 6.85000e+01 1.090000e+02 1.280000e+02 ▅▅▂▂▇
SC1NEG_W42_OE3_W42 4449 0.00 7.680000e+01 3.354000e+01 13.00 5.850000e+01 7.10000e+01 1.110000e+02 1.240000e+02 ▃▃▇▂▇
CONFa_W42 0 1.00 3.020000e+00 5.040000e+00 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
CONFb_W42 0 1.00 2.800000e+00 4.420000e+00 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
CONFc_W42 0 1.00 2.110000e+00 5.290000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
CONFd_F1_W42 2238 0.50 1.940000e+00 4.170000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
CONFd_F2_W42 2226 0.50 2.080000e+00 5.480000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
CONFe_W42 0 1.00 2.710000e+00 5.470000e+00 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
CONFf_W42 0 1.00 2.510000e+00 6.830000e+00 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
CONFg_W42 0 1.00 2.800000e+00 4.620000e+00 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
POLICY1_W42 0 1.00 2.540000e+00 1.059000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
POLICY2_W42 0 1.00 2.760000e+00 1.124000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
POLICY3_W42 0 1.00 2.570000e+00 7.300000e+00 1.00 1.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ1_F1A_W42 2238 0.50 2.040000e+00 7.190000e+00 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ2_F1A_W42 2238 0.50 2.280000e+00 5.460000e+00 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Aa_W42 2567 0.42 2.490000e+00 8.920000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Ab_W42 2567 0.42 2.890000e+00 1.156000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Ac_W42 2567 0.42 2.800000e+00 9.940000e+00 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Ad_W42 2567 0.42 1.600000e+00 6.740000e+00 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Aa_W42 2238 0.50 2.680000e+00 1.008000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Ab_W42 2238 0.50 2.760000e+00 9.640000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Ac_W42 2238 0.50 3.490000e+00 1.081000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Ad_W42 2238 0.50 3.840000e+00 1.240000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Ae_W42 2238 0.50 2.710000e+00 9.430000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ5_F1A_W42 2238 0.50 3.780000e+00 1.116000e+01 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ6_F1A_W42 2238 0.50 2.630000e+00 1.089000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ7_F1A_W42 2238 0.50 4.500000e+00 1.741000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ8_F1A_W42 2238 0.50 3.400000e+00 1.001000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ1_F1B_W42 2238 0.50 2.320000e+00 7.740000e+00 1.00 1.000000e+00 1.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ2_F1B_W42 2238 0.50 2.410000e+00 6.180000e+00 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Ba_W42 2645 0.41 2.820000e+00 1.015000e+01 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Bb_W42 2645 0.41 2.830000e+00 1.137000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Bc_W42 2645 0.41 3.310000e+00 1.197000e+01 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Bd_W42 2645 0.41 1.770000e+00 7.930000e+00 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Ba_W42 2238 0.50 3.320000e+00 1.246000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Bb_W42 2238 0.50 3.310000e+00 1.194000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Bc_W42 2238 0.50 3.900000e+00 1.256000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Bd_W42 2238 0.50 4.040000e+00 1.335000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Be_W42 2238 0.50 3.250000e+00 1.177000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ5_F1B_W42 2238 0.50 3.910000e+00 1.133000e+01 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ6_F1B_W42 2238 0.50 3.120000e+00 1.282000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ7_F1B_W42 2238 0.50 4.580000e+00 1.752000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ8_F1B_W42 2238 0.50 4.180000e+00 1.269000e+01 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ1_F1C_W42 2238 0.50 2.260000e+00 6.240000e+00 1.00 1.000000e+00 1.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ2_F1C_W42 2238 0.50 2.440000e+00 5.450000e+00 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Ca_W42 2772 0.38 2.470000e+00 8.170000e+00 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Cb_W42 2772 0.38 2.130000e+00 7.490000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Cc_W42 2772 0.38 2.700000e+00 9.120000e+00 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ3_F1Cd_W42 2772 0.38 1.760000e+00 7.510000e+00 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Ca_W42 2238 0.50 4.150000e+00 1.483000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Cb_W42 2238 0.50 3.870000e+00 1.353000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Cc_W42 2238 0.50 4.590000e+00 1.448000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Cd_W42 2238 0.50 4.580000e+00 1.463000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ4_F1Ce_W42 2238 0.50 3.630000e+00 1.293000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ5_F1C_W42 2238 0.50 4.300000e+00 1.284000e+01 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ6_F1C_W42 2238 0.50 3.310000e+00 1.344000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ7_F1C_W42 2238 0.50 5.520000e+00 1.986000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
RQ8_F1C_W42 2238 0.50 4.420000e+00 1.330000e+01 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ1_F2A_W42 2226 0.50 1.650000e+00 4.670000e+00 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ2_F2A_W42 2226 0.50 1.860000e+00 5.470000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Aa_W42 2337 0.48 2.290000e+00 9.900000e+00 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Ab_W42 2337 0.48 2.410000e+00 9.430000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Ac_W42 2337 0.48 2.900000e+00 1.070000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Ad_W42 2337 0.48 2.750000e+00 1.209000e+01 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Aa_W42 2226 0.50 1.980000e+00 6.200000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Ab_W42 2226 0.50 1.900000e+00 5.480000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Ac_W42 2226 0.50 3.140000e+00 8.430000e+00 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Ad_W42 2226 0.50 4.100000e+00 1.315000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Ae_W42 2226 0.50 2.060000e+00 7.440000e+00 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ5_F2A_W42 2226 0.50 2.920000e+00 7.100000e+00 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ6_F2A_W42 2226 0.50 2.350000e+00 9.640000e+00 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ7_F2A_W42 2226 0.50 3.030000e+00 1.312000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ8_F2A_W42 2226 0.50 2.600000e+00 6.820000e+00 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ1_F2B_W42 2226 0.50 2.150000e+00 6.870000e+00 1.00 1.000000e+00 1.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ2_F2B_W42 2226 0.50 2.420000e+00 5.440000e+00 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Ba_W42 2777 0.38 3.190000e+00 1.176000e+01 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Bb_W42 2777 0.38 2.740000e+00 1.056000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Bc_W42 2777 0.38 3.000000e+00 1.105000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Bd_W42 2777 0.38 1.920000e+00 8.570000e+00 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Ba_W42 2226 0.50 3.960000e+00 1.453000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Bb_W42 2226 0.50 4.220000e+00 1.520000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Bc_W42 2226 0.50 5.550000e+00 1.743000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Bd_W42 2226 0.50 5.200000e+00 1.675000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Be_W42 2226 0.50 4.100000e+00 1.509000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ5_F2B_W42 2226 0.50 5.600000e+00 1.656000e+01 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ6_F2B_W42 2226 0.50 4.410000e+00 1.701000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ7_F2B_W42 2226 0.50 4.960000e+00 1.869000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ8_F2B_W42 2226 0.50 5.580000e+00 1.718000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ1_F2C_W42 2226 0.50 1.990000e+00 5.510000e+00 1.00 1.000000e+00 1.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ2_F2C_W42 2226 0.50 1.910000e+00 2.960000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Ca_W42 2423 0.46 2.370000e+00 9.130000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Cb_W42 2423 0.46 2.940000e+00 1.155000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Cc_W42 2423 0.46 2.870000e+00 1.027000e+01 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ3_F2Cd_W42 2423 0.46 2.310000e+00 9.630000e+00 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Ca_W42 2226 0.50 2.850000e+00 1.142000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Cb_W42 2226 0.50 3.030000e+00 1.176000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Cc_W42 2226 0.50 5.420000e+00 1.745000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Cd_W42 2226 0.50 5.900000e+00 1.875000e+01 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ4_F2Ce_W42 2226 0.50 2.560000e+00 1.048000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ5_F2C_W42 2226 0.50 4.650000e+00 1.259000e+01 1.00 3.000000e+00 3.00000e+00 4.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ6_F2C_W42 2226 0.50 3.480000e+00 1.474000e+01 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ7_F2C_W42 2226 0.50 4.640000e+00 1.794000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
PQ8_F2C_W42 2226 0.50 5.090000e+00 1.561000e+01 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM4a_W42 0 1.00 2.360000e+00 9.770000e+00 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM4b_W42 0 1.00 2.290000e+00 8.250000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
Q6F1_W42 2238 0.50 2.570000e+00 8.510000e+00 1.00 1.000000e+00 1.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
Q7F1_W42 2238 0.50 2.650000e+00 9.450000e+00 1.00 1.000000e+00 1.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
Q8F1_W42 2238 0.50 3.240000e+00 9.600000e+00 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
Q9F1_W42 2238 0.50 2.840000e+00 7.680000e+00 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
Q6F2_W42 2226 0.50 3.010000e+00 1.025000e+01 1.00 1.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
Q7F2_W42 2226 0.50 2.440000e+00 9.440000e+00 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
Q8F2_W42 2226 0.50 3.450000e+00 1.018000e+01 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
Q9F2_W42 2226 0.50 2.830000e+00 7.920000e+00 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM5a_W42 0 1.00 2.600000e+00 1.208000e+01 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM5b_W42 0 1.00 4.860000e+00 1.792000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM5c_W42 0 1.00 3.380000e+00 1.433000e+01 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM5d_W42 0 1.00 4.690000e+00 1.666000e+01 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM5e_W42 0 1.00 5.130000e+00 1.799000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM5f_W42 0 1.00 4.640000e+00 1.790000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM5g_W42 0 1.00 4.900000e+00 1.856000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM5h_W42 0 1.00 6.260000e+00 2.056000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM5i_W42 0 1.00 5.440000e+00 1.907000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM5j_W42 0 1.00 5.440000e+00 1.907000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM2_W42 0 1.00 2.660000e+00 1.126000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
SCM3_W42 0 1.00 2.650000e+00 1.077000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
POP1_W42 0 1.00 3.110000e+00 1.263000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
POP2_W42 0 1.00 3.280000e+00 7.790000e+00 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
POP3_W42 0 1.00 3.340000e+00 1.251000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW1_W42 0 1.00 2.920000e+00 5.530000e+00 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW1_CORRECT_W42 0 1.00 7.000000e-01 4.600000e-01 0.00 0.000000e+00 1.00000e+00 1.000000e+00 1.000000e+00 ▃▁▁▁▇
KNOW2_W42 0 1.00 2.610000e+00 7.670000e+00 1.00 1.000000e+00 1.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW2_CORRECT_W42 0 1.00 6.300000e-01 4.800000e-01 0.00 0.000000e+00 1.00000e+00 1.000000e+00 1.000000e+00 ▅▁▁▁▇
KNOW3_W42 0 1.00 3.920000e+00 7.760000e+00 1.00 3.000000e+00 3.00000e+00 4.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW3_CORRECT_W42 0 1.00 5.700000e-01 5.000000e-01 0.00 0.000000e+00 1.00000e+00 1.000000e+00 1.000000e+00 ▆▁▁▁▇
KNOW4_W42 0 1.00 3.040000e+00 7.710000e+00 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW4_CORRECT_W42 0 1.00 6.400000e-01 4.800000e-01 0.00 0.000000e+00 1.00000e+00 1.000000e+00 1.000000e+00 ▅▁▁▁▇
KNOW5_W42 0 1.00 3.480000e+00 8.800000e+00 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW5_CORRECT_W42 0 1.00 6.100000e-01 4.900000e-01 0.00 0.000000e+00 1.00000e+00 1.000000e+00 1.000000e+00 ▅▁▁▁▇
KNOW6_W42 0 1.00 3.790000e+00 6.940000e+00 1.00 3.000000e+00 3.00000e+00 4.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW6_CORRECT_W42 0 1.00 5.200000e-01 5.000000e-01 0.00 0.000000e+00 1.00000e+00 1.000000e+00 1.000000e+00 ▇▁▁▁▇
KNOW7_W42 0 1.00 4.600000e+00 8.050000e+00 1.00 4.000000e+00 4.00000e+00 4.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW7_CORRECT_W42 0 1.00 8.000000e-01 4.000000e-01 0.00 1.000000e+00 1.00000e+00 1.000000e+00 1.000000e+00 ▂▁▁▁▇
KNOW9_W42 0 1.00 2.730000e+00 7.540000e+00 1.00 1.000000e+00 1.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW9_CORRECT_W42 0 1.00 6.000000e-01 4.900000e-01 0.00 0.000000e+00 1.00000e+00 1.000000e+00 1.000000e+00 ▅▁▁▁▇
KNOW10_W42 0 1.00 4.060000e+00 8.300000e+00 1.00 3.000000e+00 3.00000e+00 5.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW10_CORRECT_W42 0 1.00 4.000000e-01 4.900000e-01 0.00 0.000000e+00 0.00000e+00 1.000000e+00 1.000000e+00 ▇▁▁▁▅
KNOW11_W42 0 1.00 2.090000e+00 7.380000e+00 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW11_CORRECT_W42 0 1.00 8.200000e-01 3.800000e-01 0.00 1.000000e+00 1.00000e+00 1.000000e+00 1.000000e+00 ▂▁▁▁▇
KNOW12_W42 0 1.00 3.370000e+00 8.080000e+00 1.00 2.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
KNOW12_CORRECT_W42 0 1.00 5.800000e-01 4.900000e-01 0.00 0.000000e+00 1.00000e+00 1.000000e+00 1.000000e+00 ▆▁▁▁▇
KNOW_INDEX_W42 0 1.00 6.870000e+00 3.310000e+00 0.00 4.000000e+00 7.00000e+00 1.000000e+01 1.100000e+01 ▃▂▃▃▇
KNOW14_W42 0 1.00 2.820000e+00 8.810000e+00 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
F_METRO 0 1.00 1.130000e+00 3.400000e-01 1.00 1.000000e+00 1.00000e+00 1.000000e+00 2.000000e+00 ▇▁▁▁▁
F_CREGION 0 1.00 2.670000e+00 1.000000e+00 1.00 2.000000e+00 3.00000e+00 3.000000e+00 4.000000e+00 ▃▅▁▇▅
F_AGECAT 0 1.00 2.650000e+00 3.060000e+00 1.00 2.000000e+00 3.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
F_SEX 0 1.00 1.650000e+00 2.960000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
F_EDUCCAT 0 1.00 2.230000e+00 4.660000e+00 1.00 1.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
F_EDUCCAT2 0 1.00 3.720000e+00 4.790000e+00 1.00 2.000000e+00 3.00000e+00 5.000000e+00 9.900000e+01 ▇▁▁▁▁
F_HISP 0 1.00 2.320000e+00 6.810000e+00 1.00 2.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
F_RACECMB 0 1.00 3.870000e+00 1.502000e+01 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
F_RACETHN 0 1.00 1.740000e+00 1.290000e+00 1.00 1.000000e+00 1.00000e+00 2.000000e+00 9.000000e+00 ▇▂▁▁▁
F_NATIVITY 0 1.00 1.470000e+00 4.470000e+00 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
F_CITIZEN 0 1.00 1.250000e+00 4.640000e+00 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
F_MARITAL 0 1.00 3.020000e+00 5.750000e+00 1.00 1.000000e+00 2.00000e+00 5.000000e+00 9.900000e+01 ▇▁▁▁▁
F_RELIG 0 1.00 5.320000e+00 8.290000e+00 1.00 1.000000e+00 2.00000e+00 1.000000e+01 9.900000e+01 ▇▁▁▁▁
F_BORN 1678 0.62 3.910000e+00 1.494000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
F_ATTEND 0 1.00 4.580000e+00 6.550000e+00 1.00 3.000000e+00 5.00000e+00 6.000000e+00 9.900000e+01 ▇▁▁▁▁
F_PARTY_FINAL 0 1.00 3.740000e+00 1.206000e+01 1.00 1.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
F_PARTYLN_FINAL 2788 0.38 1.436000e+01 3.291000e+01 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
F_PARTYSUM_FINAL 0 1.00 1.950000e+00 1.680000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.000000e+00 ▇▁▁▁▁
F_INCOME 0 1.00 9.460000e+00 1.959000e+01 1.00 3.000000e+00 6.00000e+00 8.000000e+00 9.900000e+01 ▇▁▁▁▁
F_INCOME_RECODE 0 1.00 6.310000e+00 2.014000e+01 1.00 1.000000e+00 2.00000e+00 3.000000e+00 9.900000e+01 ▇▁▁▁▁
F_REG 138 0.97 1.610000e+00 4.510000e+00 1.00 1.000000e+00 1.00000e+00 1.000000e+00 9.900000e+01 ▇▁▁▁▁
F_IDEO 0 1.00 5.450000e+00 1.525000e+01 1.00 2.000000e+00 3.00000e+00 4.000000e+00 9.900000e+01 ▇▁▁▁▁
F_ACSWEB 0 1.00 9.200000e-01 2.700000e-01 0.00 1.000000e+00 1.00000e+00 1.000000e+00 1.000000e+00 ▁▁▁▁▇
F_VOLSUM 0 1.00 1.850000e+00 4.140000e+00 1.00 1.000000e+00 2.00000e+00 2.000000e+00 9.900000e+01 ▇▁▁▁▁
WEIGHT_W42 0 1.00 1.000000e+00 8.500000e-01 0.11 4.300000e-01 7.50000e-01 1.270000e+00 4.680000e+00 ▇▃▁▁▁

Data 3

Introduction and data

  • Identify the source of the data.

    Los Angeles Open Data

  • State when and how it was originally collected (by the original data curator, not necessarily how you found the data).

    The dataset was originally collected by the Los Angeles Police Department from the time period of 2020 to present. The data was collected in the police department’s record management system and was processed by the City of Los Angeles.

  • Write a brief description of the observations.

    The following data set includes information about crimes that were reported in LAPD from 2020 to present. The data set contains 682K rows and 28 columns. The data set has types of crimes such as assault, theft, and murder. Each row represents each crime incident and its own unique data features with categories such as date, time, geographical location, and other details about that crime. They also provided the current status of the crime: whether the case remains open or it is closed. In terms of the information about the people related, they provide demographics such as age, gender, and race of the victims and potential suspects in the field. In terms of formulating the research question, some variables to consider are ‘Date Reported’, ‘Time Occurred’, ‘Area ID’, ‘Crime Code’, and ‘Crime Code Description’.

Research question

  • A well formulated research question. (You may include more than one research question if you want to receive feedback on different ideas for your project. However, one per data set is required.)

    What is the correlation among the types of crime, location, and time of day in the city of Los Angeles between 2020 to present?

  • A description of the research topic along with a concise statement of your hypotheses on this topic.

First, the target population for this research is from all reported crimes in Los Angeles between 2020 to present. This research question tries to explore the relationship between three variables mentioned in the instruction: types of crime, location, and time of the day. These three factors can be analyzed to find the relationship between how the geographical aspect of the city and the time shifts the stages of criminals to commit a crime and specify which types of crimes can be hugely affected by location or the time of the day. The question can be answered with the following data from the code chunk below, which contains information about variables such as ‘Crime Code Description’, ‘Date reported’, ‘Time Occurred’, ‘Area ID’. These variables can be well utilized to identify the three variables mentioned in the research question, and generate statistics such as regression or description to analyze the data.

  • Identify the types of variables in your research question. Categorical? Quantitative?

    ‘Crime Code Description’ = Categorical

    ‘Area ID’ = Categorical

    ‘Time Occurred’ = Quantitative

    ‘Date reported’ = Quantitative

Glimpse of data

# add code here
la_crime <- read_csv("data/la_crime_2020_to_present.csv")
Warning: One or more parsing issues, call `problems()` on your data frame for details,
e.g.:
  dat <- vroom(...)
  problems(dat)
Rows: 682335 Columns: 28
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (17): DR_NO, Date Rptd, DATE OCC, TIME OCC, AREA, AREA NAME, Rpt Dist No...
dbl (10): Part 1-2, Crm Cd, Vict Age, Premis Cd, Weapon Used Cd, Crm Cd 1, C...
lgl  (1): Crm Cd 4

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
skimr::skim(la_crime)
Data summary
Name la_crime
Number of rows 682335
Number of columns 28
_______________________
Column type frequency:
character 17
logical 1
numeric 10
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
DR_NO 0 1.00 4 9 0 682335 0
Date Rptd 0 1.00 22 22 0 1168 0
DATE OCC 0 1.00 22 22 0 1168 0
TIME OCC 0 1.00 4 4 0 1439 0
AREA 0 1.00 2 2 0 21 0
AREA NAME 0 1.00 6 11 0 21 0
Rpt Dist No 0 1.00 4 4 0 1194 0
Crm Cd Desc 0 1.00 5 56 0 137 0
Mocodes 93773 0.86 4 49 0 233172 0
Vict Sex 89346 0.87 1 1 0 4 0
Vict Descent 89351 0.87 1 1 0 19 0
Premis Desc 357 1.00 4 63 0 306 0
Weapon Desc 445186 0.35 3 46 0 79 0
Status 0 1.00 2 2 0 6 0
Status Desc 0 1.00 3 12 0 6 0
LOCATION 0 1.00 1 40 0 61184 0
Cross Street 571229 0.16 1 34 0 9082 0

Variable type: logical

skim_variable n_missing complete_rate mean count
Crm Cd 4 682335 0 NaN :

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
Part 1-2 0 1.00 1.42 0.49 1.00 1.00 1.00 2.00 2.00 ▇▁▁▁▆
Crm Cd 0 1.00 500.57 207.84 110.00 330.00 442.00 626.00 956.00 ▂▇▂▆▂
Vict Age 0 1.00 29.99 21.68 -2.00 12.00 31.00 45.00 120.00 ▆▇▃▁▁
Premis Cd 8 1.00 304.67 216.29 101.00 101.00 203.00 501.00 971.00 ▇▁▅▁▁
Weapon Used Cd 445186 0.35 362.21 123.83 101.00 308.00 400.00 400.00 516.00 ▂▁▁▇▃
Crm Cd 1 9 1.00 500.31 207.63 110.00 330.00 442.00 626.00 956.00 ▂▇▂▆▂
Crm Cd 2 631351 0.07 956.52 113.17 210.00 998.00 998.00 998.00 999.00 ▁▁▁▁▇
Crm Cd 3 680618 0.00 983.33 52.55 434.00 998.00 998.00 998.00 999.00 ▁▁▁▁▇
LAT 0 1.00 33.96 1.96 0.00 34.01 34.06 34.16 34.33 ▁▁▁▁▇
LON 0 1.00 -117.96 6.81 -118.67 -118.43 -118.32 -118.27 0.00 ▇▁▁▁▁