Difference between revisions of "BURP Proposal"

From Geospatial Analytics and Applications
Jump to navigation Jump to search
Line 294: Line 294:
 
<br>
 
<br>
 
<h3><div style="background: #f6c630; padding: 20px; line-height: 0.3em; letter-spacing:0.1em; font-size:150%; font-weight:bold; text-align: center; margin-left: 5em; margin-right: 5em;"><font color=#000 face="Tw Cen MT">PROJECT MILESTONES</font></div></h3>
 
<h3><div style="background: #f6c630; padding: 20px; line-height: 0.3em; letter-spacing:0.1em; font-size:150%; font-weight:bold; text-align: center; margin-left: 5em; margin-right: 5em;"><font color=#000 face="Tw Cen MT">PROJECT MILESTONES</font></div></h3>
<br>[[File:BURP Milestone.png|frameless|center|1000px]]
+
<br>[[File:BURP Milestone.png|frameless|center|900px]]
 
<!-- End of Project Milestones--->
 
<!-- End of Project Milestones--->
 
<br>
 
<br>

Revision as of 22:41, 13 April 2019

BURP Logo.png

PROPOSAL

POSTER

PROJECT APPLICATION

RESEARCH PAPER


PROJECT DESCRIPTION

In recent years, the Ministry of Education (MOE) of Singapore has been appointing new mergers between schools and relocating them. This is due to an increase in Singapore aging population and declining birth rates hence, there are lesser residents that requires education services from nearby schools. These schools include primary schools, secondary schools as well as junior colleges. With the mergers and relocation of schools, this would mean lesser schools in each neighbourhood, affecting the students' accessibility to certain schools especially those in primary schools where parents need to send their children to schools. With more upcoming mergers of school by MOE, it is important for the government to know the inconvenience in terms of time and distance travelled caused by the mergers and take into consideration the accessibility of the school when making a merger decision. Thus, our team aims to provide visualisation of the schools’ accessibility to its nearby residential HDB flats through the use of several methods. Our application would be useful for government planners to derive insights on which school location is more desired by the residents to provide a better living in terms of accessibility.


Project Objectives

Our project aims to identify the schools’ accessibility from Singapore’s residential housings through public transportation (i.e. bus and MRT). This could assist MOE to take note of the schools that are of lower accessibility and take into consideration this aspect when deciding the mergers as it is a very important factor when it comes to improving residents’ standard of living. Through this project, we aim to:

  1. Identify the accessibility of HDB residential areas to each school in terms of duration and distance.
  2. Analyse and highlight the affected HDB residential areas.
  3. Provide visualisation of the residential housings’ clusters in Singapore.
  4. Building an application to project our ideas and insights obtained based on our findings.


Project Motivation

Our team have decided to take up this project topic due to several reasons. The reasons include the followings:

  1. School mergers is an on-going plan by MOE and they have been planning to further increase the mergers due to the reduce in cohort size.
  2. It is quite impactful for the current students and parents which schools have been shifted.
  3. We are curious the extent to which the current schools are accessible to residents and the number of residential housings that the school is accessible to.
  4. We would also like to know which part of the residential areas would be affected by the school mergers.



DATA PREPARATION

Calculations of HDB flats to Desired Schools

  • Obtain the distance and duration from the HDB flat to the nearest public transport, capping the maximum walking distance to 1.6 km.
  • Get the total distance and duration of the public transport of their origin to the nearest public transport of their destination. This distance and duration is computed through the use of 357 schools, 9966 HDB flats, and 3 different routes using different public transports.
  • Obtain the distance and duration from the public transport to the school. For the walking distance, we would use walking/road path as means to reach the public transport/destination.

Servers

  • Using OpenTripPlanner, we generate the different routes of the public transport on the map to get the duration and distance through running a local instance of OpenTripPlanner.

Files

  • To reduce the time taken to process and load the application, we store data that are large into R objects (i.e. rds file) that could be restored easily.


Data Sources

Data Set Format Attributes Source Link
HDB Property Information CSV
  • Block Number
  • Street
  • Residential Status
https://data.gov.sg/dataset/hdb-property-information
Postal Code Data JSON
  • Full Address
  • Block Number
  • Latitude & Longitude
  • Postal Code
  • X & Y coordinates
  • Road Name
https://docs.onemap.sg/#authentication-service-post
General Information of Schools CSV
  • School Name
  • Full Address
  • Postal Code
https://data.gov.sg/dataset/school-directory-and-information?view_id=ba7c477d-a077-4303-96a1-ac1d4f25b190&resource_id=ede26d32-01af-4228-b1ed-f05c45a1d8ee
General Transit Feed Specification API
  • MRT Stops
  • MRT Timing
  • Bus Stops
  • Bus Timing
  • Location
https://transit.land/documentation/
Singapore Geographical Details PBF
  • Location
  • Routes
https://www.interline.io/osm/extracts/


DESIGN ARCHITECTURE


Design Architecture.png
  • To generate different components of the web application (i.e. Isochrone, Hansen Accessibility, Kernel density and Data Explorer), we use different data types (i.e. RDS object, GeoJSON, and CSV) to compute.
  • The Global.R is used to load the respective libraries as well as the general data like residential data, school data and etcetera that are used throughout the application. It gets run first, even before UI.R and Server.R.
  • The UI.R is used to display the output of the functionalities of the application.
  • The Server.R is used to handle the backend and rendering of different plots and map.

METHODS

Algorithms Used

  • Calculation of the distance travelled from the HDBs to the desired school location
    • Calculation Steps:
  1. From the HDBs to the nearest bus stop, walking is assumed. The maximum walking distance that was set is at 1.6 kilometers.
  2. From the bus stop to MRT stations or other forms of public transportations. There are 3 different ways of taking public transportations.
  3. Generated RDS file to store the data of the distance from 357 schools to each point of HDBs in Singapore.
  4. Approximately 357(schools) X 9900++(number of HDBs) X 3(different routes using public transport). Note that the calculations are approximate as for different schools, the number of HDB may vary and the calculations produced by Hansen’s Accessibility Index generated are invalid/ NA.
  5. From the nearest public transport to the desired school location, the assumption is that people will walk if it is within the stated walking distance (i.e. 1.6 kilometers).
  6. If there is no connected routes or walking path, Euclidean distance is used.
  7. If there is a walking path, the path line leading to the school from the public transport is used.
  • Servers to run the web application
    • Steps to Obtain Public Transportation Timing:
  1. Get the GTFS (General Transit Feed Specification) from transit.land for the different timings of the public transportations.
  2. Go to Interline to get the Singapore’s OpenStreetMap PBF (Protocol Binary Format)
  3. Use OpenTripPlanner to plan and generate different routes of the public transport on the map. This is to get the duration and distance through running a local instance of the OpenTripPlanner.
  • Kernel Density of HDBs
  1. The kernel density measures only the density of the HDBs using 2D KDE.
  2. Set the KDE bandwidth to 250m x 250m
  3. Forming of the kernel density using contour line with the intensity of the HDBs within an area
  4. Using the polygon of the contour line to display the general duration/ distance accessibility for the Hansen’s Accessibility Index calculation later on.


Packages Used

Packages Purpose
OpenTripPlanner (OTP) API For the backend local server to retrieve the duration and distance from each HDB flats to each school
Rgeos To get HDB points within each polygon
SpatialAcc For its ac function to compute Hansen accessibility index of distance and duration respectively
GeoJSONIO To read and write GeoJSON file for the isochrone data generated
Dplyr For data manipulation functions such as select, mutate, etc
KernSmooth For 2D Binned Kernel Density Estimate to compute data for contour line
DT For displaying the data table on the web application
Sp To convert data into spatial objects
Sf To convert data into simple feature
RColorBrewer For the different colour palette of the display and polygon generated
Leaflet To display the different maps
RStudio An integrated development environment (IDE) for R
Bootstrap For UI design which goes hand in hand with R Shiny


USER INTERFACE

Isochrone

  • Users are able to see the overall time travel using public transport to the selected school.
  • They could also check the distribution chart to see the number of HDB block within the respective travelling time.
  • The bar graph in the distribution charts represents the number of HDB within the timeframe while the line graph shows the cumulative of the number of HDB within the timeframe.

User Interface Isochrone.png


Hansen Accessibility

  • Users can select to show the duration or distance accessibility of Singapore in overall as well as each specific HDB to the selected school.

User Interface Hansen Accessibility.png


Two-Dimensional Kernel Density Estimation (2D KDE)

  • Users can see the overall distribution and density of the residential HDB in a contour plot.
  • They could also see the clusters of residential HDB.

User Interface Kernel Density.png


HDB Points

  • Users are able to check it using any of the functionalities mentioned above and they could hover over any specific HDB to obtain their address.

User Interface HDB points.png

Data Explorer

  • Users can also select data table to obtain more information on the location and accessibility.
  • The location information let users choose between the residential HDB information and school information, and generate information such as the address, postal code, and X and Y coordinates based on the chosen category.
  • The accessibility information, users can choose a specific school out of the 357 schools and the table would generate all the HDB information such as the address, the duration and the distance from the HDB to the selected school.
  • Results sorted according to alphabetical order and users can use the search engine to find specific information.

User Interface Data table.png


User's Settings

Image Explanation
Display.png
Allows user to minimise the settings and shift the settings popup around.
School.png
By choosing a specific school, user can view the accessibility of residential HDB to the school under different methods and illustrations with the respective legend.
Isochrone.png
Using isochrone, users have an overview of the time needed for residents in HDB to reach the selected school through public transports. Having the legend checked, users can also interpret the accessibility through the purple colour intensity. The darker purple are areas with higher accessibility and the lighter purple are areas with lower accessibility. They can also check the residential HDB to hover over the points on the map to obtain the location detail.
Hansen Accessibility.png
Using Hansen Accessibility Index formula, users can see the overall accessibility on duration or distance from HDB to the selected school. Users are also able to interpret the intensity of accessibility through the legend, with the darker red being more accessible and light red being less accessible. Similar to isochrone, users are able to obtain the location detail by checking the residential HDB points as well.
frameless
Using Two-Dimensional Kernel Density Estimation, users can see the overall distribution and density of the residential HDB in contour plot. Based on the legend, the darker green represents higher density while the lighter green represents lower density.
Legend.png
Enable users to see the legend which shows a detailed representation of the different colour intensity of the respective methods.
Map Type.png
Allow users to select a different type of base map from the list of map types based on their own preferences.
Data.png
Users can choose to see either the data in map or table form.
Select table.png
By selecting the table, users can choose the data entries to display (i.e. Residential HDB information or School information).
Accessibility of School.png
Users can choose the targeted school that they are interested in and obtain information of the residential HDB with their corresponding duration and distance to reach the school.
Entries display.png
Users are able to select the number of entries to display in the number of 10, 25, 50 and 100.
Page.png
Users can click on the different pages to see the other entries.
Search engine.png
Under location information, it allow users to search for school name, postal code,and X and Y coordinates while for accessibility information, users can search for address, duration and distance.



PROJECT MILESTONES


BURP Milestone.png


Tasks Allocation

Iteration Week Task In-charge
1 and 2 Week 2 to 7 Idea Development and Project Proposal All
3 Week 8 Wiki Update (Project Assessment) Rebecca
4 Week 9 Data Preparation Peng Chong
5 Week 10 to 12 Application Development and Deployment Brendo and Peng Chong
6 Week 13 Poster Submission Brendo and Rebecca
7 Week 14 Final Project Paper Submission All


KEY CHALLENGES

Key Challenges Description Solution(s)
Cross Referencing of Data As there are many datasets involved, it is difficult to cross reference the data as they are of different level.
  1. Find more data online to merge connect the different data
  2. Consult prof for advise
  3. Find for packages helps to link data
Restriction of Public Api To calibrate data on routes, we used public api. However, the public api do not allow us to call more than 10,000 times.
  1. Host locally to call unlimited number of times.
Not getting disconnected for the users using the application when running the server The remote server is constrained in terms of speed and power, it isn't able to compute the large number of data on the fly.
  1. Pre-generate data for faster performance on the remote server.
Increase user experience on changes to users input Using tmap, there are various limiting factor like the inability to recenter, update current map polygons, remove existing layers without reloading.
  1. Use leaflet and leafletproxy functionality for map rendering on the application.
Slow loading even after pre-generation of data As the data for the routes is huge, over 2million rows of data and their calculation, loading everything at one go is really slow on the server.
  1. Separate the pre generation of data into chunks of data that gets loaded based on user input of school selected.
  2. Chunks of data is further broken down into different map type requested.
Collection of different distance and duration measures A person running the whole data would take a long time.
  1. Mimicking the the idea of running the task in parallel to save time.
  2. Split up the task of getting the measures by indexing the schools and each member of the team collect only the a set of measures from a set of schools allocated.
Choosing the right toolset to use to calculate the the various matrices There can be different ways of getting the distance matrix from one place to another i.e. euclidean, network as well as other considerations i.e. car route, public transport route, walking distance.
  1. Try out various methods and reduce our options into finding the most feasible, doable and reasonable method of computing and getting the matrices.


FUTURE WORKS & FEEDBACKS

After the completion of the analysis and web application, the team thought of a few potential ways that our application could improve on or work on to provide more insight. The team also obtained constructive feedback during our Town Hall poster presentation on 8th April 2019. The followings include the future works that our team can improve on or work on:

  • Getting the demand data of the school and tying accessibility with it to get more variable to quantify the importance of the school
    • Example: reputation, academic offerings, CCA offerings, school fees, and more.
  • Finding the accessibility of creating new public amenities and shopping malls.
    • This could provide insights to government or organisations on the Ideal location to have public amenities and shopping malls.
  • Having a functionality that allows users to search a specific HDB block and show the nearest top 10 schools, including primary school, secondary schools and junior college.
    • This enables residents to plan for the ideal location to stay if they have a specific school in mind.
    • On top of the functionality, add a supporting functionality that allows users to add a school and see how it changes the accessibility of the specific HDB to the nearest schools.
  • Having a functionality that allows users to find the ideal HDB for elderly and children by factoring in demographics of the residents. The ideal HDB would be based on the nearby facilities available.


REFERENCES

  1. Joshi, M (2018). Why is Singapore’s school system so successful, which factors have contributed to its success? Retrieved from https://www.msn.com/en-sg/news/singapore/why-is-singapore%E2%80%99s-school-system-so-successful-which-factors-have-contributed-to-its-success/ar-BBR9I6L
  2. Why is the Ministry of Education merging some schools? (2017) Retrieved from https://www.gov.sg/factually/content/why-is-the-ministry-of-education-merging-some-schools
  3. OpenTripPlanner Basic Tutorial (2019). Retrieved April 13, 2019 from http://docs.opentripplanner.org/en/latest/Basic-Tutorial/