matthieuheitz / google-data-analyses Goto Github PK
View Code? Open in Web Editor NEWA repo where I will put my scripts to analyze the data that Google collects about me.
License: MIT License
A repo where I will put my scripts to analyze the data that Google collects about me.
License: MIT License
Thank you for your work with this, it would be really useful to have its functionality.
After placing the get_visit_times.py in the same folder as location history.json and after executing the script with "python get_visit_times.py" in terminal it's returning "SyntaxError: invalid syntax".
It's likely that I'm doing something wrong - is there something else I need to do? Maybe would be best to answer this in the readme.
Using Python 3.7.3
Hello,
New to python and haven't been able to figure this out.
running python 2.7.18 in windows 10 command prompt.
I put the latest error in the title, AttributeError: 'datetime.datetime' object has no attribute 'timestamp' .
but prior to that, I was getting, Traceback (most recent call last):
File "C:\google-data-analyses-master\get_visit_times.py", line 87, in
data.clear()
AttributeError: 'list' object has no attribute 'clear' .
not sure if the two are related. I was able to bypass the clear error by commenting out the #data.clear() line. have lots of memory so figured why not.
the latest error I get is bellow.
C:\google-data-analyses-master>get_visit_times.py
Loading 'C:\google-data-analyses-master\Location History.json' ...
JSON file loaded
Extracting relevant data...
Total number of points: 4171876
Traceback (most recent call last):
File "C:\google-data-analyses-master\get_visit_times.py", line 95, in
begin_ts = date_ymd_to_timestamp_ms(2019,01,01)
File "C:\google-data-analyses-master\get_visit_times.py", line 24, in date_ymd_to_timestamp_ms
return datetime.datetime(y,m,d).timestamp()#*1e3
AttributeError: 'datetime.datetime' object has no attribute 'timestamp'
First, thank you for writing this. Second, I really don't want to learn Python; I just want to run the script. The first error I got was because I didn't have the json data in the same sub as the script. Solved.
The next error was because numpy was not found. I wanted to install numpy but holy shit, it just ain't easy.
Is there a way to make this more user-friendly? I have the skills but not the patience.
Google renamed the json file to Records.json.
Also the timestamp key is renamed. Therefore the total number of points keeps returning zero.
Hi Matthieu
Saw your post on https://webapps.stackexchange.com/questions/102899/can-i-use-googles-timeline-to-get-the-times-ive-been-to-a-specific-location
Wanted to say thanks for https://github.com/matthieuheitz/google-data-analyses/blob/master/get_visit_times.py
Rudi
The script seems to return 0 close points even after trying multiple different lats and longs and an absurdly large radius. Any ideas why this may be?
Loading 'location_history.json' ...
JSON file loaded
Extracting relevant data...
Traceback (most recent call last):
File "/home/shurygin/bin/get_visit_times.py", line 74, in
positions[i] = np.array([float(point['latitudeE7']),float(point['longitudeE7'])])/1e7
KeyError: 'latitudeE7'
This ist great and about perfectly fitting for what I was looking quite a long time. Is there an easy way to get every date listeted only once, so I can get all the dates I've been at work AND how many times that was (I need it for Tax)?
If you say "Just do it yourself, lazy bastard" I am about to learn python to do it myself.
Strange google does not provide a simple way to access these data they are collecting.....
Loading 'location_history.json' ...
JSON file loaded
Extracting relevant data...
Traceback (most recent call last):
File "get_visit_times.py", line 75, in
accuracy[i] = point['accuracy']
KeyError: 'accuracy'
Thank you for making this script available. I'm testing it out now and it looks like a very helpful interpretation of the Google Maps location data.
Could you provide some clarification/explanation for how to interpret the "Group of # Points" messages, presumably in the context of the group_size
parameter? I can't figure out if the points refer to geographic locations (e.g. a cluster of points near each other in 2D) or timepoints (i.e. a cluster of measurements close to each other in time).
when executing the script, the following traceback message is received
Traceback (most recent call last):
File "get_visit_times.py", line 73, in <module>
accuracy[i] = point['accuracy']
KeyError: 'accuracy'
My json file contains accuracy
keys for all objects.
Example: "accuracy" : 30
The only changes made to the script:
poi
with my coordinates from google mapsbegin_ts
and end_ts
with my date rangeA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.