Skip to content

Latest commit

 

History

History
39 lines (22 loc) · 2.23 KB

README.md

File metadata and controls

39 lines (22 loc) · 2.23 KB

streamlit-data-viz-demo

A demo application to visualize the travel information from Google Maps Timeline using Streamlit in Python.

The demo application allows the user to interactively filter the data based on time periods. The heatmaps for the locations can also be plotted. Along with the heatmaps, there is an option to show histograms for the data points by different time periods like hour, months & years. Additionally, a specified number of random images can be obtained from Flickr images of the locations in the dataset.

Screenshot of the demo application

Installation

Install the dependencies

pip install -r requirements.txt

Instructions for Running

  1. Get the Google Maps location history from Google Takeout.

  2. Clean the data by running data_cleaning.py. It removes all data except latitude, longitude & timestamps. The data is also converted in to the standard format. A sample data file containing 10K data points is provided in this repo clean_data_sample.csv.

  3. For getting images from Flickr, you need to create an app & get the API key & secret.
    The API key & secret are stored in a .env file. Create a copy of .env.example & rename it to .env & add the values for the app secret & api key for Flickr services.

  4. Run the streamlit app using

    streamlit run travel_viz.py

    The application will run on localhost:8501 by default.

  5. To use Mapbox for the streamlit maps, please configure the settings following the documentation on Streamlit.

Screenshots

Screenshot of Map with Location Data

Screenshot of Images from Flickr

Screenshot of Heatmap

Screenshot of Histogram with Monthly Distribution