Skip to content

Using Streamlit + Sqlite + Spatialite to make a United States Geo Guesser Game

License

Notifications You must be signed in to change notification settings

gerardrbentley/streamlit-location-guesser

Repository files navigation

Streamlit Country Guessing Game

Using Streamlit + Sqlite + Spatialite to make Geography Guessing Games

  • Open in Streamlit USA State Guessing 🇺🇸
  • Open in Streamlit International Country Guessing 🌏

Local Setup

Assumes working python installation and some command line knowledge (install python with conda guide).

Assumes working brew installation if working on mac.

Haven't tried on Windows...

Initialize codebase and dependencies

Only needs to happen once

# Download Codebase / Repository
git clone git@github.com:gerardrbentley/streamlit-location-guesser.git
cd streamlit-location-guesser
# Install python libraries or use your preferred virtualenv manager
python -m venv venv
. ./venv/bin/activate
python -m pip install -r requirements.txt

# Download Spatialite Mac
brew install spatialite-tools
# M1 Mac extra step to act like old homebrew
sudo ln -s /opt/homebrew/lib/mod_spatialite.dylib /usr/local/lib/mod_spatialite.dylib

# Download Spatialite Linux
apt-get install libsqlite3-mod-spatialite

Run the applications

  • python make_states_db.py: Will try to fetch 2021 US Census state boundaries shapefile zip and load it into a SQLite database file
  • python make_countries_db.py: Will try to take directory of World Bank World Boundaries GeoDatabase shapefiles and load it into a SQLite database file
    • This source doesn't offer obvious direct download; download via browser and unzip via file browser or command line

Data Sources

Countries of the World:

United States States:

About

Using Streamlit + Sqlite + Spatialite to make a United States Geo Guesser Game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages