-
Notifications
You must be signed in to change notification settings - Fork 0
/
quant.html
138 lines (128 loc) · 8.66 KB
/
quant.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE HTML>
<html><head>
<title>Naomi, UX Researcher</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="stylesheet" href="assets/css/main.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script><link href="data:text/css,%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ddg-runtime-checks%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20display%3A%20none%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20" rel="stylesheet" type="text/css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="page-wrapper">
<div class="container-fluid">
<nav class="navbar navbar-expand-md navbar-light bg-faded">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- <a class="navbar-brand" href="#">Navbar</a> -->
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link" href="index.html">Naomi Johnson</a>
<a class="nav-item nav-link" href="about.html">About</a>
<a class="nav-item nav-link" href="https://github.com/naomi789/naomi789/raw/master/resume.pdf">Resume <i class="fas fa-external-link-alt"></i></a>
</div>
</div>
</nav>
<div class="banner-full-img-container">
<img class="img-fluid" src="images/quant/banner.png">
</div>
<!-- Main -->
<section id="main" class="container">
<header>
</header>
<div class="box">
<div class="row">
<div class="col-2"></div>
<div class="col-8">
<h2 class="proj-title">Quantitative research</h2>
<p class="proj-subtitle">
I love using Python and working with data! Here are some of my recent hobby projects where I use public datasets, analyze, and visualize them to answer questions I have.
</p>
<div class="proj-section-header">Research questions</div>
<div class="proj-section-content">
<ol>
<li>What trends are there in crime in Seattle, WA? Are Ballard and Pioneer Square neighborhoods really getting "more dangerous"?</li>
<li>How is the ratio of minority gender students changing in graduates of bachelor degrees like computer science and other STEM programs?</li>
<li>How is "the job market" changing in the US? In particular, I'm interested in the number of openings, the location (remote, hybrid, in person), the number of applicants, and how long the listing is up?</li>
</ol>
</div>
<div class="proj-section-header">1. Crime in Seattle</div>
<div class="proj-section-content">
<h2>Research questions and hypothesis</h2>
<p>Folks in Seattle tell newcomers the same information that they were told when they moved to Seattle. But do the numbers back the claims that are shared so often?
</p>
<button type="button" class="btn btn-info collapsed" data-toggle="collapse" data-target="#hypothesis" aria-expanded="false">Expand/collapse</button>
<div id="hypothesis" class="collapse" aria-expanded="false" style="height: 0px;">
<br><br>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th scope="col">Hypothesis</th>
<th scope="col">Plan</th>
</tr>
</thead>
<tbody>
<tr>
<td>The neighborhoods with the most reported crimes are: South Park, Rainier Beach, Othello, Beacon Hill, Burien, White Center, Skyway, and Yesler. </td>
<td>Calculate mean and standard deviation for reported crimes in each neighborhood. Conduct a hypothesis test (one-way ANOVA or non-parametric test) to determine if the difference is statistically significant. Calculate a confidence interval to see if the reported crimes overlap.</td>
</tr>
<tr>
<td>Some types of crime are increasing in Ballard and Pioneer Square. </td>
<td>Hypothesis test (chi-square or fisher's exact test) and regression analysis.</td>
</tr>
<tr>
<td>Crime has increased around the new Link stations after they opened. According to <a href="https://en.wikipedia.org/wiki/List_of_Link_light_rail_stations">Wikipedia</a>, Northgate, Roosevelt, and U district stations opened on October 2, 2021; Angel Lake opened on September 24, 2016; both the Capitol Hill and University of Washington stations opened on March 19, 2014). </td>
<td>Calculate crimes per month the year before and after each station opened. Conduct a hypothesis test (t-test, a z-test, or Wilcoxon rank-sum test) and regression analysis.</td>
</tr>
<tr>
<td>The stations with the highest ridership have the most crime in the neighborhood. According to <a href="https://en.wikipedia.org/wiki/List_of_Link_light_rail_stations">Wikipedia</a>, that would be Westlake (12594), UW (11,200), Capitol Hill (8,408), Chinatown (7,461), University Street (6,241), SeaTac Airport(5,640), Pioneer Square (4,764).</td>
<td>Calculate a correlation coefficient (Pearson's or Spearman's) and perform a regression analysis. Plot the number of riders and the number of reported crimes in the neighborhood surrounding each station in a scatter plot.</td>
</tr>
<tr>
<td>Most reports of prostitution happen along Aurora Ave</td>
<td>Conduct hypothesis test (chi-square test or a Fisher's exact test). Comparing mean and standard deviation of the number of reported incidents too.</td>
</tr>
<tr>
<td>Violent crimes are increasing near the University.</td>
<td>Hypothesis test (t-tests or ANOVA) and compare the mean and standard deviation of the number of reported incidents.</td>
</tr>
</tbody>
</table>
</div>
<h2>Gather and clean data</h2>
<p>I downloaded a *.csv of the <a href="https://data.seattle.gov/Public-Safety/SPD-Crime-Data-2008-Present/tazs-3rd5">SPD Crime Data: 2008-Present</a> data the last week of April 2023.
</p>
<button type="button" class="btn btn-info collapsed" data-toggle="collapse" data-target="#cleaning" aria-expanded="false">Expand/collapse</button>
<div id="cleaning" class="collapse" aria-expanded="false" style="height: 0px;">
<br><br>
Overall, I was very impressed with how clean the data was. Some events were reported with the latitude and longitude (0,0), so I removed those, as well as a few outliers that were not in the county, let alone Seattle City limits. Next, I had to convert the dates from strings to datetime format, but I needed to drop the nan values first.
</div>
<h2>Visualize the data</h2>
<p>
Before I worked evaluated the hypothesis, I wanted to visualize it and make sure it looked reasonable. I visualized the entire dataset, but I had issues getting the webpage to load with it, so I'll show you <a href="https://naomi789.github.io/naomi789/seattle-crime/all-2022-seattle-crime.html">just the 2022 data</a>.
</p>
<!-- <button onclick="./seattle-crime/all-2022-seattle-crime.html" class="btn btn-info">View 2022 crime data</button> -->
<div class="proj-section-header">2. Gender and race diversity amongst graduates with bachelor's</div>
<div class="proj-section-content">[INSERT DETAILS HERE]</div>
<div class="proj-section-header">3. The 21st century job market in the US</div>
<div class="proj-section-content"><a href="https://www.bls.gov/news.release/empsit.toc.htm">Economic News Release from the U.S. BUREAU OF LABOR STATISTICS</a></div>
</div>
</div>
<div class="col-2"></div>
</div>
<!-- Footer -->
<div class="row footer">
<div class="col-3"></div>
<div class="col-6">
<a href="https://www.linkedin.com/in/naomi789/" class="fab fa-linkedin icon"></a>
<a href="https://www.github.com/naomi789" class="fab fa-github icon"></a>
<a href="#[email protected]" class="fas fa-envelope icon"></a>
<br><br>
<p class="copyright">© 2021 <a href="index.html">Naomi Johnson</a></p>
</div>
<div class="col-3"></div>
</div>
</div>
</section></div></div>
</body></html>