Friday, July 27, 2018

Fun fact about Singapore's time zone

A fun fact which I noticed, but haven't thought about until now 
According to this map, Singapore is in the "wrong" time zone: Since she's westward of VN, the time zone should be one hour lag to SG's. 
The short answer I found in the net is "Sometime in 1981, Malaysia declared that West / Peninsular Malaysia would move their clocks ahead by 30 min to match the time in use in East Malaysia (8 hrs ahead of GMT). This meant that Singapore would be in a rather awkward position in time if she didn't follow suit, especially with the amount of traffic and trade across the causeway." (https://www.quora.com/Why-do-Peninsular-Malaysia-and-Singap…
East Malay is in the same time zone as Perth.
Perth is eastward of VN, so she leads one hour.


Tuesday, June 5, 2018

Tuesday, March 20, 2018

Reading list 20/03/18

1- Shining a Light on Purchasing Power Parities
http://www.nber.org/papers/w24419.pdf
2- Income Differences and Prices of Tradables: Insights from an Online Retailer
by Ina Simonovska
http://www.nber.org/papers/w16233.pdf
3- Trying to Understand the PPPs in ICP 2011: Why Are the Results So Different?
by Angus Deaton and Bettina Aten
https://pubs.aeaweb.org/doi/pdfplus/10.1257/mac.20150153

Friday, February 16, 2018

Vietnam interactive map with R (part 2)

This is the update on the Vietnam choropleth map from the previous post. I thank Loan Vu for providing me with the VHLSS data.

This map presents average annual household income from two sources : "Employment" (primary and secondary jobs-related) and "Agriculture" (a sum of income from "Cultivation", "Animal Husbandry" and "Agricultural, Forestry and Aquaculture" sources). The total income is shown in this. The updates are:
  • I provide values converted to $US here, rather than in VND as before (although doing this disregard purchasing power parity altogether!). 
  • A toggle button to select income types, plus a legend for each variable, are added.
  • As before, map is zoom-able. The min and max zoom parameters are slightly changed.
I haven't figured out how to add more than 2 layers without significantly reduce the loading time (not that the current loading time is that impressive!). Additionally, to make it more interactive, the legends should be toggled together with the map layers. I did write a better UI with Shiny, but publishing it requires premium account for Rstudio. Hopefully I can do more tinkering in the future, maybe after finishing my studies.

Disclaimer:  The information on this map was derived from digital databases from OpenStreetMap. OpenStreetMap is open data, licensed under the Open Data Commons Open Database License (ODbL) by the OpenStreetMap Foundation (OSMF). The map tile used is licenced as CC BY-SA.  For more about copyright, please see https://www.openstreetmap.org/copyright 

Sunday, February 4, 2018

Vietnam interactive map with R

 

This is my first attempt at drawing an interactive map with leaflet, created by the Rstudio team (a nice introduction to the package, which I follow to create this map, can be found here). Quite a bit of data involved, so the map might load rather slowly.
The data are from the Vietnam Household Living Standard Survey (VHLSS), 2014 round. They are available for purchase from the Vietnam's General Statistics Office. Here I only use income data ("Muc 4"). I aggregated the multiple income sources at the household level (summing across all family members), and take the unweighted mean of income across all households surveyed in each province.

  • The gradient color scaling is based on the magnitude of the mean income from all sources. The darker the color scheme, the more affluence the average household there.
  • To see the underlying data for the provinces, hover your mouse over the corresponding provinces. Keep in mind that this is only a prototype. I'm planning to break the map into layers (each shows one category of income) and better representations.
  • Zoom in using mouse scroll or the buttons on the left. Click, hold and drag left mouse to refocus.
Feel free to contact me for details.