<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kenton Kwok on Medium]]></title>
        <description><![CDATA[Stories by Kenton Kwok on Medium]]></description>
        <link>https://medium.com/@kwokkenton?source=rss-233e23c3e6e6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*zrxric1JyiCMVSUc</url>
            <title>Stories by Kenton Kwok on Medium</title>
            <link>https://medium.com/@kwokkenton?source=rss-233e23c3e6e6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 05:40:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kwokkenton/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[my Imperial Physics degree in a blog post?]]></title>
            <link>https://medium.com/@kwokkenton/my-imperial-physics-degree-in-a-blog-post-2be2b7851ed2?source=rss-233e23c3e6e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/2be2b7851ed2</guid>
            <category><![CDATA[imperial-college-london]]></category>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[university]]></category>
            <category><![CDATA[imperial-college]]></category>
            <category><![CDATA[science]]></category>
            <dc:creator><![CDATA[Kenton Kwok]]></dc:creator>
            <pubDate>Sun, 09 Jan 2022 16:16:24 GMT</pubDate>
            <atom:updated>2022-01-09T16:16:24.021Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are curious about what studying Physics is like in the UK then this is the post for you!</p><p>I’m currently a third year Physics student at Imperial College London. Sometimes the course specifications can be quite difficult to read and truly understand. Hopefully this will help demystify what the degree is like from the student side, and help you if you’re deciding what and where to study in the future.</p><h3>What are lecture courses in the UK like?</h3><p>Lectures are dense, 50 minutes per lecture so it is not normal to understand something completely the first time you get introduced to the concept. I’ve been to a <a href="https://summerinstitute.hku.hk/hs/">physics summer school course at the University of Hong Kong</a>, and the lecturer tends to go over more example problems to try and get you to understand. Here, you get problem sheets which you are expected to complete (or stare at in deep confusion) on your own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ap0gi5UhA6ygjqbb" /><figcaption>Photo by <a href="https://unsplash.com/@rhfhanssen?utm_source=medium&amp;utm_medium=referral">Ruben Hanssen</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What courses have I taken?</h3><p>The following is a list of the courses I have taken along with a rating of the course from me in brackets (). I’ll also give a description of the course and maybe write down something I’ve enjoyed or found interesting along with something I didn’t like. This is roughly in the order at which I’ve taken them. The starred* lecture courses were optional modules.</p><p>This list is not complete yet and will be updated as I undertake more courses!</p><h4>Year 1</h4><p>Classical Mechanics (3/5)- Forces, potentials, energy, momentum, frames of reference, rotations</p><ul><li>I found having to prove the work-energy theorem quite interesting as in secondary school I took this as fact/ for granted. This and the emphasis on derivations really reinforced how physics is about understanding fundamental principles and applying them rigorously to understand harder problems.</li><li>The lectures go through base level derivations, I’d really like to see how maybe the forces/ modelling is applied to more complex mechanics systems to put things in perspective. Or maybe this is a thing for engineers?</li></ul><p>Functions (3/5)- use of derivatives, integrals, sequences, series,</p><ul><li>Unlike the A Level further maths peeps, I have never seen a Taylor series before and so I found this course quite a bit challenging.</li><li>A mathematician taught this course, so naturally he went through a lot of theorems (mean value theorem, AM/GM inequality etc.). I thought the mathematical proofs were needed for the exams, turns out they were not! I hope I would have appreciated them more though to become a better physicist.</li></ul><p>Linear Algebra (2/5)- vectors, matrices, eigenproblems, matrix inversion, dot and cross product, differentiation of vectors</p><ul><li>The course taught me how to draw nice 3D coordinate systems!</li><li>Personally I found this course slightly dry. We went through some physical examples, such as Kepler’s second law. Would have liked to see/ visualise more of this though.</li></ul><p>Complex Analysis and Ordinary Differential Equations (3/5)- complex numbers and functions of them, first and second order ODEs</p><ul><li>Year 1 was quite mathematics heavy, we had to get the basics in. It was also quite cool actually handling differential equations</li><li>The lecturer wasn’t the most engaging at times which slightly put me off…</li></ul><p>Vibrations and Waves (5/5)- mechanical waves, forced oscillations, damping, diffraction and interference, wave equation</p><ul><li>This course was one of the few that actually had demonstrations (interesting one with two tin cans to demonstrate normal modes). This was also when I saw how complex exponentials are actually useful for a physics problem! This lecturer also gave us a good, complete set of notes from the start.</li></ul><p>Computing (2/5)- basic Python, basic numerical methods, numpy, scipy and curve fitting</p><ul><li>I knew a bit of Python beforehand so the first part was okay — until the latter parts of the specific packages used.</li><li>This was ‘lab’ based instead of lecture based. Basically we are given a Jupyter notebook to complete ourselves and though, although it might have worked, I felt a bit unsupported at times. Also would have liked to seen more on how code actually gets run.</li></ul><p>Vector Calculus (5/5)- Line integrals, Divergence, Gradient, Jacobian</p><ul><li>Super well taught, the lecturer made this mathematics course super clear and digestible</li></ul><p>Electrostatics- (5/5)- Forces and potentials, Gauss’ Law and various examples</p><p>Magnetism (5/5)- Lorentz force, motors, Faraday’s Law, Wave equation</p><ul><li>We finally got to the point where we could write down all of Maxwell’s equations! In our first year!</li><li>What surprised me that in most courses about magnetism they avoid talking about ferromagnetism! Apparently it is super hard</li></ul><p>Fourier Analysis (4/5)- Fourier series, transforms, convolutions and applications in physics</p><ul><li>Super confusing at first but this it was extremely enlightening when I found that functions can be decomposed onto a sinusoidal basis!</li><li>I felt the lectures were a bit rushed at times. Now I realise that the demonstration the lecture performed (Fourier optics) was quite relevant, but at the time I completely blanked out.</li></ul><p>Basic Electronics (4/5)- resistors, capacitors and</p><ul><li>The analogies between a LCR circuit and a damped harmonic oscillator was quite cool</li></ul><p>Optics (3/5)- more diffraction, interference, coherence, lenses</p><ul><li>A bit less theoretically oriented course</li></ul><p>Advanced Electronics* (4/5)- transistors, op amps, digital electronics, phasors, simulations, a lab project</p><ul><li>I can’t believe I wouldn’t have learnt about the transistor if I hadn’t taken this course!</li><li>Lecturer rushed the last bits. I probably didn’t appreciate the whole course without a proper exam, just some multiple choice quizzes for assessing</li></ul><p>First Year Lab (4/5)- experiments that kind supplement the course, some intro sessions and then 3 lab cycles</p><ul><li>I really liked the challenge of designing your own experiment</li><li>What annoyed me a little bit was that the experiments done were not in the order that the lecture courses were in. You could be doing something that will only be taught in Term 2. However, the lab scripts were in extreme detail with nice extensions if you have enough time.</li></ul><p>Special Relativity (1/5)- postulates, paradoxes, frames of references, Lorentz transformations, particle physics</p><ul><li>This was the first course taught remotely after the COVID-19 pandemic hit and I have to say I absolutely understood nothing XD</li></ul><p>Statistics of Measurement (2/5)- probability distributions, central limit theorem, chi², maximum likelihood estimation, bayesian vs frequentist</p><ul><li>Again a course delivered after March 2020. The lecturer basically reuploaded the lectures he delivered the previous year to Blackboard and asked us to study that. Not good at all!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wqo57e_nN8Sj6g6k" /><figcaption>Photo by <a href="https://unsplash.com/@theblowup?utm_source=medium&amp;utm_medium=referral">the blowup</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Year 2</h4><p>Differential Equations (4/5)- ordinary differential equations, partial differential equations and series solutions</p><ul><li>The most enjoyable part of this course for me was when we started doing things with problems in 2D and 3D, for example solving the heat equation analytically and solving a central potential</li></ul><p>Structure of Matter and Thermodynamics (2/5)- laws of thermodynamics, various thermodynamic potentials</p><ul><li>The limit of efficiency- the Carnot cycle was interesting to learn!</li><li>I wish that the more practical aspects can be explained again. How will these laws apply to an actual fridge, or an engine, or maybe a black hole?</li></ul><p>Quantum Physics (4/5)- basically an introduction to the quantum regime, quantisation, wave particle duality, Planck’s law, tunneling</p><p>Quantum Mechanics (4/5)- Schrödinger equation, operators, commutators, Heisenberg’s uncertainty principle, correspondence, soluble potentials</p><ul><li>Really in depth course into what forms the basis for quantum mechanics</li></ul><p>Atomic Physics (4/5)- LS coupling, atomic spectra, lineshapes, oscillator model, scattering</p><ul><li>The main takeaway here was that analytical solutions do not work when faced with systems other than the hydrogen atom and we had to start using approximations. We had an in depth look at how perturbation theory could be applied to understanding splittings.</li></ul><p>Electromagnetism (4/5)- behaviour in vacuum, boundary conditions, vector and scalar potentials, behaviour in matter, conductors insulator and plasmas, Fresnel equations</p><ul><li>Hardest bit was definitely the retarded potential and retarded time and formulating a 6 dimensional integral for obtaining the potentials in space</li></ul><p>Statistical Physics (4/5)- counting states, ensembles, Bose-Einstein and Fermi-Dirac statistics</p><ul><li>This was one of the conceptually-harder courses to grasp, but it got better towards the end when more examples were discussed.</li></ul><p>Mathematical Methods (2/5)- more complex analysis, Fourier analysis, Lagrangian and Hamiltonian mechanics</p><ul><li>Interesting mathematics, especially the part with complex numbers, sadly obscured by somewhat hard to understand explanations…</li></ul><p>Environmental Physics*- (4/5)- energy balance and models, measurement, climate action pathways</p><ul><li>This was a cool module that is extremely relevant to the world we live in today. One of the most important takeaways was quantifying the radiative forcings that each change in the parameters make. This really put things into perspective moving on from IB Geography.</li></ul><p>Second Year Lab and Computing (4/5)- 4 lab cycles</p><ul><li>Labs done remotely really take a lot away from the experience, though the projects still remained challenging. For one we were sent a circuit board and compared behaviour of lumped components with a expected behaviour of a transmission line. For another we had to simulate behaviour of radiation using GEANT-4.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lQZWbfKK-Kh3jkM_" /><figcaption>Photo by <a href="https://unsplash.com/@nasa?utm_source=medium&amp;utm_medium=referral">NASA</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Year 3</h4><p>Computational Physics</p><p>Nuclear and Particle Physics</p><p>Solid State Physics</p><p>I’ll update this in the future with more courses! To be continued…</p><h3>Conclusion</h3><p>Please let me know if there’s any additions you would like to see :)</p><p>Writing this list has been fun for myself too — it’s hard to keep perspective on your whole journey if you can’t take a breather to look back, and this has done exactly that.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2be2b7851ed2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Review: Deeplearning.ai- AI for Medical Diagnosis]]></title>
            <link>https://medium.com/@kwokkenton/review-deeplearning-ai-ai-for-medical-diagnosis-cec81931e4f7?source=rss-233e23c3e6e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/cec81931e4f7</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[coursera]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[medicine]]></category>
            <dc:creator><![CDATA[Kenton Kwok]]></dc:creator>
            <pubDate>Mon, 13 Sep 2021 19:24:02 GMT</pubDate>
            <atom:updated>2021-09-20T16:34:41.117Z</atom:updated>
            <content:encoded><![CDATA[<p>A few weeks ago I completed the AI for <a href="https://www.coursera.org/learn/ai-for-medical-diagnosis">Medical Diagnosis course</a> of the AI for Medicine Specialisation. Seeing that the course was estimated to take 20 hours only, I opted to try and finish it during the 7 day trial period. The following is a short review of what I thought of the course.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iP2rCpuiErNUzDf9Jsa8gg.png" /></figure><h3>Content</h3><p>This course goes through a number of topics, ranging from the descriptive to the technical.</p><p>It first dives into the issues faced with machine learning in medicine and gives some teasers on how to solve them. For example, a lot of medical datasets are small (10k-100k samples) because labelling samples are not easy and so this leads to the application of transfer learning. The course also goes through some practical considerations such as what happens when interobserver disagreement occurs when labelling the samples, especially in a medical context when more definitive testing can reveal the true condition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Yye9KfouVUn7B34V" /><figcaption>Photo by <a href="https://unsplash.com/@nci?utm_source=medium&amp;utm_medium=referral">National Cancer Institute</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The course uses one week to go through metrics used in model evaluation and medicine, which they emphasised to be pretty important when reading scientific papers. This includes understanding and calculating the accuracy, sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV).</p><p>Then the course goes through the deep learning applications, which I find more interesting. Two convolutional neural network architectures were introduced.</p><ul><li>Classification of diseases in Chest X-ray Images using Densenet121 architecture pre-trained on ImageNet, evaluating using ROC curve and using GradCAM for explaining the results</li><li>Multi-channel MRI Image segmentation for brain tumours using U-net architecture, tensor manipulation and the soft-dice loss</li></ul><p>The course is taught via video lectures, short readings, labs and assignments run on Jupyter notebooks. All projects were in Python, using modules such as Pandas, Tensorflow with Keras, Matplotlib, Seaborn and some custom written utilities functions.</p><h3>Pros</h3><p>The course is led by Dr Pranav Rajpurkar, a Machine Learning researcher who <a href="https://cs.stanford.edu/~pranavsr/files/thesis.pdf">wrote his thesis on this topic</a>. As a result, we get</p><ul><li>Insight into the state of the art models</li><li>References and encouragement to read relevant papers and consult other sources</li><li>An overview into the issues pertaining to machine learning in medicine</li></ul><p>More of the syllabus and what is taught can be found on the course website.</p><h3>Cons</h3><p>Even though the course material is engaging and the applications are really meaningful, I feel that the way the course is taught makes it not going into enough depth. Getting a good grasp of the subject would require an actual deeper look into the papers and the code.</p><p>The way the course has been designed makes you feel that you have accomplished a lot. Though in reality I find that the exercises are mostly simple tasks that highlight the importance of some concept, but do not give you the experience of actually doing a data science project. Code that builds the models are often pre-written for you, sometimes in an executable Jupyter notebook cell, but sometimes called from a utilities module, and pre-trained final model weights are used. This arguably has its pedagogical merits but I feel like I’m being taken on a guided tour rather than learning.</p><p>Even though the course has 4.7 stars from 1500+ ratings, I still find it useful to look into the actual reviews to see what others think. The following are the two most ‘helpful’ reviews, which have a strong critical tone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FtscD4ljKPnn_0cp1bK0WA.png" /></figure><h3>Would I recommend this course?</h3><p><strong>As someone interested in the application of machine learning in medicine, I have enjoyed this course on a whole.</strong> However, I realise that the way the course is structured doesn’t give you enough foundational skills to work on other problems. I see this course as an introductory programme, rather than an in-depth guide, and so the course probably isn’t worth its price tag — do it if you can accomplish it in one week (and you definitely can).</p><p>I have tried to understand the Chest X-ray interpretation project better by coding up a notebook in Kaggle, and effectively implementing and training it from scratch with the same approach. This was a good experience, however I was not able to get the same performance (measured by AUROC) as with the pre-trained model — much more to learn!</p><p><a href="https://www.kaggle.com/kentonkwok/chest-x-ray">Chest X-ray</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cec81931e4f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is Hong Kong facing Depopulation?]]></title>
            <link>https://medium.com/@kwokkenton/is-hong-kong-facing-depopulation-e5b2d274e42a?source=rss-233e23c3e6e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5b2d274e42a</guid>
            <category><![CDATA[hong-kong]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[immigration]]></category>
            <category><![CDATA[social-science]]></category>
            <category><![CDATA[politics]]></category>
            <dc:creator><![CDATA[Kenton Kwok]]></dc:creator>
            <pubDate>Tue, 20 Jul 2021 22:58:51 GMT</pubDate>
            <atom:updated>2021-07-20T22:58:51.581Z</atom:updated>
            <content:encoded><![CDATA[<h4>Scraping open source data to understand my hometown.</h4><p>The past two years have been particularly challenging for Hong Kong, but the decisive blow was dealt by the National Security Law (NSL), which made many residents seriously consider leaving permanently.</p><p>I have definitely heard more Cantonese being spoken on the streets of London and have seen more social media groups popping up offering a helping hand to new immigrants. The fact that increasing numbers of Hong Kongers are leaving their Covid safe-house to come to Britain, even if temporarily, shows a change of heart.</p><p>Quantifying how many people that plan to leave or have left is a difficult task. Many sombre photographs have been taken at the Hong Kong International Airport, interviews have been done to gauge public opinion, but how many people have left exactly? <a href="https://www.bloomberg.com/opinion/articles/2021-07-12/hong-kong-s-exodus-is-real-diminishing-its-appeal-as-a-financial-and-global-hub">Bloomberg Opinion</a> have looked at proxies such as the withdrawal of money from the Mandatory Provident Fund and the application for certificates of no criminal conviction, which have all increased. What I am interested in is Immigration data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H1MD2lTwgxdPAAaX" /><figcaption>Photo by <a href="https://unsplash.com/@ryanmc?utm_source=medium&amp;utm_medium=referral">Ryan McManimie</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Data Science Technicalities</h3><p>The work here is as much a Python exercise on Web-scraping and Data Visualisation as a study on Hong Kong society. Web-scraping is basically retrieving data from websites, specifically their HTML code. I wish to point out that some others have done a <a href="https://webb-site.com/dbpub/hkpax.asp">similar project</a> but I wish to go into more depth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*hmHqTUN-UCBqkQIv_12F7g.png" /><figcaption>Screenshot of the Immigration Department’s website, showing an example table of data</figcaption></figure><p>I scraped data from the <a href="https://www.immd.gov.hk/eng/">Hong Kong Immigration Department’s website</a>, where they provide daily updates on the number of passengers who have entered and left different ports in the city. Data is provided by the HK Government and the relevant rights are theirs. The <a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/">BeautifulSoup package</a> was used to parse the static HTML web table. This was done by finding all relevant cells with the <em>&lt;td&gt;</em> tag. After iterating through all the dates, I used Pandas to compile everything scraped into a dataframe and saved it as a CSV file. As web scraping takes some time, it would be more efficient to avoid redundant program runs. So, the program reads the CSV file and only scrapes dates that haven’t been accessed yet. The program also automatically skips pages that are ill-formatted.</p><p>Afterwards, I used more features from Pandas to wrangle the data into a more appropriate (long) format suitable for analysis. Previously, I have been using Matplotlib, sometimes with Seaborn, to visualise my data but this time I would like to give Plotly a go. I experimented with Plotly graph objects and Plotly Express. To embed these plots into Medium, I have chosen to use <a href="https://datapane.com/home/">DataPane</a> because it is free and simple to use!</p><h3>Exploratory Data Analysis</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G8I_cCkmFYsFbhujNJ743A.png" /><figcaption>Dataframe scraped</figcaption></figure><p>The first data record started on 24/1/2020 and the website is continually updated every day. This section focuses on data aggregated over the whole period of collection.</p><p>We note that over this whole period, that there has been a net influx of about +400,000 people. Does this immediately refute the fact that Hong Kong is facing a depopulation event? The answer is no. Even though there has been a growth of this many people, the value largely depends on the baseline we choose. Given that the dataset started to become available just before a major holiday, we should be cautious in interpreting this figure.</p><h4>Immigration Control Points</h4><p>There are 15 unique control points in Hong Kong, while 14 are only actively used. The most frequently used control points are the Airport, Shenzhen Bay and the Hong Kong-Zhuhai-Macao Bridge, in total accounting for 77% of the traffic.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fcontrol-point%2Fembed%2F&amp;display_name=Datapane&amp;url=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fcontrol-point%2F&amp;image=https%3A%2F%2Fstorage.googleapis.com%2Fdatapane-files-prod%2Fdp%2Fthumbnails%2Ffad1c721-ad0c-41dc-b2aa-93b45c7c4a1d.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=datapane" width="960" height="700" frameborder="0" scrolling="no"><a href="https://medium.com/media/a22a5cc0d408fac49be8bbd71c5ec1eb/href">https://medium.com/media/a22a5cc0d408fac49be8bbd71c5ec1eb/href</a></iframe><h4>Passenger Identity</h4><p>Passengers were grouped into three types: Hong Kong Residents, Mainland Visitors and Other Visitors, probably by the identity document presented at Immigration Clearance. The three groups accounted for 81%, 11% and 8% of the traffic respectively.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fidentity%2Fembed%2F&amp;display_name=Datapane&amp;url=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fidentity%2F&amp;image=https%3A%2F%2Fstorage.googleapis.com%2Fdatapane-files-prod%2Fdp%2Fthumbnails%2Fa1a801d9-2827-4e3b-976e-06078a27ffdf.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=datapane" width="960" height="700" frameborder="0" scrolling="no"><a href="https://medium.com/media/9e8a2757214e58bd54a106c928a63d96/href">https://medium.com/media/9e8a2757214e58bd54a106c928a63d96/href</a></iframe><h4>Combined Fluxes</h4><p>Apart from the usual bar charts above, I found the Parallel Categories graph to be quite useful in visualising the fluxes of people when combined with the checkpoint that they go through.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fsankey%2Fembed%2F&amp;display_name=Datapane&amp;url=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fsankey%2F&amp;image=https%3A%2F%2Fstorage.googleapis.com%2Fdatapane-files-prod%2Fdp%2Fthumbnails%2Fceecc8a0-3c86-4c30-b842-a0ab79b588c2.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=datapane" width="960" height="700" frameborder="0" scrolling="no"><a href="https://medium.com/media/23766a3fa1d7ae34a08395b948fb7d3b/href">https://medium.com/media/23766a3fa1d7ae34a08395b948fb7d3b/href</a></iframe><p>Something I couldn’t quite figure out was a simple way to include arrivals and departures in this graph.</p><h3>Time Series Analysis</h3><h4>Daily traffic values</h4><p>The data can be split into two regimes, pre-pandemic and post-pandemic.</p><p>During pre-pandemic times (Jan-March 2020), there was a large departure of people (~half a million people) prior to the Chinese New Year. <strong>During this time, the daily traffic of people were much higher compared to later times, because this was when governments began imposing border restrictions to curb the pandemic.</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fall-time%2Fembed%2F&amp;display_name=Datapane&amp;url=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fall-time%2F&amp;image=https%3A%2F%2Fstorage.googleapis.com%2Fdatapane-files-prod%2Fdp%2Fthumbnails%2Fcb3d2275-79cb-4f8c-b037-b4e833ddaa1d.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=datapane" width="960" height="700" frameborder="0" scrolling="no"><a href="https://medium.com/media/140faf39449cdd31a9b07b82c1a07df0/href">https://medium.com/media/140faf39449cdd31a9b07b82c1a07df0/href</a></iframe><p>After the onset of the pandemic, daily arrivals and departures were all in the low thousands. Unfortunately, I couldn’t get the graph to autoscale based on the vertical range!!</p><h4>Daily fluxes</h4><p>We see that <strong>the majority of the fluxes are driven by Hong Kong Residents.</strong> Thus, the next section will solely focus on these people. Another key insight is the periodic behaviour of fluxes from Hong Kong Residents and Mainland visitors. This may be related to the effect of holidays or the control of border restrictions.</p><p>Looking at the graphs of arrivals and departures, we see that most arrivals and departures come from Shenzhen Bay and the Airport. Note that there has recently been an increase in departures from the Airport.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fhk-arrivals-and-departures%2Fembed%2F&amp;display_name=Datapane&amp;url=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fhk-arrivals-and-departures%2F&amp;image=https%3A%2F%2Fstorage.googleapis.com%2Fdatapane-files-prod%2Fdp%2Fthumbnails%2F93b3c544-3a20-40f9-910a-ed83cc463187.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=datapane" width="960" height="700" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba43a7d75ac98d836be4a77b09c648ec/href">https://medium.com/media/ba43a7d75ac98d836be4a77b09c648ec/href</a></iframe><h4>Cumulative fluxes</h4><p>There has been an increase of Hong Kong Residents in Hong Kong until July 8 2020, after which the figure decreases. Meanwhile, the number of Mainland and Other visitors have been steadily decreasing since the start of data collection. This observation suggests that people tended to go back to their place of origin during the pandemic.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fcumulative-flux-1%2Fembed%2F&amp;display_name=Datapane&amp;url=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fcumulative-flux-1%2F&amp;image=https%3A%2F%2Fdatapane.com%2Fstatic%2Fpython_report_illustration.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=datapane" width="960" height="700" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ab735723cbcb81fd2e3ccc144253d7e/href">https://medium.com/media/5ab735723cbcb81fd2e3ccc144253d7e/href</a></iframe><p>Zooming into a more recent time period, we notice the evident departure of Hong Kong Residents from the airport. While surprisingly there has been a recent influx of people coming from Shenzhen Bay. It is important to keep in mind that someone can leave via one control point and enter in another.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fcumulative-flux-2%2Fembed%2F&amp;display_name=Datapane&amp;url=https%3A%2F%2Fdatapane.com%2Fu%2Fkwokkenton%2Freports%2Fcumulative-flux-2%2F&amp;image=https%3A%2F%2Fstorage.googleapis.com%2Fdatapane-files-prod%2Fdp%2Fthumbnails%2F80c48abf-0cd0-48ad-870c-db6be204434a.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=datapane" width="960" height="700" frameborder="0" scrolling="no"><a href="https://medium.com/media/220875d58bb9916f6a85a76fb1589593/href">https://medium.com/media/220875d58bb9916f6a85a76fb1589593/href</a></iframe><h3>Conclusions</h3><ul><li>There has been a net influx of ~400,000 people in the period 24 Jan 2020–20 Jul 2021. However, data collection began during a major holiday, so this should be interpreted with caution.</li><li>Assuming people who make trips leave and enter in the same control points, the decreasing cumulative flux of Hong Kongers coming into the airport suggests that people are leaving on a permanent or semi-permanent basis</li><li>The cumulative flux of people amounts to roughly -120,000 Hong Kongers since the implementation of the NSL. Though the actual figure of people who have left for emigration is smaller</li><li>The increasing rate of people leaving via the airport suggests that the issue has not yet been resolved</li></ul><p>With limited data due to privacy rights, we cannot know details about individual travellers and their destinations, only aggregate data. This project has been a good exercise on web scraping, pandas manipulation and data visualisation, but also has been quite insightful knowing the order of magnitudes of various arrivals and departures.</p><p>All code is on my <a href="https://github.com/kwokkenton/hongkong_immigration">GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5b2d274e42a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>