Skip to content

KostasValeckas/BigfootSightings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bigfoot Sightings

Authors: Andreas Hove Rising | fbr426, Victor Lynge Skogø | pld452, Kostas Valeckas | cpf125

This repository is a student project for the course 'Databases and Informations Systems' (DIS) at DIKU, University of Copenhagen, 2024.

This repository uses code from the DIS project 'GreenGroceries' as a template (link only available for course participants):

https://absalon.ku.dk/courses/72770/files/8290765?module_item_id=2330375

Initialization ✔

Clone / download repository files and run the following to install the required packages (preferably within a venv):

pip install -r requirements.txt

For Ubuntu:

We have experienced issues with installing psycopg2 on some Ubuntu distributions. If issues are encountered, try:

sudo apt-get install build-essential
sudo apt-get install python3-pip
pip3 install psycopg2

, and then rerun the pip install command above.


Create a new database in pgAdmin (or whatever you use for your postgreSQL DB managment) preferably named BigfootSightings and add the following to your .env file (NOTE: this file will likely be hidden. Normally .env should be a private file containing user secrets, in this case we have kept it inside the project files for easy access for the assigment evaluators):

SECRET_KEY=<secret_key>
DB_USERNAME=postgres || <postgres_user_name>
DB_PASSWORD=<postgres_user_password>
DB_NAME=BigfootSightings || <postgres_db_name>

Then, initiate the dabase by adding the local path to the repository in the init_db.py script in the utils directory, and then when in utils directory, run:

python3 init_db.py

Set the FLASK_APP envirorment variable to __init__.py (this you might need to do before every new session):

macOS/Linux (bash):

export FLASK_APP=__init__.py

Windows (do this from cmd rather than PowerShell due to priviledges):

set FLASK_APP=__init__.py

Finally, start serving the website with (run from the same directory as the __init__.py file):

flask run

Open you web-browser, and visit: http://127.0.0.1:5000

This procedure to launch the website has been tested on Windows 10 and Ubuntu 22.04.4 LTS, but not on any macOS distributions.

How to use the website

You can view and search any bigfoot sightings without a user.

To register a bigfoot sighting, you need to sign up for a user (right upper corner). After sign-up, you will be logged in automatically. Your user will be stored in the database, and can be re-used.

The website should be somewhat stable - but the search functionality is not tested extensively. It is very likely the website would crash for a combination of unexpected search input.

In a case where an evaluator does not suceed to launch the website, we have also made a short video presentation at this link:

Link to video in this repository

Notes on assigment formalia

You can find SQL queries being used in queries.py.

You can find regex being used in both utils/init_db.py (in cleaning up data), and in search queries in queries.py.

Disclaimer

This is a student project, focused on very limited functionality. Should you be a github by-stander that has found this code by accident, please: DO NOT HOST THIS ON A OPEN PORT. THE WEBSITE HAS MANY SAFETY FLAWS - it is made with assumption that this website would be localhosted in a closed network.

BigfootSightings is a fun idea based on a dataset from https://data.world/timothyrenner/bfro-sightings-data - it is all done in satirical fashion. The authors of this project support evidence-based science.

Graphics

Any images have been AI-generated by: https://deepai.org/machine-learning-model/text2img

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published