Skip to content

Commit

Permalink
Merge pull request #142 from code4policy/add-source-data
Browse files Browse the repository at this point in the history
Add source data
  • Loading branch information
OscarBoochever authored Jan 12, 2024
2 parents 243a2e1 + 1bef645 commit 56d318c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Binary file added .DS_Store
Binary file not shown.
13 changes: 12 additions & 1 deletion national-sentiment-page/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,18 @@ d3.csv("images/cleaned_table_1.csv").then(function (data) {
.attr("y", height + margin.bottom / 2)
.attr("text-anchor", "left")
.style("font-size", "10px")
.text("Source: Gallup Poll; Created by Alice Shao with the help of ChatGPT");
.style("font-color", "blue")
.html("Source: <a class = 'blue-link' href = 'https://news.gallup.com/poll/1645/guns.aspx'</a> Gallup Poll" );

svg.append("text")
.attr("x", margin.left)
.attr("y", height + margin.bottom / 2 + 15) // Adjust the y-coordinate for proper spacing
.attr("text-anchor", "left")
.style("font-size", "10px")
.text("Created by Alice Shao with the help of ChatGPT");

svg.append("style")
.text(".blue-link { fill: blue; text-decoration: underline; }");


// Add X and Y axes
Expand Down

0 comments on commit 56d318c

Please sign in to comment.