Damage Assessment Tweet
Damage Assessment Tweet
Fall-2021
Supervised By
Dr. M Shahid Iqbal Malik
1
PROJECT REPORT
NUMBER OF
Version V 1.0 MEMBERS 3
MEMBER’S SIGNATURES
Supervisor’s Signature
APPROVAL CERTIFICATE
Committee Signatures:
Supervisor: __________________________
DECLARATION
We, hereby, declare that “No portion of the work referred to, in this project has been submitted in
support of an application for another degree or qualification of this or any other university/institute
or other institution of learning”. It is further declared that this undergraduate project, neither as a
whole nor as a part thereof has been copied out from any sources, wherever references have been
provided.
MEMBER’S SIGNATURES
ACKNOWLEDGEMENTS
The completion of this project could not have been possible without the participation and assistance
of a lot of individuals contributing to this project. However, we would like to express our deep
appreciation and indebtedness to our teachers and supervisors for their endless support, kindness,
and understanding during the project duration.
Above all, we would like to thank the Great Almighty for always having his blessing on us.
Table of Contents
1 Introduction ................................................................................................................................................... 9
1.1 Project Introduction............................................................................................................................... 9
1.2 Existing Examples / Solutions .............................................................................................................. 9
1.3 Business Scope .................................................................................................................................... 10
1.4 Useful Tools and Technologies ........................................................................................................... 10
1.5 Project Work Break Down .................................................................................................................. 11
1.6 Project Timeline .................................................................................................................................. 13
1.7 Abbreviations............................................................................................................................................ 13
2 Requirement Specification and Analysis .................................................................................................... 14
2.1 Requirement Specification .................................................................................................................. 14
2.2 Functional Requirements .................................................................................................................... 14
2.3 Non-Functional Requirements ............................................................................................................ 16
2.4 System Use Case Modeling ................................................................................................................ 16
2.5 Use Case1 Title: .................................................................................................................................. 17
2.5.1 Train model Usecase Description ............................................................................................... 17
2.5.2 Test Model Usecase Description ................................................................................................. 18
3 System Design ............................................................................................................................................ 20
3.1 Layer Definition .................................................................................................................................. 20
3.1.1 Presentation layer ........................................................................................................................ 20
3.1.2 Business logic Layer ................................................................................................................... 20
3.2 System Design Diagrams .................................................................................................................... 20
3.2.1 High Level Design ...................................................................................................................... 20
3.2.2 System Sequence Diagrams ........................................................................................................ 21
3.3 Flow Chart........................................................................................................................................... 23
3.3.1 Select dataset flowchart............................................................................................................... 25
3.3.2 Select disaster flowchart ............................................................................................................. 25
3.3.3 Select features flowchart ............................................................................................................. 26
3.3.4 Select Preprocessing Technique flowchart ................................................................................. 27
3.3.5 Select Machine Learning model flowchart ................................................................................. 28
3.3.6 Select Evaluation Metrics flowchart ........................................................................................... 29
3.3.7 Select Validation technique flowchart ........................................................................................ 30
3.3.8 Save Model flowchart ................................................................................................................. 30
3.4 Architecture Diagram .......................................................................................................................... 32
3.5 User Interface Design .......................................................................................................................... 33
3.5.1 Homepage interface .................................................................................................................... 33
List of Figures
Figure 1: Work Breakdown Structure ............................................................................................. 12
Figure 2 : Project Timeline ............................................................................................................. 13
Figure 3: Usecase Diagram ............................................................................................................. 16
Figure 4: Train Model SSD ............................................................................................................. 22
Figure 5: Test Model SSD............................................................................................................... 23
Figure 6: Flowchart ......................................................................................................................... 24
Figure 7: Select dataset flowchart ................................................................................................... 25
Figure 8: Select Disaster flowchart ................................................................................................. 25
Figure 9: Select Feature Extraction flowchart ................................................................................ 26
Figure 10: Select preprocessing technique flowchart ..................................................................... 27
Figure 11: Select ML model flowchart ........................................................................................... 28
Figure 12: Select Evaluation metrics flowchart .............................................................................. 29
Figure 13: Select validation technique flowchart ............................................................................ 30
Figure 14: Save Model flowchart .................................................................................................... 31
Figure 15: Architecture Diagram .................................................................................................... 32
Figure 16: Homepage interface ....................................................................................................... 33
Figure 17: Display dataset page interface ....................................................................................... 33
Figure 18: Select dataset interface .................................................................................................. 34
Figure 19: View dataset interface ................................................................................................... 34
Figure 20: Feature extraction interface ........................................................................................... 35
Figure 21: Preprocessing interface .................................................................................................. 35
Figure 22 Train model interface ...................................................................................................... 36
Figure 23 Test model interface ....................................................................................................... 36
Figure 24 about us interface ............................................................................................................ 37
List of Tables
Table 1: Functional Requirements .................................................................................................. 14
Table 2: Non-Functional Requirements .......................................................................................... 16
Table 3: Train Model Usecase Description ..................................................................................... 17
Table 4: Test Model Usecase Description ...................................................................................... 18
Table 5: Layer Definition ................................................................................................................ 20
Table 6: Homepage testcase ............................................................................................................ 86
Table 7: Select train model testcase ................................................................................................ 86
Table 8: Select dataset testcase 1 .................................................................................................... 87
Table 9: Select dataset testcase 2 .................................................................................................... 87
Table 10: Select disaster testcase .................................................................................................... 88
Table 11: View dataset .................................................................................................................... 89
Table 12: Feature Extraction testcase1 ........................................................................................... 89
Table 13: Feature Extraction testcase2 ........................................................................................... 90
Table 14: Preprocessing technique .................................................................................................. 90
Table 15: ML Model testcase .......................................................................................................... 91
Table 16: Evaluation Metrics testcase1 ........................................................................................... 92
Table 17: Validation Technique testcase 1 ..................................................................................... 92
Table 18: Validation Technique testcase 2 ..................................................................................... 93
Table 19: Display results ................................................................................................................. 93
1 Introduction
Damage assessment is the method involved with deciding the area, nature, and seriousness of harm
supported by people in general and private areas after a disaster. The typical damage assessment
estimates the losses and the impacts of those losses on the affected individuals and communities.
These days, Twitter has become better known among clients for imparting data, particularly during
disasters. Twitter provides situational information on a wide range of social activities that are
helpful during crisis events such as earthquakes, floods, cyclones, wildfire, etc. Identifying tweets
related to the target event during a disaster is a challenging task. During and in the aftermath of a
disaster people post sentiment tweets along with situational tweets (e.g., sympathies for those
affected) are also posted. These tweets are not much useful in damage assessment. There are only
a few works focused on detecting the damage assessment tweets. For damage assessment, in our
project, we use three features which are the low-level lexical features, top-most frequency word
features, and syntactic features.
We will be using a hierarchical clustering approach for classifying our data. There will be two types
of categories in which tweets are divided that are: Binary Labels and Multi-Valued Labels. In binary
labels, there are two labels that are Damage Assessment and Non-Damage Assessment. Multi-
Valued Labels include three labels Human Damage Assessment, Infrastructure Damage
Assessment, and Non-Damage Assessment.
Most of the existing works only focused on general categories of disaster tweets like informative
and non-informative. These works focus on disaster-related tweets but not on the sub-category of
tweets such as infrastructure damage, human damage. E.g.: AIDR, AIDR is a free and open-source
software that automatically collects and classifies tweets that are posted during humanitarian crises.
Some works focused on damage assessment from social media that uses only imagery data but not
text data. The drawback of this works is it gives information only about the infrastructure damage,
but it does not provide information on the human damage (i.e. injured or dead people, missing,
trapped, or found people). E.g.: Rapid Damage Assessment Using Social Media Images by
Combining Human and Machine Intelligence - An automatic image processing system that analyzes
the usefulness of social media imagery content to perform rapid damage assessment (infrastructure)
during a real-world disaster.
https://arxiv.org/pdf/2004.06675.pdf
Some of the approaches work only for regional language e.g. Italian tweets but do not work for
English language tweets. Some methods are also required to give the keywords manually to identify
the damage assessment tweets. E.g.: A Linguistically driven Approach to Cross-Event Damage
Assessment of Natural Disasters from Social Media Messages - This work focuses on the analysis
of Italian social media messages for disaster management
https://dl.acm.org/doi/10.1145/2740908.2741722
We are making a web application to identify damage assessment tweets. To achieve our goal we
will train different Machine Learning models. We will be using Python language to create models.
For the backend, we will use Django and for the frontend, we will use Angular.
1.7 Abbreviations
Tra i n m o d e l
Use r
Te st m o d e l
15. User saves the model. 16. System notifies that model is
saved successfully.
3 System Design
The purpose of this chapter is to provide information that is complementary to the development
phase. Without an adequate design, that delivers required function as well as quality attributes,
the project will fail. However, communicating architecture to its stakeholders is as important a
job as creating it in the first place.
Layers Description
design does not focus on the details of how the pieces of the application will work. Those details
can be worked out later during low-level design and implementation.
sd sd
System
User
SelectDataset(dataset)
:DatasetSelected
SelectDisaster(dataset)
:DisasterSelected
:FeaturesSelected
:TechniqueSelected
:TechniqueSelected
:ModelSelected
:EvaluationMetricSelected
:TechniqueSelected
RequestTrainModel()
:ModelTrained
ViewResult()
:DisplayResult
RequestSaveTrainedModel()
:TrainedModelSaved
System
User
:
T rai nedModel Sel ected
EnterUnseenData()
:
Di spl ayPredi ctedCl assLabel
Start
End
Select features
Train model
End
Select
View Dataset Select Validation
Preprocessing
technique technique
Figure 6: Flowchart
Select Dataset
Start End
Crisis MMD
dataset
One disaster
Select Disaster
Start End
All disasters
Top frequency
features
Select Features
Start End
Syntactic features
All features
Punctuation
symbols removal
Unknown words
removal
Numerals Removal
Start End
Lower case
conversion
All techniques
Random forest
Select ML model
End
Start
Support Vector
Machine
User can selects either one or more than one option from following;
1. Accuracy
2. Precision
3. Recall
4. F-measure
5. All metrics
Accuracy
Precision
Recall
Start End
F-measure
All metrics
Start End
Hold-out method
Dataset name
Disaster name
Feature names
Preprocessing
technique name
Save Model
Weighting
Start technique name
End
ML Model name
Evaluation metrics
values
Validation technique
name
Presentation Layer
User Interface
Business Logic
Sav e Model
Database Layer
Database
3.5.9 About us
4 Software Development
4.1 Coding Standards
4.1.1 Indentation
Proper code indention is used in this project. The indentation of blocks of code enhances
readability, understandability and hierarchy of lines of code.
4.1.2 Declaration
In this project we have used one declaration per line is to increase clarity and better
understanding of code. Following is the order of declaration:
All the widgets have been imported at the beginning.
The sequence of class variables is: First public, protected then private.
Instance variables follow the sequence: First public then private instance variables.
Then class constructors are declared with proper names.
Class methods are grouped by functionality rather than by scope or accessibility to make
reading and understanding the code easier.
Declarations for local variables are only at the beginning of code after importing
packages and libraries
While implementing this project, we have used words from Natural Language (English) to
properly assign understandable names to classes, variables and methods. Such as Requests,
DocumentCollection, BasicInformation etc. instead of un-understandable names like myc
method, a1, b1 etc.
Mixed case is used to make names readable with lower case letters in general capitalizing the
first letter of class names and interface names.
import nltk
import numpy as np
import pandas as pd
import os
import re, string, unicodedata
from nltk.corpus import stopwords
from collections import Counter
def remove_punctuation(twt):
punctuations = string.punctuation
NewCol=[]
no_punct = ""
for char in str(twt):
if char not in punctuations:
no_punct = no_punct + char
else :
no_punct = no_punct + "
return no_punct
def remove_number(tweet):
def remove_stopwords(words):
def remove_wordsLESS3(tweet):
def remove_non_ascii(words):
def remove_username(tweet):
def remove_URL(tweet):
tweet = tweet.split(" ")
new_words = []
for word in tweet:
new_word =re.sub(r"http\S+", "", word)
new_words.append(new_word)
def cleanTweet(alltweet):
newtweet= []
tweet = remove_stopwords(tweet)
tweet = remove_username(tweet)
tweet = remove_punctuation(tweet)
tweet = remove_number(tweet)
tweet = remove_wordsLESS3(tweet)
newtweet.append(tweet)
return newtweet
import string
import numpy as np
import pandas as pd
import string
import os
import sys
import io
def countLen(col):
tweet_len = []
return tweet_len
def countVerb(col):
verb_cont=[]
count=0
count = count + row.count("V")
verb_cont.append(count)
return verb_cont
def countPronoun(col):
Pronoun_count = []
count=0
count = count + row.count("O")
Pronoun_count.append(count)
return Pronoun_count
CommonNoun_count = []
count=0
count = count + row.count("N")
CommonNoun_count.append(count)
return CommonNoun_count
def countAdverb(col):
Adverb_count = []
count=0
count = count + row.count("R")
Adverb_count.append(count)
return Adverb_count
def countAdjective(col):
Adjective_count = []
count=0
count = count + row.count("A")
Adjective_count.append(count)
return Adjective_count
def countInterjection(col):
Interjection_count = []
count=0
count = count + row.count("!")
Interjection_count.append(count)
return Interjection_count
def countDeterminer(col):
Determiner_count = []
count=0
count = count + row.count("D")
Determiner_count.append(count)
return Determiner_count
def countURL(col):
URL_count = []
count=0
count = count + row.count('U')
URL_count.append(count)
return URL_count
def countAbbreviations(col):
abbr_count = []
count=0
count = count + row.count('G')
abbr_count.append(count)
return abbr_count
def countPrePost(col):
prePost_count = []
return prePost_count
def countNominalVerbal(col):
NominalVerbal_count = []
return NominalVerbal_count
tweet_length = countLen(DF.iloc[:,PosCOL])
Determiners_Count = countDeterminer(DF.iloc[:,PosCOL])
Verbs_Count = countVerb(DF.iloc[:,PosCOL])
Pronouns_Count = countPronoun(DF.iloc[:,PosCOL])
NominalVerbal_Count = countNominalVerbal(DF.iloc[:,PosCOL])
URLs_Count = countURL(DF.iloc[:,PosCOL])
Noun_Count = countCommonNoun(DF.iloc[:,PosCOL])
Adverb_Count = countAdverb(DF.iloc[:,PosCOL])
Adjective_Count = countAdjective(DF.iloc[:,PosCOL])
Abbreviation_count= countAbbreviations(DF.iloc[:,PosCOL])
Interjection_count = countInterjection(DF.iloc[:,PosCOL])
PrePost_count = countPrePost(DF.iloc[:,PosCOL])
DF.insert(len(DF.columns),"tweet_length",tweet_length)
DF.insert(len(DF.columns),"Determiners_Count",Determiners_Count)
DF.insert(len(DF.columns),"Verbs_Count",Verbs_Count)
DF.insert(len(DF.columns),"Pronouns_Count",Pronouns_Count)
DF.insert(len(DF.columns),"NominalVerbal_Count",NominalVerbal_Count)
DF.insert(len(DF.columns),"URLs_Count",URLs_Count)
DF.insert(len(DF.columns),"Noun_Count",Noun_Count)
DF.insert(len(DF.columns),"Adverb_Count",Adverb_Count)
DF.insert(len(DF.columns),"Adjective_Count",Adjective_Count)
DF.insert(len(DF.columns),"Unknown_count",Abbreviation_count)
DF.insert(len(DF.columns),"Interjection_count",Interjection_count)
DF.insert(len(DF.columns),"PrePost_count",PrePost_count)
return DF
def Unique_word(List):
new_set = set()
for tweet in List:
for item in tweet.split(" "):
if item != " " and item != "":
new_set.add(item)
return list(new_set)
all_tweet_frequncy = []
for tweet in all_tweet:
tweet = tweet.split(" ")
single_tweet=[]
all_tweet_frequncy.append(single_tweet)
NEWDF=pd.DataFrame(all_tweet_frequncy)
NEWDF.columns=col_name
return NEWDF
disaster= sheet[23:-14]
print("\n ",disaster,"\n ")
df=pd.read_csv("../../"+sheet,low_memory=False)
allTweet = df.loc[:,"tweet_text"]
allTweet = cleanTweet(list(allTweet))
print(allTweet)
all_unique = Unique_word(allTweet)
4.4.2.1 Index.html
</head>
<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu u-menu-dropdown u-offcanvas u-menu-1">
<div class="menu-collapse" href="#">
</div>
</nav>
</header>
<section class="u-align-center u-clearfix u-image u-section-1"
id="carousel_00ee" >
</body>
</html>
4.4.2.3 Dataset.html
</nav>
</header>
<section class="u-align-center u-clearfix u-image u-section-2" id="sec-d531"
data-image-width="1600" data-image-height="900">
<div class="u-clearfix u-sheet">
<h1 class="u-text u-text-body-alt-color u-title u-text-1">DataSet</h1>
<h3 class="u-text u-text-body-alt-color u-text-default u-text-
2">Dataset</h3>
<h3 class="u-text u-text-body-alt-color u-text-3">Disaster</h3>
<div class="u-align-center u-border-1 u-border-grey-90 u-custom-color-1 u-
form u-radius-50 u-form-1">
<form id="form" action="#" method="POST" class="u-clearfix u-form-custom-
backend u-form-horizontal u-form-spacing-19 u-inner-form" style="padding: 33px;"
source="custom" name="form" redirect-url="299242952" redirect-
address="dataSet.html" redirect="true">
<div class="u-form-group u-form-select u-form-group-1">
<label for="select-57b6" class="u-form-control-hidden u-
label"></label>
<div class="u-form-select-wrapper">
<select id="select-57b6" name="select" class="u-border-1 u-border-
grey-30 u-input u-input-rectangle">
<option class="mmd" value="mmd">Select Dataset</option>
<option class="mmd" value="mmd">Crisis MMD</option>
<option class="nlp" value="nlp">Crisis NLP</option>
</select>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="12"
version="1" class="u-caret"><path fill="currentColor" d="M4 8L0 4h8z"></path></svg>
</div>
</div>
<div id="form" class="u-form-group u-form-select u-form-group-2">
<label for="select-6ab7" class="u-form-control-hidden u-
label"></label>
<div class="u-form-select-wrapper">
<select id="MMD" type="dropdown" name="select-1" class="u-border-1
u-border-grey-30 u-input u-input-rectangle" required="required"
autofocus="autofocus">
<option id="data" value="Disaster">Select Disaster</option>
<option id="data1" value="California Wildfires">California
Wildfires</option>
</div>
</div>
</form>
</div>
<a href="Feature_Extraction.html" class="u-active-palette-2-base u-border-
2 u-border-black u-btn u-btn-round u-button-style u-custom-color-1 u-radius-50 u-
text-black u-text-hover-white u-btn-2"><span class="u-icon"></span>Next
</a>
<a href="ViewDataSetCFWF.html" id="btn_CFWF" class="u-border-2 u-border-
black u-btn u-btn-round u-button-style u-custom-color-1 u-radius-50 u-text-hover-
custom-color-1 u-btn-3" >View Dataset<span style="font-size:
1.125rem;"></span></a>
</div>
</section>
<footer class="u-align-center u-clearfix u-footer u-grey-80 u-footer" id="sec-
e74c"><div class="u-align-left u-clearfix u-sheet u-sheet-1">
<p class="u-text u-text-default u-text-1">Muhammad Omer Sahid<br>
Bse183117
</p>
<p class="u-text u-text-default u-text-2">Afifa Arif <br>Bse183101
</p>
<p class="u-text u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>
</body>
</html>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#NLP').hide();
$('#btn_data2').hide();
$('#btn_CFWF').hide();
$('#select-57b6').change(function(){
var sv = $(this).val();
switch(sv){
case 'mmd':
$('#NLP').hide();
$('#MMD').show();
break;
case 'nlp':
$('#NLP').show();
$('#MMD').hide();
break;
}
})
$('#MMD').change(function(){
var sv2 = $(this).val();
switch(sv2){
case 'California Wildfires':
$('#btn_CFWF').show();
$('#btn_data2').hide();
break;
default:
$('#btn_data2').hide();
$('#btn_CFWF').hide();
break;
}
})
$('#NLP').change(function(){
var sv3 = $(this).val();
switch(sv3){
case 'Pakistan Earthquake':
$('#btn_CFWF').hide();
$('#btn_data2').show();
break;
default:
$('#btn_data2').hide();
$('#btn_CFWF').hide();
break;
}
})
});
</script>
</nav>
</header>
<section class="u-align-center u-clearfix u-section-1" id="sec-f9aa">
<div class="u-clearfix u-sheet u-sheet-1">
<h3 class="u-align-left u-text u-text-default u-text-1">Dataset
: Crisis MMD</h3>
<h3 class="u-align-left u-text u-text-default u-text-
2">Disaster: California Wildfires</h3>
<div class="container">
<div class="table-responsive">
<h1 align="center">California Wildfires 2017</h1>
<br />
<div align="center">
<!-- <button type="button" name="load_data" id="load_data" class="btn
btn-info">Load Data</button> -->
</div>
<br />
<a href="Datasets.html" class="u-btn u-btn-round u-button-style u-
hover-palette-1-light-2 u-palette-1-base u-radius-2 u-btn-1"> Back
</a>
<a href="Feature_Extraction.html" class="u-btn u-btn-round u-button-
style u-hover-palette-1-light-2 u-palette-1-base u-radius-2 u-btn-
2">Next </a>
<div id="employee_table">
</div>
</div>
</div>
<script>
$(document).ready(function(){
// $('#load_data').click(function(){
// });
$.ajax({
url:"california_wildfires.csv",
dataType:"text",
success:function(data)
{
var employee_data = data.split(/\r?\n|\r/);
var table_data = '<table class="table table-bordered table-striped">';
for(var count = 0; count<employee_data.length; count++)
{
var cell_data = employee_data[count].split(",");
table_data += '<tr>';
for(var cell_count=0; cell_count<cell_data.length; cell_count++)
{
if(count === 0)
{
table_data += '<th>'+cell_data[cell_count]+'</th>';
}
else
{
table_data += '<td>'+cell_data[cell_count]+'</td>';
}
}
table_data += '</tr>';
}
table_data += '</table>';
$('#employee_table').html(table_data);
}
});
});
</script>
4.4.2.7 Dataset.html
</nav>
</header>
<section class="u-align-center u-clearfix u-image u-section-2" id="sec-d531"
data-image-width="1600" data-image-height="900">
<div class="u-clearfix u-sheet">
<h1 class="u-text u-text-body-alt-color u-title u-text-1">DataSet</h1>
<h3 class="u-text u-text-body-alt-color u-text-default u-text-
2">Dataset</h3>
<h3 class="u-text u-text-body-alt-color u-text-3">Disaster</h3>
<div class="u-align-center u-border-1 u-border-grey-90 u-custom-color-1 u-
form u-radius-50 u-form-1">
<form id="form" action="#" method="POST" class="u-clearfix u-form-custom-
backend u-form-horizontal u-form-spacing-19 u-inner-form" style="padding: 33px;"
source="custom" name="form" redirect-url="299242952" redirect-
address="dataSet.html" redirect="true">
<div class="u-form-group u-form-select u-form-group-1">
<label for="select-57b6" class="u-form-control-hidden u-
label"></label>
<div class="u-form-select-wrapper">
<select id="select-57b6" name="select" class="u-border-1 u-border-
grey-30 u-input u-input-rectangle">
<option class="mmd" value="mmd">Select Dataset</option>
<option class="mmd" value="mmd">Crisis MMD</option>
<option class="nlp" value="nlp">Crisis NLP</option>
</select>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="12"
version="1" class="u-caret"><path fill="currentColor" d="M4 8L0 4h8z"></path></svg>
</div>
</div>
<div id="form" class="u-form-group u-form-select u-form-group-2">
</div>
</div>
</form>
</div>
</div>
</section>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#NLP').hide();
$('#btn_data2').hide();
$('#btn_CFWF').hide();
$('#select-57b6').change(function(){
var sv = $(this).val();
switch(sv){
case 'mmd':
$('#NLP').hide();
$('#MMD').show();
break;
case 'nlp':
$('#NLP').show();
$('#MMD').hide();
break;
}
})
$('#MMD').change(function(){
var sv2 = $(this).val();
switch(sv2){
case 'California Wildfires':
$('#btn_CFWF').show();
$('#btn_data2').hide();
break;
default:
$('#btn_data2').hide();
$('#btn_CFWF').hide();
break;
}
})
$('#NLP').change(function(){
var sv3 = $(this).val();
switch(sv3){
case 'Pakistan Earthquake':
$('#btn_CFWF').hide();
$('#btn_data2').show();
break;
default:
$('#btn_data2').hide();
$('#btn_CFWF').hide();
break;
}
})
});
</script>
4.4.2.9 PakistanEarthquake.html
</nav>
</header>
<section class="u-align-center u-clearfix u-section-1" id="sec-f9aa">
<div class="u-clearfix u-sheet u-sheet-1">
<h3 class="u-align-left u-text u-text-default u-text-1">Dataset
: Crisis NLP</h3>
<h3 class="u-align-left u-text u-text-default u-text-
2">Disaster: Pakistan Earthquake</h3>
<div class="container">
<div class="table-responsive">
<h1 align="center">Pakistan Earthquake 2013</h1>
<br />
<div align="center">
</div>
<br />
<a href="Datasets.html" class="u-btn u-btn-round u-button-style u-
hover-palette-1-light-2 u-palette-1-base u-radius-2 u-btn-1"> Back
</a>
<script>
$(document).ready(function(){
$.ajax({
url:"Pakistan_eq_CF.csv",
dataType:"text",
success:function(data)
{
var employee_data = data.split(/\r?\n|\r/);
var table_data = '<table class="table table-bordered table-striped">';
for(var count = 0; count<employee_data.length; count++)
{
var cell_data = employee_data[count].split(",");
table_data += '<tr>';
for(var cell_count=0; cell_count<cell_data.length; cell_count++)
{
if(count === 0)
{
table_data += '<th>'+cell_data[cell_count]+'</th>';
}
else
{
table_data += '<td>'+cell_data[cell_count]+'</td>';
}
}
table_data += '</tr>';
}
table_data += '</table>';
$('#employee_table').html(table_data);
}
});
});
</script>
4.4.2.11 FeaturesExtraction.html
</nav>
</header>
if($(".checkbox").length == $(".checkbox:checked").length) {
$("#checkbox-d2bf").prop("checked", true);
} else {
$("#checkbox-d2bf").prop("checked", false);
}
});
});
</script>
</form>
</div>
</section>
<script type="text/javascript">
$(document).ready(function(){
$('#form :checkbox').change(function(){
if($(this).is(':checked')){
$("#btn_next").show();
// $("#btn_back").show();
}
else{
$("#btn_next").hide();
// $("#btn_back").hide();
}
})
});
</script>
<script>
var selectedValue = document.getElementById("form").value;
</script>
4.4.2.13 PreProcessing.html
</nav>
</header>
if($(".checkbox").length == $(".checkbox:checked").length) {
$("#checkbox-d2bf").prop("checked", true);
} else {
$("#checkbox-d2bf").prop("checked", false);
}
});
});
</script>
</form>
</div>
<a href="Train_Model.html" id="btn_next" style="display: none;" class="u-
btn u-button-style u-custom-color-1 u-radius-50 u-text-black u-text-hover-white u-
btn-2">Next</a>
<a href="Feature_Extraction.html" id="btn_back" class="u-btn u-button-style
u-custom-color-1 u-radius-50 u-text-black u-text-hover-white u-btn-2">Back</a>
</div>
</section>
<script type="text/javascript">
$(document).ready(function(){
$('#form :checkbox').change(function(){
if($(this).is(':checked')){
$("#btn_next").show();
// $("#btn_back").show();
}
else{
$("#btn_next").hide();
// $("#btn_back").hide();
}
})
});
</script>
</body>
<script>
var selectedValue = document.getElementById("form").value;
</script>
</html>
4.4.2.15 TrainModel.html
</nav>
</header>
if($(".checkbox").length == $(".checkbox:checked").length) {
$("#checkbox-ff36").prop("checked", true);
} else {
$("#checkbox-ff36").prop("checked", false);
}
});
});
</script>
<a href="Some_Massage_TeeHee.html" id="btn_train" style="display: none;"
class="u-btn u-button-style u-custom-color-1 u-radius-50 u-text-black u-text-hover-
white u-btn-4">Train</a>
<a href="Display_Results.html" id="btn_next" style="display: none;"
class="u-btn u-button-style u-custom-color-1 u-radius-50 u-text-black u-text-hover-
white u-btn-5">View Results</a>
<a href="Pre-Processing.html" id="btn_back" class="u-btn u-button-style u-
custom-color-1 u-radius-50 u-text-black u-text-hover-white u-btn-2">Back</a>
<!-- <a href="Weighted_Method.html" data-page-id="782507417" id="btn_back"
class="u-border-none u-btn u-btn-round u-button-style u-custom-color-1 u-radius-50
u-btn-2">Back</a> -->
</div>
</section>
<script type="text/javascript">
$(document).ready(function(){
$('#form1 :radio').change(function(){
if($(this).is(':checked')){
$("#btn_next").show();
// $("#btn_back").show();
$("#btn_train").show();
}
else{
$("#btn_next").hide();
// $("#btn_back").hide();
$("#btn_train").hide();
}
})
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#form2 :radio').change(function(){
if($(this).is(':checked')){
$("#btn_next").show();
// $("#btn_back").show();
$("#btn_train").show();
}
else{
$("#btn_next").hide();
// $("#btn_back").hide();
$("#btn_train").hide();
}
})
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$('#form3 :checkbox').change(function(){
if($(this).is(':checked')){
$("#btn_next").show();
// $("#btn_back").show();
$("#btn_train").show();
}
else{
$("#btn_next").hide();
// $("#btn_back").hide();
$("#btn_train").hide();
}
})
});
</script>
</body>
</html>
Code
<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu u-menu-dropdown u-offcanvas u-menu-1">
<div class="menu-collapse" href="#">
</div>
</nav>
</header>
<section class="u-align-center u-clearfix u-image u-section-1"
id="carousel_00ee" >
</body>
</html>
4.4.2.17 TestModel.html
</div>
</nav>
</header>
</form>
</div>
<a href="" class="u-btn u-button-style u-custom-color-1 u-radius-50 u-text-
black u-text-hover-white u-btn-2">Predict</a>
<a href="index.html" data-page-id="782507417" class="u-btn u-button-style
u-custom-color-1 u-radius-50 u-text-black u-text-hover-white u-btn-2">Go Back</a>
</div>
</section>
4.4.2.19 AboutUs.html
</li></ul>
</div>
</nav>
</header>
</span>
</p>
<a href="index.html" data-page-id="782507417" class="u-border-none u-btn
u-btn-round u-button-style u-custom-color-1 u-radius-50 u-btn-2">Back</a>
</div>
</div>
</section>
</body>
</html>
5 Software Testing
This chapter provides a description about the adopted testing procedure. This includes the selected
testing methodology, test suite and the test results of the developed software.
The test cases are done manually without the use of any tool.
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Home page Test ID: 1
Version: 1 Test Type: Black Box Testing
Input
Expected Output
Actual Output
Page displayed
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Train model Test ID: 2
Version: 1 Test Type: Black Box Testing
Input
Expected Output
Actual Output
Datasets displayed.
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Select Dataset Test ID: 3
Version: 1 Test Type: Black Box Testing
Input
Expected Output
Actual Output
Dataset selected
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Expected Output
Actual Output
Dataset selected
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Select disaster Test ID: 5
Version: 1 Test Type: Black Box Testing
Input
Expected Output
Actual Output
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: View dataset Test ID: 6
Version: 1 Test Type: Black Box Testing
Input
Expected Output
Actual Output
Dataset displayed
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply features extraction technique Test ID: 7
Version: 1 Test Type: Black Box Testing
Input
Expected Output
Actual Output
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply features extraction technique Test ID: 8
Version: 1 Test Type: Black Box Testing
Input
Expected Output
Actual Output
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply preprocessing technique Test ID: 9
Expected Output
Actual Output
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply ML model Test ID: 10
Version: 1 Test Type: Black Box Testing
Input
Expected Output
Actual Output
Random forest model applied on selected dataset and user will be able to select evaluation
metrics method.
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply Evaluation metrics Test ID: 11
Version: 1 Test Type: Black Box Testing
Input
Select Accuracy
Expected Output
Actual Output
Accuracy method applied on selected dataset and user will be able to select validation
technique.
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply Validation technique Test ID: 12
Version: 1 Test Type: Black Box Testing
Input
Expected Output
Actual Output
10-fold cross method applied on dataset and user will be able to train the model.
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply Validation technique Test ID: 13
Version: 1 Test Type: Black Box Testing
Input
Expected Output
Actual Output
Hold-out method applied on dataset and user will be able to train the model.
Expected Exception
Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Display Result Test ID: 14
Version: 1 Test Type: Black Box Testing
Input
Expected Output
Actual Output
Result displayed.
Expected Exception