Skip to content

This is a Python application built with Streamlit to analyze and visualize mobile location data based on cell tower triangulation a subscriber may be in during different time intervals during the day. It estimates the most probable state (e.g., NY) a person was in during specific time intervals and calculates a confidence level for each estimate.

License

Notifications You must be signed in to change notification settings

saulostopa/location-estimation-app

Repository files navigation

📍 Location Estimation App

This is a Python application built with Streamlit to analyze and visualize mobile location data based on cell tower triangulation. It estimates the most probable state (e.g., NY or CT) a person was in during specific time intervals and calculates a confidence level for each estimate.

🔧 Features

  • Upload a CSV file containing geolocation data or API URL json format
  • Generate time-interval-based reports estimating the most likely state
  • Display confidence percentages for each estimate
  • Interactive map visualization
  • Filter report by selected states
  • Export results to CSV
  • Download charts (line, histogram, bar) as PNG images

📊 Sample Visuals

  • Time-based line charts of confidence levels
  • Histograms of confidence distribution
  • State frequency bar charts
  • Interactive maps with estimated positions

🧪 Project Structure

├── app.py               # Main application
├── requirements.txt     # Python dependencies
├── .gitignore           # Git ignored files
├── dataset.csv          # CSV Dataset
├── dataset.json         # JSON Dataset for external API test
└── README.md            # Documentation

📝 License

  • This project is licensed under the MIT License.

📦 Dependencies

  • Python (3.13)
  • Streamlit (>=1.32.0)
  • pandas (>=2.2.0)
  • matplotlib (>=3.8.0)
  • altair (>=5.1.0)

📁 Input File Format

The uploaded CSV file should contain at least the following columns:

  • UTCDateTime (timestamp in UTC)
  • Latitude
  • Longitude
  • State

If you want to use API URL instead of csv upload, copy and past the URL bellow to simulate an API: https://raw.githubusercontent.com/saulostopa/location-estimation-app/refs/heads/main/dataset.json

Example rows:

UTCDateTime,Latitude,Longitude,State
2021-01-05T10:15:00Z,41.123,-73.456,NY
2021-01-05T10:30:00Z,41.124,-73.457,CT

🚀 Getting Started

1. Clone the Repository

git clone https://github.com/saulostopa/location-estimation-app.git
cd location-estimation-app

2. Install Requirements

We recommend using a virtual environment:

python3.13 -m venv venv
source venv/bin/activate

On Windows:

venv\\Scripts\\activate

Install requirements

pip install -r requirements.txt

3. Run the App

streamlit run app.py

4. Open in Browser

5. Deploy on Streamlit Cloud

  • Go to https://streamlit.io/cloud
  • Log in with your GitHub account
  • Click “New app”
  • Select the repository and the main branch
  • Set app.py as the main file
  • Click “Deploy”

6. ToDo

  • Periodically extract data from a PostgreSQL database.
  • Transform and save the data in Redis (as JSON, lists, hashes or strings).
  • Redis will serve as a temporary read source, accessible via URL or public API.

About

This is a Python application built with Streamlit to analyze and visualize mobile location data based on cell tower triangulation a subscriber may be in during different time intervals during the day. It estimates the most probable state (e.g., NY) a person was in during specific time intervals and calculates a confidence level for each estimate.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages