All Projects → alexattia → Maps Location History

alexattia / Maps Location History

Get, Concatenate and Process you location history from Google Maps TimeLine

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Maps Location History

Ds and ml projects
Data Science & Machine Learning projects and tutorials in python from beginner to advanced level.
Stars: ✭ 56 (-43.43%)
Mutual labels:  jupyter-notebook, pandas
Pandas Tutorial
Tutorial on Using Pandas
Stars: ✭ 66 (-33.33%)
Mutual labels:  jupyter-notebook, pandas
Applied Text Mining In Python
Repo for Applied Text Mining in Python (coursera) by University of Michigan
Stars: ✭ 59 (-40.4%)
Mutual labels:  jupyter-notebook, pandas
Machinelearningcourse
A collection of notebooks of my Machine Learning class written in python 3
Stars: ✭ 35 (-64.65%)
Mutual labels:  jupyter-notebook, pandas
Credit Risk Modelling
Credit Risk analysis by using Python and ML
Stars: ✭ 91 (-8.08%)
Mutual labels:  jupyter-notebook, pandas
Pandas Ta
Technical Analysis Indicators - Pandas TA is an easy to use Python 3 Pandas Extension with 130+ Indicators
Stars: ✭ 962 (+871.72%)
Mutual labels:  jupyter-notebook, pandas
Pydata Pandas Workshop
Material for my PyData Jupyter & Pandas Workshops, I'm also available for personal in-house trainings on request
Stars: ✭ 65 (-34.34%)
Mutual labels:  jupyter-notebook, pandas
Pythondatasciencehandbook
The book was written and tested with Python 3.5, though other Python versions (including Python 2.7) should work in nearly all cases.
Stars: ✭ 31,995 (+32218.18%)
Mutual labels:  jupyter-notebook, pandas
Pandas Tutorial
适合初级到中级晋升者,有了体系之后就看熟练度了。
Stars: ✭ 1,250 (+1162.63%)
Mutual labels:  jupyter-notebook, pandas
Covid 19 jhu data web scrap and cleaning
This repository contains data and code used to get and clean data from https://github.com/CSSEGISandData/COVID-19 and https://www.worldometers.info/coronavirus/
Stars: ✭ 80 (-19.19%)
Mutual labels:  jupyter-notebook, pandas
Pandas basics
basic pandas tutorials
Stars: ✭ 34 (-65.66%)
Mutual labels:  jupyter-notebook, pandas
Data Mining Python
《python数据分析与挖掘实战》项目实践及拓展
Stars: ✭ 92 (-7.07%)
Mutual labels:  jupyter-notebook, pandas
Machine Learning Alpine
Alpine Container for Machine Learning
Stars: ✭ 30 (-69.7%)
Mutual labels:  jupyter-notebook, pandas
Data Science Complete Tutorial
For extensive instructor led learning
Stars: ✭ 1,027 (+937.37%)
Mutual labels:  jupyter-notebook, pandas
Python for ml
brief introduction to Python for machine learning
Stars: ✭ 29 (-70.71%)
Mutual labels:  jupyter-notebook, pandas
Python
Jupyter notebooks and datasets for the interesting pandas/python/data science video series.
Stars: ✭ 65 (-34.34%)
Mutual labels:  jupyter-notebook, pandas
Pandas Profiling
Create HTML profiling reports from pandas DataFrame objects
Stars: ✭ 8,329 (+8313.13%)
Mutual labels:  jupyter-notebook, pandas
Crime Analysis
Association Rule Mining from Spatial Data for Crime Analysis
Stars: ✭ 20 (-79.8%)
Mutual labels:  jupyter-notebook, pandas
Disease Prediction From Symptoms
Disease Prediction based on Symptoms.
Stars: ✭ 70 (-29.29%)
Mutual labels:  jupyter-notebook, pandas
Pymc Example Project
Example PyMC3 project for performing Bayesian data analysis using a probabilistic programming approach to machine learning.
Stars: ✭ 90 (-9.09%)
Mutual labels:  jupyter-notebook, pandas

Maps-Location-History

Get, Concatenate and Process you location history from Google Maps TimeLine

Introduction

If you have turned on the Google Maps location history, you probably now that Google save your location data and process it in order to create a timeline that you can find in the user interface : https://www.google.fr/maps/timeline.
Maps is using raw data (multiple points saved per minutes) and is projecting it on roads, places, etc.
You can easily export all of the raw data saved by Maps or you can export one day to KML but it's impossible to export all of the processed data from the user interface.
In this project, I export multiple days (months actually) to KML, then process it in order to convert it into a pandas DataFrame. I am still working on data vizualtion and statistics with this data.

Get cookie_content to export locatin history

In order to export processed data from Google Maps website from a python script, you need to get your actual cookie.

  1. Go to https://www.google.fr/maps/timeline
  2. Inspect the page and go to the Network tab
  3. Enter this link https://www.google.fr/maps/timeline/kml?authuser=0&pb=!1m8!1m3!1i2017!2i3!3i16!2m3!1i2017!2i3!3i16 (or another date)
  4. Save this element as a cURL
  5. Open the cURL in a text editor

Explanations Image

You should get something like this:

curl 'https://www.google.com/maps/timeline/kml?authuser=0&pb=!1m8!1m3!1i2017!2i3!3i16!2m3!1i2017!2i3!3i16'   
-H 'accept-encoding: gzip, deflate, sdch, br'   
-H 'accept-language: en-US,en;q=0.8,fr;q=0.6'   
-H 'upgrade-insecure-requests: 1'   
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) '   
-H 'x-chrome-uma-enabled: 1'   
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' 
-H 'authority: www.google.com'   
-H '**cookie**: gsScrollPos=; _ga=GA1.1.49937635TxMcGmJ-uXXXXX gsScrollPos='  
-H 'x-client-data: XXXQ==' --compressed 
  1. Save the cookie content

Code explanations

  1. Export and Save KML files Choose a folder where you want to save the KML files.
    Pass the folder path, the cookie content and the days you want to save to the function : process_location.create_kml_files(begin_month, begin_day, end_month, end_day, cookie_content, folder)

  2. Create a dataframe Pass the folder path where your files are saved to df = process_location.full_df(folder) to get a well formated dataframe.

  3. Data Visualization, Stats Use the Jupyter notebook to see my data visualization and stats (time driving, at work, etc.)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].