-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
273 lines (252 loc) · 12.2 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="description" content="Find out the best world cup games to watch, based on where your neighbors are from.">
<meta name="keywords" content="world cup, census, data, soccer">
<meta name="author" content="Rahul Bhargava, Data Culture Group, Northeastern University">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Our Cup - soccer is a window to the world</title>
<link rel="stylesheet" href="styles/bootstrap.min.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="styles/ourcup.css" type="text/css" charset="utf-8" />
<script type="text/javascript">
const OurCup = {
"data": {},
};
</script>
<script src="data/counties.js"></script>
<script src="data/teams.js"></script>
<script src="data/fixtures.js"></script>
<script src="data/recommendations.js"></script>
<script src="https://d3js.org/d3.v7.min.js"></script>
<script src="https://unpkg.com/scrollama"></script>
<script src="scripts/interaction-observer.js"></script>
<script src="scripts/scrolling.js"></script>
<script src="scripts/app.js"></script>
</head>
<body>
<header>
<div class="container">
<div class="row">
<div class="col-lg-6 offset-lg-3">
<h1>Our Cup</h1>
<p>
The World Cup is the world's biggest sporting event.
Immigrants from all the participating countries live in the US.
Take time to find out which fans lives near you -
learn about their homes, celebrate their culture, and support their businesses.
<br />
Make it <em>Our Cup</em>.
</p>
<p class="small">
(scroll for more, or <a href="#interactive">skip to the end</a>)
</p>
<div id="google_translate_element"></div>
<img src="images/scroll-down.gif" alt="scroll down" height="100">
</div>
</div>
</div>
</header>
<main>
<section id="scrolly">
<figure id="backdrop">
<div class="wrapper">
<img id="backdrop-img"/>
</div>
<div id="backdrop-caption"></div>
</figure>
<article>
<div class="step" data-step="1">
<p>
The 2023 Women’s World Cup promises to be the most global tournament yet,
with teams from eight nations (🇲🇦🇵🇦🇵🇭🇵🇹🇮🇪🇻🇳🇿🇲) making their debut on this world
stage. For many, this is a powerful chance to represent their
countries for the first time, inspiring communities back home.
</p>
</div>
<div class="step" data-step="2">
<p>
The U.S. team features many players whose families had journeyed to America in
search of opportunity, embodying a new era of diversity. Yet, the growing
strength of other nations signals that the era of U.S. dominance might be
waning -- a positive shift for the global game.
</p>
</div>
<div class="step" data-step="3">
<p>
Australia and New Zealand, co-hosts of the 2023 Women’s World Cup, bring
vibrant cultures and rising soccer ambitions to the global stage. While
fans can celebrate the hosts’ passion for sports, the tournament’s distant
time zones poses challenges for global audiences who will have to wake up
at add hours to watch the games.
</p>
</div>
<div class="step" data-step="4">
<p>
Soccer’s global reach has given new nations a chance to shine, with
emerging teams challenging traditional powerhouses like the U.S.
For immigrant communities, supporting their home or adopted countries
became a celebration of resilience and representation.
</p>
</div>
<div class="step" data-step="4">
<p>
Use the button below to find out who your neighbors are supporting.
Then get out there and taste their food, listen to their music, support their restaurants,
and learn from their home. Celebrate their cultures.
Make it <em>Our Cup</em>.
</p>
</div>
</article>
</section>
<a name="#interactive" />
<section id="interactive">
<div class="container">
<div class="row">
<div class="col-md-6 offset-md-3">
<h2>Where do you live?</h2>
<p>Find out which fans live near you and get links to their food, music, news, and when their teams are playing.<p>
<button class="btn btn-primary btn-lg" onclick="OurCup.app.handleAutodetect()">Locate Me Now</button>
or
<button class="btn btn-outline-primary btn-lg" onClick="d3.select('#manual-selection').style('display','block');return false;">Manually Pick</button>
<div id="manual-selection">
<select name="state" id="state-select" class="form-select" onChange="OurCup.app.updateCounties(this.value)">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
<option value="FL">Florida</option>
<option value="GA">Georgia</option>
<option value="HI">Hawaii</option>
<option value="ID">Idaho</option>
<option value="IL">Illinois</option>
<option value="IN">Indiana</option>
<option value="IA">Iowa</option>
<option value="KS">Kansas</option>
<option value="KY">Kentucky</option>
<option value="LA">Louisiana</option>
<option value="ME">Maine</option>
<option value="MD">Maryland</option>
<option value="MA">Massachusetts</option>
<option value="MI">Michigan</option>
<option value="MN">Minnesota</option>
<option value="MS">Mississippi</option>
<option value="MO">Missouri</option>
<option value="MT">Montana</option>
<option value="NE">Nebraska</option>
<option value="NV">Nevada</option>
<option value="NH">New Hampshire</option>
<option value="NJ">New Jersey</option>
<option value="NM">New Mexico</option>
<option value="NY">New York</option>
<option value="NC">North Carolina</option>
<option value="ND">North Dakota</option>
<option value="OH">Ohio</option>
<option value="OK">Oklahoma</option>
<option value="OR">Oregon</option>
<option value="PA">Pennsylvania</option>
<option value="RI">Rhode Island</option>
<option value="SC">South Carolina</option>
<option value="SD">South Dakota</option>
<option value="TN">Tennessee</option>
<option value="TX">Texas</option>
<option value="UT">Utah</option>
<option value="VT">Vermont</option>
<option value="VA">Virginia</option>
<option value="WA">Washington</option>
<option value="DC">Washington, DC</option>
<option value="WV">West Virginia</option>
<option value="WI">Wisconsin</option>
<option value="WY">Wyoming</option>
</select>
<select name="county" id="county-select" class="form-select" >
</select>
<button
class="btn btn-primary"
onclick="OurCup.app.updateResultsFromCounty(
d3.select('#county-select').node().value,
d3.select('#county-select').node().options[d3.select('#county-select').node().selectedIndex].text,
d3.select('#state-select').node().value); return false;">
Go
</button>
</div>
<div id="statusWrapper">
<div class="spinner-border" role="status">
</div>
<div id="status"></div>
</div>
</div>
</div>
</div>
<div id="recsWrapper">
<div class="container">
<div class="row">
<div class="col-md-6 offset-md-3">
<h2 id="recsTitle"></h2>
<p id="recsSummary"></p>
</div>
</div>
</div>
<div class="container">
<div class="row" id="countryCardWrapper">
<!-- JS code will fill in cards for countries here -->
</div>
</div>
</div>
</section>
</main>
<footer>
<div class="container">
<div class="row">
<div class="col-lg-4">
<p><b>Credits</b></p>
<p>
A project by <a target=_blank href="https://camd.northeastern.edu/faculty/rahul-bhargava/">Rahul Bhargava</a> at the
Northeastern University <a target=_blank href="http://dataculture.northeastern.edu/">Data Culture Group</a>.
</p>
<p><b>Links</b></p>
<p>
Source code on <a target=_blank href="https://github.com/dataculturegroup/our-cup">GitHub</a>.
</p>
</div>
<div class="col-lg-4">
<p><b>Caveats and Small Print</b></p>
<p>
I decided to make some simplifying assumptions throughout to make the small project work. For instance, some participating
countries are so small that the Census doesn't count them individually. For places like that I've picked a reasonable larger
category, which inflates the estimated populaton of fans for that team. This also plays out in the restaurant search and recipes,
where I similarly included regional cuisines, or well known ones, to boost the potential for a match.
</p>
</div>
<div class="col-lg-4">
<p><b>Data Sources</b></p>
<ul>
<li>Estimates of foreign-born populations are from the <a target=_blank href="http://data.census.gov/">U.S. Census American Community Survey</a>.</li>
<li>The <a target=_blank href="https://geo.fcc.gov/api/census/">FCC Census API</a> provides mapping from latitude/langitude to Census FIPS county ids.</li>
<li>Fixture lists and dates are from <a target=_blank href="https://worldcupjson">worldcupjson.net</a>.</li>
<li>Playlists are from the <a target=_blank href="https://everynoise.com/countries.html">everynoise.com genres by country</a>.</li>
<li>Resturant search is powered by <a target=_blank href="https://www.yelp.com">Yelp</a>.</li>
<li>Recipes links go to <a target=_blank href="https://yummly.com/recipes">yummly</a>.</li>
<li>Team summaries are from <a target=_blank href="https://www.theguardian.com/football/world-cup-football">The Guardian.com local experts network</a>.</li>
<li>Local news is from <a target=_blank href="https://globalvoices.org">Global Voices</a>.</li>
</ul>
</div>
</div>
</div>
</footer>
<script type="text/javascript">
OurCup.scrolling.initialize();
OurCup.app.initialize();
</script>
<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'},'google_translate_element');
}
</script>
</body>
</html>