# data[].attributes.body
https://github.com/autumnlewjb/AlgorithmProject

# data[].attributes.body
1. request
To get the http request of text extracted from the articles using txtify.it api

2. bs4 (beautiful soup 4)
To extract the content in particular tags of the html of the 3 websites containing stopwords, positive words and negative words.

3. plotly
To visualize data in the form of meaningful graphs

# data[].attributes.body
https://drive.google.com/drive/folders/1FO8zLhn3imZ4v42i0Nvk07eFnVOXXH4r?usp=sharing

# data[].attributes.attachment_link.readable_text
Drive

Sign in

Drive

Name

Download

Lab Viva 1

Download

Articles

Download

Dataset details

Download

Fila Form_Team 2

Download

Group Contract_Team 2

Download

Question 3 Draft

Download

Report

Senior Fila Form.docx

WIA2005 Project Description 2021-22.docx

No files in this folder. Sign in to add files to this folder

# data[].attributes.headline
Algorithm planned to be used (String Matching)

# data[].attributes.subject
Algorithm planned to be used (String Matching)

# data[].attributes.body
1. KMP - Not doing pattern searching
2. Rabin-Karp
3. Trie - only one insertion is required and can be used infinitely for searching.

# data[].attributes.body
Steps:

1. Extract stopwords, positive words and negative words from the given website and create 3 Tries for each of them.
2. Initiate a loop to read each article while removing stopwords.
3. Create two lists for the positive words and negative words extracted to be stored in.
4. Calculate positivity for each country.
5. Plot graphs for the output
Types of graphs: Bar chart/ Table/ Pie chart

# data[].attributes.body
1.pandas

Pandas is used to extract data from dataset in the csv file given.

2.requests

Requests is used to perform HTTP GET function to get the json text from the TomTom api.

3.folium

Folium to generate an interactive html map with markers and route.

4. TomTom API

TomTom API is a free, routing api to calculate the distance of the each route and get route line.

# data[].attributes.body
1. Christofides
2. Lin Kernighan
3. 2-Opt - has lowest time complexity while giving a reasonable optimized route
4. 3-Opt
5. Greedy (not accurate enough)

# data[].attributes.body
Steps:

1. Import local centers for each country from the dataset in the csv file given
2. Call TomTom API to get the distance and route from one location to another
3. Create a distance matrix from one location to all other locations for all locations
4. Find distribution centre as the most central located store (i.e shortest total distance)
5. Run 2-Opt algorithm to optimize the delivery route
6. Create Folium Map and Plot Markers for distribution centre and other local stores
7. Draw route lines with route data from TomTom Api

# data[].attributes.body
None.
We will be using mathematics (probability) and sorting algorithm to solve problem 3.

# data[].attributes.headline
Algorithm planned to be used (Sorting Algorithm)

# data[].attributes.subject
Algorithm planned to be used (Sorting Algorithm)

# data[].attributes.body
1. Insertion Sort - simple sorting algorithm but the time complexity will be O(n^2) for most of the cases
2. Selection Sort - Time complexity for all cases is O(n^2)
3. Quicksort - Time complexity is O(n * logn) for most of the cases.

# data[].attributes.body
Steps :

1. Get the probability of a country having good economic and social condition by using the output of problem 1 (positive words, neutral words and negative words)

2.  Get the probability of a country having optimum delivery system by using the output from problem 2 (the optimum delivery distance of the countries)

3. Calculate the probability of a country to be recommended to have expansions by using the outputs got from step 1 and step 2.

4. Our idea of the formula for the calculation in step 3 is to implement the concept of probability in which we multiply the output in step 1 with the output in step 2.
(probability of a country having good economic and social condition  * probability of a country having optimum delivery system)

5. Then we modify the formula to :
[probability of a country having good economic and social condition  * ( 1 - probability of a country having optimum delivery system) ]

6. After getting the probability of a country to be recommended to have expansions, we use Quicksort algorithm to rank the countries from most recommended to least recommended.

# data[].attributes.body
https://docs.google.com/document/d/1YOruOell082uIaLPRP9sdtPolbDpcJPHOVeNKbkePEI/edit#

# data[].attributes.attachment_link.readable_text
Report

Sign in

File

Edit

View

Insert

Format

Tools

Extensions

Help

# data[].attributes.body
https://docs.google.com/document/d/1WBnyJlvlTrF_k0YDga6DM6cWxq_ELb3r/edit?usp=sharing&ouid=114076114557753338485&rtpof=true&sd=true