/
lifestyle.html
42 lines (37 loc) · 2.11 KB
/
lifestyle.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
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="style.css">
<title>6.894 Final Project</title>
</head>
<body>
<!-- separate tabs for each category; might change to scroll later -->
<div class="category" id="tabs">
<a href="index.html">Home</a>
<a href="mobility.html">Mobility</a>
<a href="restaurants.html">Restaurants</a>
<a href="lifestyle.html" class="active">Lifestyle</a>
<a href="schooling.html">Schooling</a>
</div>
<div class="mainpage">
<h1>Lifestyle</h1>
<div class="section" id="traffic-collisions">
<h3>Traffic Collisions in LA County</h3>
<p>One upside of the decrease in mobility for non-essential activities is the decrease in traffic collisions across the nation. For instance, the monthly number of reported traffic collisions in Los Angeles County is typically around [calculate] collisions. After the Stay-At-Home Order that took into effect on March 19, 2020, the monthly number of reported traffic collisions decreased drastically to [calculate] collisions. With less accidents happening on the road, more resources can be allocated towards fighting COVID-19!</p>
<p>Data source: [https://data.lacity.org/A-Safe-City/Traffic-Collision-Data-from-2010-to-Present/d5tf-ez2w]</p>
<p>To-Dos:
1) Add self-updating line chart on the side that compares # of traffic collisions vs. date (to clearly see decrease in traffic collisions)
2) Add landmarks/image overlay to the county to provide more local context
3) Improve the transitions between dates
4) Fix Play button positioning (make it dynamic)</p>
<button id="play-button" class="play-button">Play</button>
<div id="traffic-collisions-viz"></div>
</div>
</div>
<!-- If using js, use lifestyle.js -->
<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="https://d3js.org/topojson.v2.min.js"></script>
<script>
document.write('<scr' + 'ipt src="trafficcollisions.js?cb=' + new Date().getTime() + '"></scr' + 'ipt>')
</script>
</body>