My Crime View: Web Application Dashboard for Malaysia Crime Statistics
WONG CHEE XIAN
Bachelor of Computer Science with Honors (Software Engineering)
2019
My Crime View: Web Application Dashboard for Malaysia Crime Statistics
WONG CHEE XIAN
This project is submitted in partial fulfillment of the requirements for the degree of
Bachelor of Computer Science with Honors
Faculty of Computer Science and Information Technology UNIVERSITI MALAYSIA SARAWAK
2019
i
DECLARATION OF ORIGINALITY
I hereby declare that the project with the title “MY CRIME VIEW: WEB APPLICATION DASHBOARD FOR MALAYSIA CRIME STATISTICS”
submitted by me to the Faculty of Computer Science and Information Technology, University Malaysia Sarawak (UNIMAS) is a record of an original work done by me under the guidance of Dr Stephanie Chua Hui Li.
Signed,
……….
WONG CHEE XIAN
Faculty of Computer Science and Information Technology UNIVERSITI MALAYSIA SARAWAK.
DATE:
ii
ACKNOWLEDGEMENT
I would like to express my greatest appreciation to my supervisor, Dr Stephanie Chua Hui Li for her valuable and constructive suggestions during the planning and development of this project. I am thankful for the invaluable and fruitful experiences I had gained from her through preparing and writing of the scientific papers for the project. Her guidance and encouragements had encouraged me to keep on moving forward during the project phase. I would also like to thank my examiner, Mr. Mohamad Nazri bin Khairuddin for his valuable feedback on my project. My grateful thanks are also extended to our Final Year Project Coordinator, Prof Dr. Wang Yin Chai for providing useful tips in completing my Final Year Project.
iii ABSTRACT
Crime occurrence is very common in Malaysia and is worrying to the community.
People are lack of danger awareness towards crime which can lead to fatal incident. Crime is an act that cause harm to not just individuals but also the community. No proper tools are currently available in the market for the community to be able to monitor crime statistics in Malaysia. People can only discover crime occurrence through social media or news broadcasting. Hence, a web-based application is proposed to solve this issue by providing a dashboard to monitor and track crime statistics in Malaysia. Authorized police users are provided with the feature to manage the crime database using this proposed web application as well.
Keywords: crime; dashboard; crime statistics; web application
iv ABSTRAK
Jenayah merupakan kejadian yang kerap berlaku and biasa di Malaysia. Kejadian ini telah menimbulkan rasa kebimbangan di kalangan masyarakat. Masyarakat kini kurang kesedaran bahaya terhadap jenayah di mana akan membawa kemautan kepada mereka. Jenayah merupakan suatu tindakan yang akan mengakibatkan kebahayaan terhadap bukan sahaja individu tetapi juga terhadap seluruh masyarakat. Pada masa ini, tidak wujud satu alatan yang boleh didapati di pasaran yang membolehkan masyarakat untuk memantau statistic jenayah di Malaysia. Masyarakat hanya boleh mengetahui kejadian jenayah melalui media sosial dengan siaran berita. Oleh sebab itu, suatu aplikasi web yang mempunyai fungsi papan pemuka untuk tujuan pemantauan statistic jenayah di Malaysia telah dicadangkan untuk menyelesaikan masalah ini. Pengguna polis akan diberi kuasa untuk menggunakan fungsi pengurusan pangkalan data melalui aplikasi web ini.
Kata kunci: jenayah; aplikasi web; dashboard; statistik jenayah
v
TABLE OF CONTENTS
CONTENT PAGE
DECLARATION OF ORIGINALITY……...………..i
ACKNOWLEDGEMENT………...ii
ABSTRACT………...iii
ABSTRAK………iv
TABLE OF CONTENTS……….v-ix LIST OF TABLES………...x
LIST OF FIGURES………...xi-xiii CHAPTER 1: INTRODUCTION……….1-9 1.1 Background………...…..1
1.2 Problem Statement……….2
1.3 Objectives ..………..……..………...2
1.4 Scope………...……..…3
1.5 Methodology………..……....3-5 1.5.1 Planning………...3
1.5.2 Requirement Analysis………..4
1.5.3 Design………..4
1.5.4 Implementation & Testing………4-5 1.6 Project Schedule………...……..6-7 1.7 Expected Outcome………...7
vi
1.8 Significance of Project………...8 1.9 Project Outline………....8-9
1.10 Summary………..9
CHAPTER 2: LITERATURE REVIEW………..10-24 2.1 Introduction....……….10 2.2 Review on Existing Web Application……….10-19
2.2.1 NUMBEO……….10-13 2.2.2 Seattle.gov Crime Dashboard………...13-15 2.2.3 iTindak: Data Analytic Management System for PDRM……….15-16 2.2.4 Minneapolis Police Department Crime Data………17-18 2.2.5 Metropolitan Police Crime Dashboard……….18-19 2.3 Proposed Application………..20 2.4 Comparisons Between the Reviewed Web Application………21-22 2.5 Review on Software Tools……….23-25 2.5.1 phpMyAdmin………...…..23 2.5.2 XAMPP………...24 2.5.3 Notepad++.………...24-25 2.6 Summary……….25 CHAPTER 3: REQUIREMENT ANALYSIS & DESIGN………..26-32
3.1 Introduction……….26 3.2 Methodology………..26-28 3.3 Requirement Analysis………29-30
vii
3.3.1 System Requirements………...29-30 3.3.2 Functional Requirements………..30-31 3.4 System Architecture & Design………..31-32
3.4.1 System Design………...32
3.5 Module Design………...…33-39 3.5.1 Activity Diagram………..34-39 3.5.1.1 View Heat Map………34
3.5.1.2 View Crime Statistics by Year……….35
3.5.1.3 View Crime Statistics by States………...35
3.5.1.4 View Crime Statistics by Category………..36
3.5.1.5 Login for Police User……….36-37 3.5.1.6 View Crime Record……….37
3.5.1.7 Add Crime Record………...38
3.5.1.8 Edit Crime Record………...39
3.5.1.9 Delete Crime Record………...40
3.6 Database Design………...…...41
3.7 Interface Design……….42-44 3.8 Summary………44-45 CHAPTER 4: IMPLEMENTATION………...46-62 4.1 Introduction……….…46 4.2 System Implementation………...…..46-47 4.3 Overview of System………...47-62
4.3.1 User Roles………....47-48
viii
4.3.2 Functions and Features……….48-62 4.3.2.1 Home Page Dashboard………...49-50 4.3.2.2 View Heat Map………...50-51 4.3.2.3 View Crime Statistics by State………...51-52 4.3.2.4 View Crime Statistics by Crime Groups………..52 4.3.2.5 View Crime Statistics by Crime Category………...53 4.3.2.6 Login (Police Admin) ………54-55 4.3.2.7 View Crime Record Table………..55-56 4.3.2.8 Add Crime Record………..56-58 4.3.2.9 Edit Crime Record………..58-59 4.3.2.10 Delete Crime Record………60-61 4.3.2.11 Logout (Police Admin) ………61-62 4.4 Summary………...………..62 CHAPTER 5: SYSTEM TESTING.………63-76 5.1 Introduction………...………..63 5.2 Test Strategy………...…………...63-65 5.2.1 Unit Testing………...64 5.2.2 Integration Testing………64-65 5.2.3 System Testing………...65 5.2.4 User Acceptance Testing………...65 5.3 Test Organization………...65-66 5.4 Test Result and Analysis………66-75 5.4.1 Functional Testing………66-72
ix
5.4.2 Usability Testing………..72-82 5.4.2.1 Public User……….73-78 5.4.2.2 Expert Validation.………..79-82
5.5 Summary………...………..82
CHAPTER 6: CONCLUSIONS & FUTURE WORKS.……….83-86 6.1 Introduction………...………..83
6.2 Achievement………...………...83-84 6.3 Limitations and Constraints………...……….84
6.4 Future Works..………...………84-86 6.4.1 Extend the scope of Malaysia Crime Statistics………..85
6.4.2 Dashboard with Drilldown Information……….85
6.4.3 Dynamic Dashboard with Real-time Database………..86
6.5 Summary………...………..86
REFERENCES………..87 APPENDIX………..88-91
x
LIST OF TABLES
Page
Table 1.1: Project Schedule………..6
Table 2.1: Comparisons of the Features of Existing Web Application……….…21-22 Table 3.1: Software Requirement………...30
Table 4.1: User Roles……….48
Table 5.1: Test Plan for Police Admin Login……….67
Table 5.2: Test Plan for Police Admin Logout..……….67
Table 5.3: Test Plan for Add New Crime Record……….……….68
Table 5.4: Test Plan for Update Crime Record…….……….69
Table 5.5: Test Plan for Viewing Malaysia Crime Statistics……….70-72 Table 5.6: Results for Usability of Application for Public User………..73
Table 5.7: Results for Ease of Use of Application for Public User……….74
Table 5.8: Results for Public User Satisfaction towards Application………..75
Table 5.9: Results for Usability of Application for Police Officer……...……….76-77 Table 5.10: Results for Ease of Use of Application for Police Officer……...……….74
Table 5.11: Results for Police Officer’s Satisfaction towards Application……..…....…..75
xi
LIST OF FIGURES
Figure 1.1: Gantt Chart……….7
Figure 2.1: NUMBEO Crime Dashboard 1……….11
Figure 2.2: NUMBEO Crime Dashboard 2……….12
Figure 2.3: Seattle.gov Crime Dashboard………...13
Figure 2.4: iTindak: Data Analytic Management System for PDRM……….15
Figure 2.5: Minneapolis Police Department Crime Data………17
Figure 2.6: Metropolitan Police Crime Dashboard……….19
Figure 2.7: phpMyAdmin Interface………23
Figure 2.8: XAMPP Control Panel……….24
Figure 2.9: Notepad++ Interface.………...25
Figure 3.1: Agile Methodology Phase………26
Figure 3.2: Architectural Diagram of My Crime View………..32
Figure 3.3: Use Case of My Crime View………33
Figure 3.4: View Heat Map Activity Diagram………34
Figure 3.5: View Crime Statistics by Year Activity Diagram………35
Figure 3.6: View Crime Statistics by States Activity Diagram………..35
Figure 3.7: View Crime Statistics by Category Activity Diagram……….36
xii
Figure 3.8: Login for Police User Activity Diagram………...36
Figure 3.9: View Crime Record Activity Diagram……….37
Figure 3.10: Add New Crime Record Activity Diagram……….38
Figure 3.11: Edit Crime Record Activity Diagram………39
Figure 3.12: Delete Crime Record Activity Diagram……….40
Figure 3.13: Class Diagram………41
Figure 3.14: Main Page Interface………42
Figure 3.15: Heat Map Interface………43
Figure 3.16: Crime Record Interface……….44
Figure 4.1: Home Page Dashboard………49
Figure 4.2: Hovering Over Points..………50
Figure 4.3: Heat Map………..………50
Figure 4.4: Crime Statistics by State……..……….51
Figure 4.5: Crime Statistics by Crime Groups……..……….52
Figure 4.6: Crime Statistics by Crime Category……..………..53
Figure 4.7: Home Page……..………..…………...54
Figure 4.8: Login Interface……..………...54
Figure 4.9: Crime Record Table……..………...55
xiii
Figure 4.10: Add Crime Record Form……..………..56
Figure 4.11: Record Saved Alert Message……..………57
Figure 4.12: Record Exist Alert Message……..……….58
Figure 4.13: Edit Crime Record……..………58
Figure 4.14: Record Updated Alert Message……..………59
Figure 4.15: Delete Crime Record……..………60
Figure 4.16: Record Deleted Alert Message……..……….61
Figure 4.17: Logout Alert Message……..………..61
Figure 5.1: Chart of Usability Testing for Public User………..76
Figure 5.2: Chart of Ease of Use of the Application for Public User……….77
Figure 5.3: Chart of User Satisfaction of the Application for Public User……….78
1
CHAPTER 1: INTRODUCTION 1.1 Background
Crime is defined as an action or omission which violates the law and is considered harmful to not only individuals but also the community. Such acts are forbidden, and the perpetrators are punishable by law. There is various type of crime which include murder, property theft, rape and many more. According to the crime index data compiled from over 117 countries by NUMBEO in mid of 2018, Malaysia ranks at top 20 in the world and ranks number one in South East Asia for highest crime rate (NUMBEO, 2018). Therefore, it is important that crime statistics can be monitored and presented to the community to create awareness of safety. One of the ways that these crime statistics can be disseminated to the community at large is through a web application using the dashboard presentation.
Dashboard is an information management tool that allows visual tracking, analysis and display of key performances and metrices to monitor businesses or other specific purposes. Dashboards are usually customizable to meet specific needs of the users.
Dashboards connects to databases or files and the interface displays all the data in the form of tables, graphs or charts.
Currently, there are no proper dashboards available for the community to monitor and track crime statistics in Malaysia. Dashboards available online are only focused on major cities in the world and the community in Malaysia are unable to monitor the crime statistics in their own area. They can only get to know of crime occurrences through news broadcasting and are not well aware of the crime statistics in Malaysia. Hence, this project has the purpose of designing and implementing a web application dashboard for people to monitor and keep track of yearly crime statistics in Malaysia. The community will be able
2
to view crime statistics and be alerted of the hotspot area for crimes. The dashboard is accessible by everyone who has internet access. A database will also be designed and developed to ease the police department’s data entry by providing a form interface for them to enter crime data. The data will be stored in database and dashboard will be updated accordingly.
1.2 Problem Statement
Currently, there is no proper dashboard available online that provide visualization of crime statistics in Malaysia. The community are unable to view crime statistics of their area. People can only get to know if a crime happens in their residential area through news broadcasting. Without proper statistical dashboard, people living in Malaysia are not able to monitor and view crime statistics that happen over the years. They are not being well informed and alerted on whether their area they are living is a hotspot for crime occurrence.
1.3 Objectives
The objectives of this project are to:
i. Design and implement a web application dashboard that will provide yearly statistics of crime by different states in Malaysia for the community.
ii. Create a database for storing and managing crime data for the authorized police.
3 1.4 Scope
This project aims to develop a web application dashboard for the public community and the police. The crime datasets used in this project are obtained from Malaysia’s open data portal, data.gov.my which is developed by the Malaysian Administrative Modernization and Management Planning Unit (MAMPU). The crime covers violence crime such as murder, rape and robbery while property crime involves stealing of property and property trespassing. The proposed application will be used by two types of users, the police department and the community.
1.5 Methodology
The Agile methodology is chosen to be used in the process of developing this web application as it is the most suitable methodology because the datasets will be preprocessed to the suitable format for analytics and might need to constantly change accordingly so Agile methodology is required to adhere with the immediate changes. With the Agile methodology, the tasks are divided into different time boxes to deliver each feature.
Iterative approach is taken in which the web application build is done in an incremental manner with each build delivered in iterations. Every iteration will involve planning, requirements analysis, design, coding, implementation and testing.
1.5.1 Planning
At the beginning of the project, the scope of the project is defined which is to develop a proper working web application dashboard that shows Malaysia crime statistics.
The problem statement and the objectives of the project is clearly defined.
4 1.5.2 Requirement Analysis
Requirement analysis is done by searching and collecting Malaysia crime datasets from online sources which is from data.gov.my. The datasets are compared to get the most suitable statistics to be shown as charts on the dashboard. In addition, similar dashboard applications are reviewed to discover the general requirements of a dashboard application.
1.5.3 Design
The web application architecture is created at this stage. The functions of the web application are divided into different modules to ease the development of the web application structure. The modules design which include data input functions, drop-down menus and crime index calculations are carry out one by one to assure smooth development of the web application dashboard. Interface design is also done such as chart interfaces for viewing crime statistics and form interfaces for data input. A database architecture will also be designed for data storing purposes.
1.5.4 Implementation & Testing
The web application dashboard is implemented and tested on different platforms.
Different testing methodologies are conducted:
i. Unit Testing
Each part of the web application is isolated into modules. Each module is tested when completed to show that each individual part is correct.
5 ii. Functional Testing
The various functions of the web application dashboards are tested to ensure the functions of the web application run successfully. Sample datasets are used to test on the output.
iii. Integration Testing
Integration testing will also be conducted as the functionality of the web application is divided into modules and will be tested each time the modules are integrated into the web application.
iv. System Testing
System testing will be conducted after the whole web application is completed before implemented.
6 1.6 Project Schedule
Table 1.1: Project Schedule
Task Name Duration Start Finish Predecessors Resource
Names
Project Proposal 13 days Mon 9/24/18 Wed 10/10/18 Brief Proposal 5 days Mon 9/24/18 Fri 9/28/18 Full Proposal 8 days Mon 10/1/18 Wed 10/10/18 Chapter 1: Introduction 9 days Thu 10/11/18 Tue 10/23/18 Introduction 2 days Thu 10/11/18 Fri 10/12/18 Problem Statement 1 day Sat 10/13/18 Sat 10/13/18
Objective 1 day Sun 10/14/18 Sun 10/14/18
Brief Methodology 5 days Mon
10/15/18 Fri 10/19/18
Scope 1 day Sat 10/20/18 Sat 10/20/18
Significant of the Project 1 day Sun 10/21/18 Sun 10/21/18
Project Schedule 1 day Mon
10/22/18 Mon 10/22/18 Expected Outcome 1 day Tue 10/23/18 Tue 10/23/18
Chapter 2: Literature Review 15 days Mon
10/29/18 Fri 11/16/18 Chapter 3: Methodology 17 days Sun 11/18/18 Mon 12/10/18 Submission of FYP 1 Final Report
and Paper for Assessment 25 days Tue 12/11/18 Mon 1/14/19 Chapter 4: Implementation and
Testing 60 days Mon 1/14/19 Fri 4/5/19 Chapter 5: Conclusion and Future
Works 14 days Mon 4/8/19 Thu 4/25/19
7
Figure 1.1: Gantt Chart
The project development is divided into five phases as shown in Figure 1.1. The project will start on 24 September 2018 and is expected to complete by 25 April 2019, it takes about seven months to complete this project.
1.7 Expected Outcome
The expected outcome of this project is a platform independent web application dashboard which provides visualization of Malaysia crime statistics with tabs and drop-down menus for users to view crime statistics by year or by different states in Malaysia. An interface is also provided for the Police Department to input crime data and the dashboard will be updated accordingly.
8 1.8 Significance of Project
The application can display visual output for crime statistics in Malaysia for the community. Police department can input crime data as the application provides an interface for them to enter crime details which will be stored in the database. The statistical output of the dashboard will be updated accordingly. The application will let the community keep track of and monitor crime statistics in Malaysia.
1.9 Project Outline
This thesis consists of five chapters with the content being summarized as below:
i. Chapter 1: Introduction
This chapter contains description of the background of the project. The problem statement is also defined clearly along with the scope and objectives of the project. The methodology employed in the project is also briefly presented in this chapter. The significance of the project is highlighted as well.
ii. Chapter 2: Literature Review
This chapter is about conducting research on current existing dashboard applications to visualize crime statistics. Review of literature on the functionalities of various similar applications are provided in this chapter. Comparisons between the applications are done and a combination of functionalities are proposed.
iii. Chapter 3: Methodology
Researching and analysis of various crime datasets are conducted and compared to get the most suitable statistics. General requirements for the web application are stated in