-
Notifications
You must be signed in to change notification settings - Fork 0
/
index2.html
195 lines (171 loc) · 19.9 KB
/
index2.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Alan Zhao | Page 2</title>
<link rel="shortcut icon" type="image/png" href="http://alanzzhao.com/favicon.png">
<link rel="shortcut icon" type="image/x-icon" href="http://alanzzhao.com/favicon.ico">
<link href="http://alanzzhao.com/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alan Zhao Full Atom Feed" />
<link rel="stylesheet" href="http://alanzzhao.com/theme/css/screen.css" type="text/css" />
<link rel="stylesheet" href="http://alanzzhao.com/theme/css/pygments.css" type="text/css" />
<link rel="stylesheet" href="http://alanzzhao.com/theme/css/print.css" type="text/css" media="print" />
<meta name="generator" content="Pelican" />
<meta name="description" content="" />
<meta name="author" content="Alan Zhao" />
</head>
<body>
<header>
<nav>
<ul>
<li><a href="http://alanzzhao.com/">Home</a></li>
<li><a href="http://alanzzhao.com/pages/about.html">About</a></li>
<li><a href="https://linkedin.com/in/alanzzhao">LinkedIn</a></li>
<li><a href="http://stackoverflow.com/users/4967110/azhao?tab=profile">StackOverflow</a></li>
<li><a href="http://alanzzhao.com/archives">Archives</a></li>
</ul>
</nav>
<div class="header_box">
<h1><a href="http://alanzzhao.com/">Alan Zhao</a></h1>
</div>
</header>
<div id="wrapper">
<div id="content"> <h4 class="date">Aug 28, 2017</h4>
<article class="post">
<h2 class="title">
<a href="http://alanzzhao.com/resources-and-inspiration-online.rst.html" rel="bookmark" title="Permanent Link to "Resources and Inspiration Online"">Resources and Inspiration Online</a>
</h2>
<p>As much of my learning has come from online resources as from Swarthmore or Yale classrooms. This is my attempt to share some of the absolute best blogs I've encountered. They run the gamut from very technical to purely practical. I'll periodically add to this as I find more.</p>
<p><strong>Practical Business Python</strong></p>
<p><a class="reference external" href="http://pbpython.com/">http://pbpython.com/</a></p>
<p>The blog that started it all. Written by Chris Moffitt, an engineer by training but finance guy by trade, this blog is focused on showcasing how Python can take on business analysis usually left to Excel. Example topics include using pandas for pivot tables, and streamlining bulk generation of Excel reports. This blog inspired me to learn Python more deeply and provided numerous insights to automate work; at my old nonprofit we even used some posts as training material.
Most importantly of all, a conversation with Chris himself led me to the idea of creating this blog.</p>
<p><strong>Math union Programming</strong></p>
<p><a class="reference external" href="https://jeremykun.com/">https://jeremykun.com/</a></p>
<p>Written by Jeremy Kun, a math PhD turned software engineer, this blog covers a variety of mathematical topics (ie optimization, statistics, etc). What's interesting is that it is all done from a coder's perspective, focusing on intuition and programmatic examples rather than endless equations. His article on <a class="reference external" href="https://jeremykun.com/2017/06/05/formulating-the-support-vector-machine-optimization-problem/">support vector machines</a> is illustrative of this. Many of his posts has helped clarify several concepts from graduate level statistics courses I took at Yale.</p>
<p><strong>Own your bits</strong></p>
<p><a class="reference external" href="https://ownyourbits.com/">https://ownyourbits.com/</a></p>
<p>Written by a hacker "Narcho," this blog focuses on leveraging the raspberry pi as a home cloud storage solution. In other words, a DIY dropbox. A great DIY project that I did over the past winter break with a leftover portable hard drive.</p>
<p>Narcho himself is an ardent advocate of understanding all technology used in daily life, particularly the hardware side. Obviously impractical to do for everything, but an admirable mindset to drive your curiosity.</p>
<p><strong>John Myles White's Blog</strong></p>
<p><a class="reference external" href="http://www.johnmyleswhite.com/">http://www.johnmyleswhite.com/</a></p>
<p>Another blog attempting to explain statistical content in a colloquially understandable, but mathematically rigorous way. His optimization perspective on <a class="reference external" href="http://www.johnmyleswhite.com/notebook/2013/03/22/modes-medians-and-means-an-unifying-perspective/">mean, median, and mode</a> was eye-opening for me.</p>
<div class="clear"></div>
<div class="info">
<a href="http://alanzzhao.com/resources-and-inspiration-online.rst.html">posted at 09:34</a>
· <a href="http://alanzzhao.com/category/blog.html" rel="tag">Blog</a>
·
<a href="http://alanzzhao.com/tag/learning.html" class="tags">learning</a>
<a href="http://alanzzhao.com/tag/python.html" class="tags">python</a>
</div>
</article> <h4 class="date">Jul 23, 2016</h4>
<article class="post">
<h2 class="title">
<a href="http://alanzzhao.com/thoughts-on-courseras-algorithms-and-data-structures---part-1.html" rel="bookmark" title="Permanent Link to "Thoughts on Coursera's Algorithms and Data Structures"">Thoughts on Coursera's Algorithms and Data Structures</a>
</h2>
<p><strong>Motivation</strong></p>
<p>After spending the past three years largely independently learning programming with a "just make it work" mentality, I
decided in January 2016 to formalize my knowledge with an actual course. Massive open online course companies like
<a class="reference external" href="https://www.coursera.com/">Coursera</a>, <a class="reference external" href="https://edx.com/">EdX</a>, and <a class="reference external" href="http://codecademy.com">Codecademy</a> offer lots of programming courses, but the majority of these are introductory-level or
application-specific (like data-analysis with Python or web development with Ruby). I wanted something that would be a
general "next level" course but also one that I could do with Python. I talked to software engineer friends and looked at some universities' syllabi and found that the Data Structures and Algorithms topics were the standard 2nd or 3rd course.</p>
<p>Coursera had an entire 6 month <a class="reference external" href="https://www.coursera.org/specializations/data-structures-algorithms">Data Structures and Algorithms specialization</a> and it (mostly) fit before my graduate
school began so I signed up. I liked that the class would be going in-depth, with 5 separate courses and also a "capstone"
applied project. It also allowed for numerous languages (Ruby, Python 2&3, C, C++, Java) but only officially supported Java, C and Python 3 with starter files. To motivate myself further to actually complete the course, I paid the ~400 dollars to get the course verified (and for the nifty certificates on my linkedin).</p>
<p><strong>Course Structure</strong></p>
<p>Unsurprisingly, the course philosophy is learning through doing. You watch 1-2 hours of lectures, with some embedded quizzes, and then code solutions to the problem set. The solutions are submitted to a cold, inhuman grader that compiles your code and checks against 15+ test cases. There's also a discussion session to post questions and answers. The homeworks are well designed and closely follow the lectures. I did find that the coursework typically took double the amount of time estimated (6-8 vs 3-4 hours). The courses are pre-recorded and each one follows a set session. Missing one is fine as you can restart it, but you only have one full year from payment to finish the 6-month specialization.</p>
<p><strong>Learnings</strong></p>
<p><em>Testing</em></p>
<p>Learning how to design test cases and automate them was the most valuable takeaway from the course. The test cases are hidden beyond the first 3, so you need to become adept at implementing test cases to pass. Running tests manually becomes incredibly annoying, so I got much more comfortable with the assert statement. The course introduced me to the idea of testing corner cases with manually created cases, and then automated testing with random inputs (and brute-force calculated correct outputs).</p>
<p>Once I saw the time and headache save from rigorous testing, I started implementing testing at work. Prior to the course, my code base utilized integration testing not unit testing. Afterwards, I made it a team project to go back and write unit tests and the amount of blocker issues we uncovered was incredible.</p>
<p><em>Pseudocode Literacy</em></p>
<p>I never read formal pseudocode before - shocking, I know. Pseudocode was intimidating, and I just avoided it. You can't avoid it in this specialization though: the course is language-agnostic so the lingua franca is pseudocode. Every lecture has pseudocode, so every week involves translating what's conceptually laid out into code. This skill greatly increased my ability to pick up technical documentation on code-agnostic places like wikipedia.</p>
<p><em>Immediate Applicability</em></p>
<p>Algorithms and Data Structures sounded more like conceptual learnings than something helpful in my day to day at work. I was wrong about that. Learning "memoization" (giving your program memory of past results) as part of dynamic programming immediately gave me insight on how to speed up a database call that made redundant calculations. Implementing it took less than two days and cut down a query run 10x/day down from 5-10 minutes to 1-2 minutes. Sounds simple, but I had never heard of the concept before. However, because the class is general, not applications focused, you're going to need to figure out the applications yourself. I still haven't figured out applciations for all those graph algorithms or self-balancing trees.</p>
<p><strong>So What's Missing?</strong></p>
<p><em>Declining Enrollment</em></p>
<p>The course started off with high participation that gradually declined as we advanced through courses. In the first course, Algorithmic Toolkit, we had several thousand students across the world according to a live world map with student populations. The forums were active; every question I had while doing the homeworks was already asked and answered on the forums.</p>
<p>It was a different story by the third course, Algorithms on Strings. From forum activity, I estimate only several hundred people are taking this course. One question that I posted only got <10 views after several days with no response. Coincidentally, the world map showing classmate numbers is also no longer on the course side. I wish I had taken a screenshot of the original world map with student populations to prove this! The enrollment decline is expected from the increasing difficulty of the course and the extended commitment to stay on track. To be honest, I'm one of those students who's fallen behind. After completing the first two courses, I wasn't able to complete Algorithms on Strings on time and am now doing it with the second session. I hope more students regroup with me; the active discussion is key to learning.</p>
<p><em>Python's Limitations</em></p>
<p>I love Python because it's an abstracted high-level language. Unfortunately, this makes it difficult to implement many of the data structures because they don't exist natively in the language. Take the Python list object: it's easy to understand and use to build applications because of it's flexibility. The downside is that you need to simplify it or use it other ways to use it as a linked list or queue structure.</p>
<p>This lack of native support for "low-level" Python also meant a greater lack of resources than what I expected. Most supplemental resources I found outside the class were exclusively C or Java, so I relied heavily on reading pseudocode and stack overflow Python questions. A great find was this free Data Structures and Algorithms textbook written in Python. Roughly 70% of the first two courses was covered in these books.</p>
<p>After all that's said and done, I do thank Coursera for including Python as a supported course. I would never have taken on this course if it required learning a whole new language.</p>
<p>Hope this was helpful. Now on to finishing Algorithms on Strings!</p>
<div class="clear"></div>
<div class="info">
<a href="http://alanzzhao.com/thoughts-on-courseras-algorithms-and-data-structures---part-1.html">posted at 22:16</a>
· <a href="http://alanzzhao.com/category/blog.html" rel="tag">Blog</a>
·
<a href="http://alanzzhao.com/tag/python.html" class="tags">python</a>
<a href="http://alanzzhao.com/tag/learning.html" class="tags">learning</a>
<a href="http://alanzzhao.com/tag/coursera.html" class="tags">coursera</a>
<a href="http://alanzzhao.com/tag/algorithms.html" class="tags">algorithms</a>
<a href="http://alanzzhao.com/tag/data-structures.html" class="tags">data-structures</a>
</div>
</article> <h4 class="date">Jun 25, 2016</h4>
<article class="post">
<h2 class="title">
<a href="http://alanzzhao.com/national-parks-historical-attendence.html" rel="bookmark" title="Permanent Link to "National Parks Historical Attendence"">National Parks Historical Attendence</a>
</h2>
<embed>
<script type='text/javascript' src='https://public.tableau.com/javascripts/api/viz_v1.js'></script><div class='tableauPlaceholder' style='width: 1020px; height: 1033px;'><noscript><a href='#'><img alt='National Parks through Forty Years of Attendance Data ' src='https://public.tableau.com/static/images/Na/NationalParksAttendance/Story/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' width='1020' height='800' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='site_root' value='' /><param name='name' value='NationalParksAttendance/Story' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/Na/NationalParksAttendance/Story/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' /><param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' /><param name='display_count' value='yes' /><param name='showTabs' value='y' /></object></div>
</embed><p><strong>About the Visualization</strong></p>
<p>I've been a huge fan of national parks; one of my goals is to visit all 60+ of them (so far only halfway there). When I
saw that Tableau was sponsorsing a visualization competition at the <a class="reference external" href="http://www.dogooddata.com/">2016 DoGoodData conference</a>, doing something with
National Parks came to mind. The competition rules were broad: pick a social sector data set and tell a story with it.
I did a bit of digging on the <a class="reference external" href="https://www.nps.gov/">National Park Service site</a> and saw they have a significant amount of data collected on
a <a class="reference external" href="https://irma.nps.gov/Stats/">statistics subsection</a>.</p>
<p>Unfortunately the data was separated by every park and in some report-style Excel spreadsheets. I used Python to scrape, clean and aggregate the different pages data. Once I built the full dataset, I started exploring the data. I was
curious to see how attendance varied by park, how it grew over time, and how cyclical it was. My own experience visiting
parks had given me intuition about these trends (ie Grand Canyon is really popular compared to Bryce Canyon, nobody
visits Acadia in the Maine winter). These guiding questions each drove what went into each page.</p>
<p><em>Page One - Attendance by Park</em></p>
<p>Building the map of NPS sites with their dot size determined by attendance was straightforward, but the visualization
looked bland initially. I really wanted to get some kind of image of the parks - after all people love and recognize
parks for their imagery, not their data points. I wasn't sure where I could find a data source of iconic photos for each
park. I considered grabbing each park's wikipedia page, but found that their image quality varied and in some cases
their page didn't have a photo yet. I ended up with a neat solution - use each park's official NPS site. Each site had a
high-quality iconic image and I could embed the image directly into Tableau using Tableau's website embed feature. A bit
of tinkering with the dimensions and having Tableau load the page at the image's HTML class div and voila, an on demand
library of curated images.</p>
<p><em>Page Two - Visitation Growth Over 40 Years</em></p>
<p>Parks have gotten much popular since data started getting collected in 1979; almost doubling. It turned out that the
growth is concentrated in a few parks in particular: Zion, Yosemite, and Grand Canyon.</p>
<p><em>Page Three - Seasonality of Park Attendance</em></p>
<p>Each park has some sort of seasonality, here you can see what each particular park's looks like. Most follow a trend of
high attendance in summer (nice weather plus summer break) but several parks diverge from this. Some are obvious; Death
Valley has almost no visitation in the summer. Others I'm not sure about; Great Smoky Mountains peaks again in the fall
(maybe people checking out the autumn leaves?)</p>
<p>I was pleased with what came out, but it still could use a bit of polish. Overall, the data collection and visualization
building took a few days as a side project. Maybe I'll write an in-depth analysis of the data in a future blog post
with a cleaner visualization.</p>
<div class="clear"></div>
<div class="info">
<a href="http://alanzzhao.com/national-parks-historical-attendence.html">posted at 11:13</a>
· <a href="http://alanzzhao.com/category/blog.html" rel="tag">Blog</a>
·
<a href="http://alanzzhao.com/tag/data-visualization.html" class="tags">data visualization</a>
<a href="http://alanzzhao.com/tag/tableau.html" class="tags">tableau</a>
<a href="http://alanzzhao.com/tag/social-sector.html" class="tags">social sector</a>
</div>
</article>
<div class="clear"></div>
<div class="pages">
<a href="http://alanzzhao.com/index.html" class="prev_page">← Future</a>
<a href="http://alanzzhao.com/index3.html" class="next_page">Past →</a>
<span>Page 2 of 3</span>
</div>
</div>
<div class="clear"></div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-79885167-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html>