Skip to content

Commit 5bd2a84

Browse files
committed
Apply prettier
1 parent 58cd44f commit 5bd2a84

23 files changed

+1734
-1536
lines changed

.github/workflows/static.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
uses: actions/upload-pages-artifact@v2
3838
with:
3939
# Upload entire repository
40-
path: '.'
40+
path: "."
4141
- name: Deploy to GitHub Pages
4242
id: deployment
4343
uses: actions/deploy-pages@v3

README.md

+12-16
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,36 @@
1818
Webiste can be found <a href="https://luke-stoner.github.io/RWH" />here</a>
1919
</div>
2020

21-
22-
23-
2421
## Project Summary
2522

2623
Welcome to 'Race for the White House,' a highly acclaimed project from Harvard CS 171 that has earned a place in the prestigious Hall of Fame.
27-
This repository contains html, javascript, css, and other supporting files to
28-
create a comprehensive exploration of the media's coverage of the 2024 United States Presidential Election. The data for
24+
This repository contains html, javascript, css, and other supporting files to
25+
create a comprehensive exploration of the media's coverage of the 2024 United States Presidential Election. The data for
2926
this project is scraped from the Internet Archive's TV news archive, which is updated daily and contains millions of clips
30-
from local, national, and international news networks. `labeled.csv` contains the cleaned closed captions from clips that
31-
mention 2024 presidential candidates, along with other data such as the date and network of the mention. Finally, the
32-
text from each caption was fed to a RoBERTa-based sentiment analysis model to label the mention as either positive or
27+
from local, national, and international news networks. `labeled.csv` contains the cleaned closed captions from clips that
28+
mention 2024 presidential candidates, along with other data such as the date and network of the mention. Finally, the
29+
text from each caption was fed to a RoBERTa-based sentiment analysis model to label the mention as either positive or
3330
negative. The Race for the White House leverages this data to create unique, interesting visualizations that explore how
3431
both coverage sentiment and volume differ across candidates and networks.
3532

36-
3733
## File Structure
3834

3935
├── LICENSE
4036
├── README.md
4137
├── css #CSS folder for all styling files
4238
├── style.css
4339
└── inspector.css
44-
├── data
40+
├── data
4541
└── labeled.csv #Data file that stores candidate/network info, text, and label for each mention
46-
├── favicon
42+
├── favicon
4743
├── fonts #Stores all custom fonts, including CNN font for headers
4844
├── img #Stores all image and video files used across the website
4945
├── candidate_portraits
5046
├── candidate_portraits_small
5147
├── intro_page
52-
├── networks
53-
└── ...
54-
48+
├── networks
49+
└── ...
50+
5551
└── js #Home of all javascript files for the site, to include visualization files as well as other styling and formatting
5652

5753
Please feel free to further explore each directory to find relevant files and documentation.
@@ -65,12 +61,12 @@ Please feel free to further explore each directory to find relevant files and do
6561
- Favicon files for the website are found in the `favicon` directory.
6662
- Custom font files used for styling are stored in the `fonts` directory.
6763
- Image and video files utilized across the website, to include candidate photos, network logos, and other visuals
68-
are placed in the `img` directory.
64+
are placed in the `img` directory.
6965
- The `index.html` file serves as the HTML file for compiling the website.
7066

7167
## Contributing
7268

73-
We encourage others to further our work in this project by forking the repository, making changes, and creating a pull request.
69+
We encourage others to further our work in this project by forking the repository, making changes, and creating a pull request.
7470
We just ask that you credit this original project in any future of this repository.
7571

7672
## License and Disclaimer

css/inspector.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@
8686
}
8787

8888
canvas {
89-
width: 100%; /* Make the canvas take the full width of its container */
90-
max-width: -webkit-max-content; /* Set the maximum width for WebKit browsers */
91-
}
89+
width: 100%; /* Make the canvas take the full width of its container */
90+
max-width: -webkit-max-content; /* Set the maximum width for WebKit browsers */
91+
}

css/style.css

+9-12
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050

5151
@font-face {
5252
font-family: "cnn-font";
53-
src: url("/RWH/fonts/cnn-webfont.woff2") format("woff2"),
53+
src:
54+
url("/RWH/fonts/cnn-webfont.woff2") format("woff2"),
5455
url("/RWH/fonts/cnn-webfont.woff") format("woff");
5556
font-weight: normal;
5657
font-style: normal;
@@ -951,7 +952,6 @@ body .testimonial .row .tabs li.active figure::before {
951952
padding-right: 20px;
952953
}
953954

954-
955955
#bumpchartcolumn {
956956
text-align: center;
957957
}
@@ -1100,7 +1100,7 @@ canvas {
11001100
opacity: 0.2;
11011101
}
11021102

1103-
#settings-icon{
1103+
#settings-icon {
11041104
max-width: -webkit-fill-available;
11051105
}
11061106

@@ -1112,7 +1112,6 @@ span.adjustments-title {
11121112
/*padding-top: 0.5rem;*/
11131113
}
11141114

1115-
11161115
.adjustments-title {
11171116
font-size: 24px;
11181117
font-weight: bold;
@@ -1128,23 +1127,23 @@ span.adjustments-title {
11281127
padding-top: 22px;
11291128
}
11301129

1131-
#candidate-selections-box{
1132-
background-color: #E8D3A1FF;
1130+
#candidate-selections-box {
1131+
background-color: #e8d3a1ff;
11331132
/*background-color: #dec9c9;*/
11341133
border-radius: 5px;
1135-
text-align:center;
1134+
text-align: center;
11361135
/*margin: 5%;*/
11371136
margin-top: 30px;
11381137
padding-top: 5px;
11391138
margin-bottom: 55px;
11401139
}
11411140

11421141
.legend-section {
1143-
background-color: rgba(255, 255, 255, .7);
1142+
background-color: rgba(255, 255, 255, 0.7);
11441143
border-radius: 5px;
11451144
margin-bottom: calc(1.5rem + 1px);
11461145
padding: 1rem;
1147-
padding-top: .5rem;
1146+
padding-top: 0.5rem;
11481147
}
11491148
#legend-panel-row1 {
11501149
justify-content: center;
@@ -1173,7 +1172,6 @@ span.adjustments-title {
11731172
/*filter: blur(1px);*/
11741173
}
11751174

1176-
11771175
.candidate-name {
11781176
position: absolute;
11791177
top: 50%;
@@ -1193,7 +1191,6 @@ span.adjustments-title {
11931191
box-shadow: inset white 0 0 3px;
11941192
}
11951193

1196-
11971194
.candidate_containers img:hover + .candidate-name {
11981195
transform: translate(-50%, -50%) scale(1.5); /* Scale up the text on hover */
11991196
visibility: visible;
@@ -1215,7 +1212,7 @@ span.adjustments-title {
12151212
transition: opacity 0.3s; /* Smooth transition for fading in/out */
12161213
}
12171214

1218-
#dynamic-chart-title{
1215+
#dynamic-chart-title {
12191216
text-align: center;
12201217
font-size: 20px;
12211218
font-weight: bolder;

favicon/site.webmanifest

+19-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}
1+
{
2+
"name": "",
3+
"short_name": "",
4+
"icons": [
5+
{
6+
"src": "/android-chrome-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png"
9+
},
10+
{
11+
"src": "/android-chrome-512x512.png",
12+
"sizes": "512x512",
13+
"type": "image/png"
14+
}
15+
],
16+
"theme_color": "#ffffff",
17+
"background_color": "#ffffff",
18+
"display": "standalone"
19+
}

index.html

+55-35
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<title>Race for the White House</title>
@@ -59,10 +59,13 @@
5959
</head>
6060

6161
<body>
62-
<div id="loading">
63-
<img src="https://cdn.dribbble.com/users/626506/screenshots/2661024/800600.gif" alt="Loading..."/>
64-
</div>
65-
<div id="main-content" style="display: none;"></div>
62+
<div id="loading">
63+
<img
64+
src="https://cdn.dribbble.com/users/626506/screenshots/2661024/800600.gif"
65+
alt="Loading..."
66+
/>
67+
</div>
68+
<div id="main-content" style="display: none"></div>
6669
<div class="row">
6770
<div id="fullpage">
6871
<!--BEGIN INTRO-->
@@ -166,13 +169,13 @@ <h1>The White House</h1>
166169
<div class="col-md-6 mx-auto text-center" style="width: 50%">
167170
<div class="shadow bg-white rounded" id="tv-desc">
168171
<p>
169-
The White House serves as the official home of
170-
the President of the United States. As every
171-
aspiring candidate strives to secure this prestigious
172-
residence, they inevitably attract significant media
173-
scrutiny. Hover over the above voronoi stippling image
174-
to uncover additional details! Each dot on the
175-
screen corresponds to one of the <strong>50,000+</strong>
172+
The White House serves as the official home of the President
173+
of the United States. As every aspiring candidate strives to
174+
secure this prestigious residence, they inevitably attract
175+
significant media scrutiny. Hover over the above voronoi
176+
stippling image to uncover additional details! Each dot on
177+
the screen corresponds to one of the
178+
<strong>50,000+</strong>
176179
candidate mentions in our dataset.
177180
</p>
178181
</div>
@@ -639,7 +642,10 @@ <h1>Uncover the Impact: Your Interactive Analysis</h1>
639642
</div>
640643
</div>
641644
<div class="row">
642-
<div class="shadow p-3 mb-5 bg-white rounded col-6" id="impact-event-intro">
645+
<div
646+
class="shadow p-3 mb-5 bg-white rounded col-6"
647+
id="impact-event-intro"
648+
>
643649
<p>
644650
Delve into the dynamics of political influence with our
645651
interactive visualization. As you've journeyed through the ebb
@@ -648,8 +654,9 @@ <h1>Uncover the Impact: Your Interactive Analysis</h1>
648654
we empower you to uncover these mysteries.
649655
</p>
650656
<p>
651-
Select from key political events, choose the candidates of interest, and
652-
decide whether to track coverage sentiment or volume.
657+
Select from key political events, choose the candidates of
658+
interest, and decide whether to track coverage sentiment or
659+
volume.
653660
</p>
654661
<p>
655662
This tool is designed to bring your observations full circle,
@@ -661,7 +668,11 @@ <h1>Uncover the Impact: Your Interactive Analysis</h1>
661668
</p>
662669
</div>
663670
<div class="col-md-6">
664-
<img src="img/breakingnews.png" id="breaking-news-image" class="img-fluid" />
671+
<img
672+
src="img/breakingnews.png"
673+
id="breaking-news-image"
674+
class="img-fluid"
675+
/>
665676
</div>
666677
</div>
667678
</div>
@@ -691,7 +702,7 @@ <h1>Impactful Events</h1>
691702
<div class="row title-area" id="settingstitle">
692703
<div class="col-md-12 mx-auto text-center">
693704
<span class="adjustments-title"
694-
>Make Your Own Adjustments</span
705+
>Make Your Own Adjustments</span
695706
>
696707
</div>
697708
</div>
@@ -725,16 +736,22 @@ <h5 class="settingsQ">How did the...</h5>
725736
</div>
726737
</div>
727738
</div>
728-
<div id="metric-legend-container" class="container-fluid legend-section">
739+
<div
740+
id="metric-legend-container"
741+
class="container-fluid legend-section"
742+
>
729743
<div class="col-md-12 mx-auto text-center">
730744
<h5 class="dropdown-textfield">
731745
Impact the
732746
<span class="form-group">
733-
<select class="form-control" id="line-stat-selection-impact">
734-
<option value="volume">Number of Mentions</option>
735-
<option value="sentiment">Sentiment of Coverage</option>
736-
</select>
737-
</span>
747+
<select
748+
class="form-control"
749+
id="line-stat-selection-impact"
750+
>
751+
<option value="volume">Number of Mentions</option>
752+
<option value="sentiment">Sentiment of Coverage</option>
753+
</select>
754+
</span>
738755
</h5>
739756
</div>
740757
</div>
@@ -829,7 +846,10 @@ <h1>What Did We Learn?</h1>
829846
</div>
830847
</div>
831848
<div class="row">
832-
<div class="shadow p-3 mb-5 bg-white rounded col-6" id="conclusion-col">
849+
<div
850+
class="shadow p-3 mb-5 bg-white rounded col-6"
851+
id="conclusion-col"
852+
>
833853
Many of our beliefs regarding the shortcomings of television
834854
media were confirmed:
835855

@@ -845,9 +865,9 @@ <h1>What Did We Learn?</h1>
845865
adversarial candidates
846866
</li>
847867
<li>
848-
There is a clear incumbency advantage in the media. The coverage
849-
of both President Biden and former President Trump dwarf that of
850-
the candidates.
868+
There is a clear incumbency advantage in the media. The
869+
coverage of both President Biden and former President Trump
870+
dwarf that of the candidates.
851871
</li>
852872
</ul>
853873

@@ -1058,7 +1078,7 @@ <h6 style="padding: 0.5em">
10581078
</div>
10591079
<div class="row text-center">
10601080
<div>
1061-
<p style="text-align: left;" id="candidate-modal-bio"></p>
1081+
<p style="text-align: left" id="candidate-modal-bio"></p>
10621082
</div>
10631083
</div>
10641084
<div class="row text-center">
@@ -1172,17 +1192,17 @@ <h5 class="modal-title">
11721192
<script src="js/impactful-events.js"></script>
11731193
<script src="js/project-intro.js"></script>
11741194
<script>
1175-
window.addEventListener('load', function() {
1176-
var loading = document.getElementById('loading');
1177-
var mainContent = document.getElementById('main-content');
1195+
window.addEventListener("load", function () {
1196+
var loading = document.getElementById("loading");
1197+
var mainContent = document.getElementById("main-content");
11781198

11791199
// Start the fade-out
1180-
loading.style.opacity = '0';
1200+
loading.style.opacity = "0";
11811201

11821202
// Wait for the fade-out to finish
1183-
setTimeout(function() {
1184-
loading.style.display = 'none';
1185-
mainContent.style.display = 'block'; // Show the main content
1203+
setTimeout(function () {
1204+
loading.style.display = "none";
1205+
mainContent.style.display = "block"; // Show the main content
11861206
}, 500); // This duration should match the CSS transition time
11871207
});
11881208
</script>

0 commit comments

Comments
 (0)