generated from jtr13/quarto-edav-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathd3graph.qmd
42 lines (28 loc) · 1.34 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
34
35
36
37
38
39
40
41
42
# Interactive graph
```{=html}
<style>
* {
font-family: sans-serif;
}
</style>
```
<div>
<h3>Select the appropriate category to display the top 10 majors.</h3>
<p> The below interactive graph combines the three separate bar graphs that we had created during our analysis of top 10 majors by starting median salary, mid career median salary, and percent change between the two, and allows us to view the rankings as per our requirement.</p>
<button onclick="updateData('Starting Career Salary')">By Starting Median Salary</button> <button onclick="updateData('Mid Career Salary')">By Mid Career Median Salary</button> <button onclick="updateData('%change Starting-Mid Career Salary')">By Percent Change Start-Mid Career Salary</button>
</div>
::: {#plot}
:::
<div>
<h3>Display Top 10 colleges by Mid Career Salary</h3>
<p>SInce we could see that majority of the top colleges were in the Northeast region and Engineering Category, we have created an interactive plot to see the top 10 colleges in both these groups.</p>
<button onclick="updateData2('Top College Northeast')">Top College Northeast</button> <button onclick="updateData2('Top Engineering College')">Top Engineering College</button>
</div>
::: {#plot2}
:::
```{=html}
<script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
```
```{=html}
<script src="scripts/myscript.js"></script>
```