-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
70 lines (57 loc) · 2.25 KB
/
index.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
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://cdn.jsdelivr.net/npm/vega@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script>
<title>A Vega-lite example using labor participation rates.</title>
</head>
<center>
<h5>Hypothesis: Labor force participation declines are driven by men leaving the workforce.</h5>
</center>
<body>
<div id="vis_time_series"></div>
<table>
<thead>
<tr>
<th colspan="2">Side by side comparison</th>
</tr>
</thead>
<tbody>
<tr>
<td><div id="vis_bar_2010"></div></td>
<td><div id="vis_bar_2020"></div></td>
</tr>
</tbody>
</table>
<div id="vis_bar">
<p style="font-size:8px">
Time series data from: <a href="https://fred.stlouisfed.org/series/CIVPART">https://fred.stlouisfed.org/series/CIVPART</a></p>
<p style="font-size:8px">
Bar graph data from: <a href="https://www.bls.gov/emp/tables/civilian-labor-force-participation-rate.htm">https://www.bls.gov/emp/tables/civilian-labor-force-participation-rate.htm</a>
</p>
<p style="font-size:8px"><i>
The labor force participation rate represents the number of people in the labor force
as a percentage of the civilian noninstitutional population. In other words, the participation rate
is the percentage of the population that is either working or actively looking for work.
The labor force participation rate is calculated as:
(Labor Force ÷ Civilian Noninstitutional Population) x 100.</font></p></i>
<script>
const spec_time_series = "labor_scatter.vl.json";
vegaEmbed("#vis_time_series", spec_time_series)
.then(result => console.log(result))
.catch(console.warn);
const spec_bar_2010 = "labor_bar_2010.vl.json";
vegaEmbed("#vis_bar_2010", spec_bar_2010)
.then(result => console.log(result))
.catch(console.warn);
const spec_bar_2020 = "labor_bar_2020.vl.json";
vegaEmbed("#vis_bar_2020", spec_bar_2020)
.then(result => console.log(result))
.catch(console.warn);
const spec_bar = "labor_bar.vl.json";
vegaEmbed("#vis_bar", spec_bar)
.then(result => console.log(result))
.catch(console.warn);
</script>
</body>