Coder Social home page Coder Social logo

kharloss / streamlit_worldle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gerardrbentley/streamlit_worldle

0.0 1.0 0.0 6.04 MB

Streamlit + GeoPandas + Spatialite Geography guessing game clone of https://worldle.teuteuf.fr/

License: Apache License 2.0

Python 100.00%

streamlit_worldle's Introduction

Streamlit Worldle

Streamlit + SQLite clone of worldle

Built with โค๏ธ by gerardrbentley

What's this?

  • README.md: This Document! To help you find your way around
  • streamlit_app.py: The main app that gets run by streamlit
  • requirements.txt: Pins the version of packages needed
  • LICENSE: Follows Streamlit's use of Apache 2.0 Open Source License
  • .gitignore: Tells git to avoid comitting / scanning certain local-specific files
  • .streamlit/config.toml: Customizes the behaviour of streamlit without specifying command line arguments (streamlit config show)

Streamlit Worldle

A geography guessing game with the following rules:

  • You are given the outline of a mystery Country or Territory ๐ŸŒ
  • If you guess the correct Country then you win ๐Ÿฅณ
  • If you guess incorrectly 6 times then you lose ๐Ÿ˜”
  • Each incorrect guess will reveal information that might help you locate the mystery Country:
    • ๐Ÿ“ The distance that the center of the guess Country is away from the mystery Country
    • ๐Ÿงญ The direction that points from the guess Country to the mystery Country (on a 2D map)
    • ๐Ÿฅˆ The proximity percentage of how correct the guess was. A guess on the opposite side of the globe will be 0% and the correct guess will be 100%.

Data Sources and Caveats

  • World Bank: World Boundaries GeoDatabase
    • Provides Country and Territory shapes, locations, and names
    • Loaded into SQLite + Spatialite database (see original location guessing repository on github)
    • Some boundaries may not be precise or might include satellite territories in addition to mainland
  • ๐Ÿ“ distance is the Haversine Distance calculated based on the centroids of the Countries calculated using GeoPandas
    • Countries that share a border will NOT have 0 km distance
    • The maximum distance possible is roughly 20000 km (two points on opposite sides of the globe)
    • The proximity percentage is based on the maximum distance

Local Setup

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

# External users: download Files
git clone [email protected]:gerardrbentley/streamlit_worldle.git

# Go to correct directory
cd streamlit_worldle

# Create virtual environment for this project
python -m venv venv

# Activate the virtual environment
. ./venv/bin/activate
# .\venv\Scripts\activate for Windows

# Install required Packages
python -m pip install -r requirements.txt

# Run the streamlit app
streamlit run streamlit_app.py

Open your browser to http://localhost:8501/ if it doesn't open automatically.

Deploy

For the easiest experience, deploy to Streamlit Cloud

For other options, see Streamilt deployment wiki

Credits

This package was created with Cookiecutter and the gerardrbentley/cookiecutter-streamlit project template.

streamlit_worldle's People

Contributors

gerardrbentley avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.