Description
Months back, a student of mine asked me an earnest question - "What do you think makes certain hawker centres work like a morning market or a supper spot?" I gave a fair response then, along the lines of how hawker centres tend to function for the neighbourhood/district it is situated in. This particular topic has been on my mind for quite a while and I always wanted to know if there are more complex factors that determine this time-sensitive function - like the relative proximity of hawker centres are to each other. Perhaps residents in this neighbourhood find more affinity in this market for morning shopping/ breakfasts because the other adjacent hawker centres tend to cater more for the office workers during the afternoon crowd? Even after I've drafted this visualization, I guess the answer still isn't as obvious, but it certainly does help me think deeper about it.
What the Code does
- Inputs NEA's KML data on Locations of Hawker Centres
- Scrapes Popular Times on Google Maps using JosiahParry/populartimes package
- Identify which Hawker Centre queries do not have Popular Times
- Find the Mode of the top Popular Times in the week to find the "Peak Timing"
- Export the information of "Peak Timing" onto a Voronoi Map (created beforehand on QGIS)
++QGIS project file to visualize it