This is a simple python flask application to help you decide where to go leisure.
The dataset used is from Wikipedia.
A sample dataset is provided in SG_Shopping_Malls.py
module.
A sample version of the application is here. View Usage for more information.
- Clone the repository
- Install the requirements
- Run the application
- Enjoy!
# Clone and cd into the repository
# Install the requirements
pip install -r requirements.txt
# Run the application
python app.py
Open the browser and go to http://localhost:5000. Main page will provide a random region and a few shopping malls in that region for you to pick.
Every refresh of the homepage will provide a new random region and shopping malls.
To choose a specific region, go to http://localhost:5000/region where region can be:
- Central
- East
- North
- North East
- North West
- West
- South
Example: http://localhost:5000/Central
To choose the amount of shopping malls to be displayed, go to http://localhost:5000/region/number where number is the amount of shopping malls to be displayed.
Example: http://localhost:5000/Central/3
Note that the number of shopping malls displayed is limited to the number of shopping malls in the dataset
This is the module that provides the random region and shopping malls. It can be used as a standalone module or as a command line tool.
usage: SG_Shopping_Malls.py [-h] [-a] [-p] [-H] [-r RANDOM] [-t]
Get a random mall in Singapore, this uses data from Wikipedia
options:
-h, --help show this help message and exit
-a, --all Show all the malls in Singapore
-p, --pretty Pretty print the dataset: SG_Shopping_Malls -p -a
-H, --human Human readable printing: SG_Shopping_Malls -H -r 3
-r RANDOM, --random RANDOM
RANDOM = Number of malls to get: SG_Shopping_Malls -r 3
-t, --test Test the Shopping_Mall class
A docker image is provided in the repository. To run the docker image, run the following command:
docker image build -t go_where .
docker run -d -p 5000:5000 --name go_where go_where:latest