generated from jtr13/quarto-edav-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
d3graph.qmd
34 lines (27 loc) · 1.21 KB
/
d3graph.qmd
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
# Interactive graph
In this section, we carry over our efforts to relativize the relationship
between changes in temperature from 24 hours earlier and changes in taxi
ridership from a week ago.
Instead of presenting all of the data at once, however, we let the user target
a specific temperature and see how ridership differs when the previous day
was warmer or colder and by how much.
The farther up the $y$ axis,
the more taxi trips taken “today” compared to “last week,” where each “today”
corresponds to the temperature chosen by the slider,
and we see the universe of last weeks when it was a different temperature.
Hence, for the default temperature, 20°,
we see that if yesterday was around the same temperature,
in general fewer trips were taken today. But if yesterday was much colder or
much warmer, paradoxically to our general conclusions, more trips were taken
today.
We have limited ourselves, as in the previous section, to post-Pandemic, rush
hour traffic when the temperature was -5°–30°.
<style>
* {
font-family: sans-serif;
}
</style>
<div id="plot">
</div>
<script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
<script src="scripts/myscript.js" type="module"></script>