Skip to content

cathaypacific8747/geo-ia

Repository files navigation

geo-ia

DOI

This repository contains the code for my International Baccalaureate Geography Internal Assessment (May 2022 examinations).

The original paper submitted to the IBO can be downloaded here, licensed under CC BY-NC-SA 4.0.

To view main project file, resolve the missing datasets in the remarks and open the main QGIS project file here.

Abstract

With land in Hong Kong generally sold to the highest bidder, the land value is often argued to increase closer to the PLVI. By using building heights along four transects as a proxy indicator for the land value, this paper attempts to explore to what extent does Hong Kong fit this pattern, and verify whether land use models (Burgess Model, Hoyt Model, Functional Zone Model) apply.

Documentation

Apologies for the messy code - the repository is very roughly structured by the section number in the paper.

Technologies used

  • Python (pyproj, fastkml, shapely, bs4)
  • HTML, CSS, JS (ArcGIS JS API)
  • QGIS 3.20, Google MyMaps, Google Earth, KML
  • Google Sheets (Google Visualization API Query Language)
  • MS Excel, PowerPoint, Word

Section 1 - Introduction

findProperty.py calls the CentaMap API to retrieve all buildings in Hong Kong sorted by the current unit price. The separate API calls are then merged and converted to analysed.csv. The number of floors are then retrieved with a separate API.

The building geometries within a specified district code are then visualised in a KML file using master.py. Data is used for a quick pilot study.

Section 2 - Methodology

For each transect:

  1. The route is first drawn using GeoInfo Map or Google Earth to a KML file
  2. 1_separate.py automatically splits the route into regular 200m intervals with lerp, adds markers at each point, outputting it to 1_separated.kml.
  3. 2_getSurroundingBuildings.py probes for buildings in the 20m/40m vicinity of the marker, at 45° regular intervals by querying the government iB1000 HKMS database, outputting it to 2_buildings.kml.
  4. 3_getBuildingHeight_new_2.py retrieves the height (roofLevel - baseLevel), name and geometry for each building, and outputting it to 3_buildings_geometry.kml.
  5. 4_analyse.py outputs the average valid building heights to 4_analysed.csv.

The results are then compiled for all transects and visualised using a static website.

Section 3 - Data Presentation

ib1000/getStoreys.py scrapes the government's BMIS database to retrieve the registered floor count and official english name for each building. In case it fails to return the building using the name, the official address is used instead (queried with the OGCIO address lookup API).

SRCC and other coarse data manipulations are performed in a Google Sheet with QUERY() commands. Graphs are generated using MS Excel.

Section 4 - Data Presentation/Conclusion/Evaluation

The following operations are performed with QGIS:

  • KMLs that store the building geometries and average heights along the transect (see Section 2) are visualised using QgsInterpolatedLineSymbolLayer;

  • City-wide building geometries are loaded to demonstrate the role of urban design guidelines and strategic viewpoints as being a limiting factor to horizontal urban sprawl;

  • Simplified iC1000 land use data is used to demonstrate the socio-economic implications of select areas;

  • Normalised building height restriction data is extracted from the Outline Zoning Plans to demonstrate physical constraints to the building height;

  • Average household median income data matched with the corresponding regions in the PPU/SPU/TPU GML file is used to explain the disparities/outliers in the land value;

  • list of bus stops and MTR stations are filtered from the iGeoCom maps to generate their own Kernel Density Estimations (KDE) of the transport accessibility.

  • 5m DTM used is visualise the terrain in HK with a raster layer.

Remarks

The following files are compressed/missing:

  • section3/gis/shapefiles/buildings_all.zip - extract it.
  • section3/gis/shapefiles/GeoCom.zip - extract it.
  • section3/gis/shapefiles/S_buildings_geometry_old.zip - extract it.
  • section3/gis/shapefiles/W_buildings_geometry_old.zip - extract it.
  • section3/gis/iB1000.gdb - download here, relink the path in QGIS.
  • some datasets are shared with my geography EE, if there are any missing datasets follow the Remarks section in the README.