This project is made for the local Space Apps Challenge 2024 hackathon in Gothenburg, Sweden. Our chosen challenge is called Community Mapping, where we decided to visualise data from NASA for the user to find out their most suitable place of living. The data we use includes air pollution, temperature, vegetation and population density levels all over the world. The user can set their preferences in these categories and choose the priority for each theme. Based on the user's choices and the data provided by NASA the app will find the most suitable place for this user and display it for them.
To do this we built a web app using FastAPI and a machine learning algorithm in Python for the backend, and React with Vite and Tailwind for the frontend. Our data was provided by NASA's Environmental Justice Data Search Interface (see Data Sources). The data was then standardised to have all the values in the same place for each dataset.
Clone the repository by running the following command in the terminal inside the desired folder:
git clone https://github.com/Qrutz/Space-Invading-Unicorns.git
You can install npm by running the following commands inside your repository folder:
cd client
npm i
Make sure you have Python installed before the next step!
Install and activate the data python environment defined under backend\data.yml
.
We utilized datasets provided by NASA (details in the sources below) and standardized them using the script located at backend/StandardizeDatasets.py
.
The standardized data is available for download in this Google Drive folder, under the standardizeddata
subfolder. To proceed, copy the data to the following repository path: backend/data/findnicestcity/standardized_data/
.
Subsequently, the standardized data was further refined into a concise dataset using the preprocessing algorithm in backend/data/datapreprocessing.py
.
To run the backend, run the following commands and leave the terminal running: (Make sure you are using a virtual env)
cd backend
pip install "fastapi[standard]"
fastapi dev main.py
To run the frontend, run the following commands and leave the terminal running:
cd client
npm install
npm run dev
After running both the backend and the frontend you can use the project as a web app on your browser. You can choose your preferences by sliding the slider to your preferred spot and choosing the priority of the specific filter. Once you have entered your preferences you can press the button Find a place, and the web app will show you what place in the world would be most suitable for you to live in depending on your preferences.
- Air Pollution data (Retrieved 5/10/2024)
- Temperature data (Retrieved 5/10/2024)
- Vegetation data ie. Tree Coverage (Retrieved 5/10/2024)
- Population Density data (Retrieved 5/10/2024)
- Alexander Helsing
- Stefan Ingimarsson
- Jan Lange
- Julius Lilie
- Anna Mäkinen
- Johan Sandgren