an api that shows the most trending word int a country from twitter on a world map and translates relative tweets into English
University project for Malmö University HT2021
In order for this app to run, you'll need to create an file called "config.py" that contains all the API keys required. If you don't have those the application will not work! The keys that you will need are:
- Twitter API key(Bearer Token),
- Google Maps API key(containg access to Geocoding API, Maps JavaScript)
- Google Cloud Translation key.
You'll need to apply to each of them, be aware that the process migh take several days.
- Make sure that python --version returns version 3.8.0 or higher
- Activate the virtual env with . myenv/Scripts/activate If you get an error type: python -m venv myenv and start over with instruction no 2. If you get an error that Scrips are disabled in the system, open Windows PowerShell and make this command Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine . Answer Y (Yes) to the question and start over on instruction no 2.
- Make sure that you are in the right folder(the one closest to the code) and install the right version of Flask and requests with pip install -r requirements.txt
- Start Flask with set FLASK_APP=src/app.py , if you use PowerShell run $env:FLASK_APP = "src/app.py"
- Make sure that python --version returns version 3.8.0 or higher
- Create an virtual enviroment with python3 -m venv myenv
- Activate the virtual env with . myenv/bin/activate
- Make sure that you are in the right folder(the one closest to the code) and install the right version of Flask and requests with pip install -r requirements.txt
- Start Flask with export FLASK_APP=app.py , if you get an error you may have to add Tmap-main folder to you path. If so do this command export PATH=”$(pwd):$PATH”
Start Flask with flask run
Open the address from the console output and explore T-map!