-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex_module.html
More file actions
273 lines (218 loc) · 11.3 KB
/
index_module.html
File metadata and controls
273 lines (218 loc) · 11.3 KB
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>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Title for the page -->
<title>Data Science Homework Portfolio</title>
<link rel="stylesheet" href="portfolio.css">
<script src="https://cdn.jsdelivr.net/npm/vega@5.22.1"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@5.2.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6.20.8"></script>
<script src="https://d3js.org/d3.v7.min.js"></script>
</head>
<body>
<h1> Data Science Homework Portfolio</h1>
<h3 style="text-align: left"> <a href="/Regional_Inequality/"> ⧉ Final Project</a> </h3>
<section>
<div class="graphDesc">
<h2> Embedding Two Charts </h2>
<h3> Week 1 </h3>
<summary> The first chart shows how Korea's population has rapidly aged, and how it is expected to continue doing
so. The second chart shows how, simultaneously, Korea's population is expected to decline.
</br>
</summary>
</div>
<div class="weekFigures">
<figure id="week1fig1"> </figure>
</br>
<figure id="week1fig2"> </figure>
</div>
</section>
<section>
<div class="graphDesc">
<h2> Financial Times Replication </h2>
<h3> Week 2 </h3>
<summary> The first chart is a recreation of a chart from <i>'IMF bailouts hit record high as global economic outlook worsens. </i> The values in the first have been converted from IMF SDRs to USD. In the second, total borrowing is shown relative to total holdings.
<p> <b>Riskiest Year:</b> Perhaps counterintuitively, I think the most risky years were in the early 2000s (e.g. 2003) when lending was greatest relative to holdings.</p>
<p class='dataSource'>Analysis Worksheet: <a href="/week2/IMF_converted.xlsx">IMF_converted.xlsx</a></p>
</summary>
</div>
<div class="weekFigures">
<figure id="week2fig1"> </figure>
<figure id="week2fig2"> </figure>
</div>
</section>
<section>
<div class="graphDesc">
<h2> Inline Data Objects and Visual Encodings </h2>
<h3> Week 3 </h3>
<summary>
In these two figures, I visualise related emissions data. The first is cross-sectional, showing the relationship between GDP Per Capita and emissions. The second shows multiple timeseries, illustrating trends in consumption emissions.
<p> <b>Differences in Encodings: </b> The second uses a temporal versus quantitive encoding, with a line marker. I chose this as trends in emmisions are important in understanding the climate-crisis. </p>
<p class='dataSource'>Google Colab: <a href="https://colab.research.google.com/drive/13UnfzSsVEC5qj8X8f8VeFEzE89mBKsJB?usp=sharing">week3_proc.ipynb</a> | </p>
</summary>
</div>
<div class="weekFigures">
<figure id="week3fig1"> </figure>
<figure id="week3fig2"> </figure>
</div>
</section>
<section>
<div class="graphDesc">
<h2> Data Scraping </h2>
<h3> Week 4 </h3>
<summary>
This figure shows the edit history of selected wikipedia pages.
<p> <b>Why Wikipedia?: </b> Wikipedia acts for many as a gateway to concepts and information. Seeing edit
frequency can help us understand changes in popular understanding. </p>
<p class='dataSource'>Google Colab: <a href="https://colab.research.google.com/drive/1ltXv0F3IQkk4_oKolZZxXHSpwdbilQbC?usp=sharing
">WikiEditScraping.ipynb</a> </br> Data: <a href="https://raw.githubusercontent.com/FM-ds/FM-ds.github.io/main/week4/wiki_edits.csv
">wiki_edits.csv</a></p>
</summary>
</div>
<div class="weekFigures">
<figure id="week4fig1"> </figure>
</div>
</section>
<section>
<div class="graphDesc">
<h2> ONS Dashboard </h2>
<h3> Week 5 </h3>
<summary>
Nine time series showing api fetched data with programmatically generated vega-lite json files.
<p class='dataSource'>Google Colab: <a href="https://colab.research.google.com/drive/1Qf76i8m3Y3Mnj3D5XcbIrNpLZwtzI4Ho?usp=sharing
">ons_dashboard.ipynb</a></p>
</summary>
</div>
<div class="weekFigures">
<figure>
<div class="grid">
<div id="onsFig1"></div>
<div id="onsFig2"></div>
<div id="onsFig3"></div>
<div id="onsFig4"></div>
<div id="onsFig5"></div>
<div id="onsFig6"></div>
<div id="onsFig7"></div>
<div id="onsFig8"></div>
<div id="onsFig9"></div>
</div>
</div>
</figure>
</section>
<section>
<div class="graphDesc">
<h2> Maps </h2>
<h3> Week 7 </h3>
<summary>
Two maps of Bristol's wards.
<p> <b>What My Map Shows: </b> My map shows free school meal rates for schools in each of Bristol's wards.
This is often used as an indicator of socio-economic status. </p>
<p class='dataSource'>Data: <a href="https://opendata.bristol.gov.uk/explore/dataset/wards/information/
">Wards</a> </br> <a href="https://opendata.bristol.gov.uk/explore/dataset/free-school-meals-in-bristol/information/?disjunctive.ward_name&disjunctive.year
">free-school-meals-in-bristol</a> </br>
</p>
</summary>
</div>
<div class="weekFigures">
<figure id="week7fig1"> </figure>
<figure id="week7fig2"> </figure>
</div>
</section>
<section>
<div class="graphDesc">
<h2> Festival of Economics: Audio Charts </h2>
<h3> Week 8 </h3>
<summary>
<b> Argument: </b>At the Big Data Event, <a href="https://www.tizianaalocci.com">Tiziana Alocci</a> briefly spoke about the 'exciting' potential of combining audio and visualization. This inspired me to try and represent some data through audio.
<p> <b> Finding: </b> Positively, on the audio chart, time is mapped to time: an advantage. However, interaction takes longer. I believe the potential is exciting however. </p>
<p> I chose to use trade war data, representing rounds of tarrifs through tones of different volumes presented on a prototype created with d3 and then conventionally with Vega.</p>
<p class='dataSource'>
Audio Chart Source:<b> <a href="week8/audioChart.js">audiochart.js</a> </b> </br>
Data (Adapted From): <a href="https://www.scmp.com/economy/china-economy/article/3146489/us-china-trade-war-timeline-key-dates-and-events-july-2018/
">US-China trade war timeline</a> </br> <b> Data: </b> <a href="week8/data.csv
">data.csv</a> </br>
</p>
</summary>
</div>
<div class="weekFigures">
<figure id="week8fig1"> </figure>
<figure id="audioChart"> </figure>
</div>
</section>
<section>
<div class="graphDesc">
<h2> Advanced Charts </h2>
<h3> Week 9 </h3>
<summary>
For this task, I combined UN life expectency data with WHO marternal mortality and OECD healthcare spending data to produce a bubble chart and a connected scatter chart. Both are interactive.
<p class='dataSource'>colab: <a href="https://colab.research.google.com/drive/1o7yoQksnk-gBvrAi0vbQ7wzNFkX5CyRi?usp=sharing
">week9_proc.ipynb</a>
</p>
</summary>
</div>
<div class="weekFigures">
<figure id="week9fig1"> </figure>
<figure id="week9fig2"> </figure>
</div>
</section>
<section>
<div class="graphDesc">
<h2> Machine learning - Supervised </h2>
<h3> Weeks 10-11 </h3>
<summary>
<b>Hypothesis 1: </b> There is a negative relationship between first differenced (one year changes) healthcare expenditure and maternal mortality. It may not be linear.
<p class='dataSource'> <b>Conclusion 1: </b> The first figure shows a very weak negative relationship between changes in expenditure and mortality - likely showing effects of spending are not instantaneous.</p>
<p class='dataSource'>colab: <a href="https://colab.research.google.com/drive/1zPcLTCLdNr6QPb8B3agyHFIEHYRhgyPY?usp=sharing
">ml.ipynb</a>
</p>
</summary>
</div>
<div class="weekFigures">
<figure> <div>
<img id='mlFirst' src='week10/first.png'></img>
</figure></div>
<div>
</div>
</div>
</section>
<section>
<div class="graphDesc">
<h2> Machine learning - Unsupervised </h2>
<h3> Weeks 10-11 </h3>
<summary>
<p class='dataSource'> <b>Hypothesis 2: </b> The US healthcare system is an outlier among developed countries when considering spending, coverage, maternal mortality and life expectency.</p>
<p class='dataSource'> <b>Conclusion 2: </b> The US does appear to be an outlier. When countries are grouped into four clusters, the US appears alone.</p>
<p class='dataSource'>colab: <a href="https://colab.research.google.com/drive/1zPcLTCLdNr6QPb8B3agyHFIEHYRhgyPY?usp=sharing
">ml.ipynb</a>
</p>
</summary>
</div>
<div class="weekFigures">
<figure> <div>
<img id='mlSecond' src='week10/second.png'></img>
</figure></div>
<div>
</div>
</div>
</section>
<script>
vegaEmbed('#week1fig1', "week1/agingPopulation.json");
vegaEmbed('#week1fig2', "week1/decliningPopulation.json");
vegaEmbed('#week2fig1', "week2/week2first.json");
vegaEmbed('#week2fig2', "week2/week2second.json");
vegaEmbed('#week3fig1', "week3/week3.json");
vegaEmbed('#week3fig2', "week3/week3_2.json");
vegaEmbed('#week4fig1', "week4/wk4.json");
for (let i = 1; i <= 9; i++) {
vegaEmbed(`#onsFig${i}`, `week5/onsFig${i}.json`);
}
vegaEmbed('#week7fig1', 'week7/wardmap.json');
vegaEmbed('#week7fig2', 'week7/freemeals.json');
vegaEmbed('#week8fig1', 'week8/wk8.json');
vegaEmbed('#week9fig1', "week9/week9_first.json");
vegaEmbed('#week9fig2', "week9/week9_second.json");
</script>
<script src="week8/audiochart.js"></script>
</body>