Ryan Saxe
Ryan Saxe

Reputation: 17829

live updating google maps for real time data in python

So I have a very large amount of GPS data with latitude and longitude over time and I need to create a live updating movie to show the motion of the patients in real time

I need an API for python (I have been searching for hours) that has the ability to show me this on a map.

Google maps has some great qualities for this that I can write a script to loop through, but I doubt that will even work the way I want. Do you guys know of the best API for this?

Below is going to be an example of a DataFrame with the data. I will have about 20 DataFrames like this and I need them all to be on the map at the same time so I can juxtapose their motion:

>>> df.head()
   diffSecs   latitude  longitude  altitude                 time code name
0     1.607  42.354028 -71.079376        50  2011-12-15 18:17:01     APPLE
1     1.189  42.354028 -71.079376        50  2011-12-15 18:17:02     APPLE
2     0.899  42.354028 -71.079376        50  2011-12-15 18:17:03     APPLE
3     1.134  42.354028 -71.079376        50  2011-12-15 18:17:04     APPLE
4     0.798  42.354028 -71.079376        50  2011-12-15 18:17:05     APPLE

The only important columns are latitude, longitude, code name, and time this way I plot all of the patients distinguishable, in the right place, and at the same times as the others.

Thanks for your help!

p.s. if this is doable with google maps API, please explain where to look, because I have been searching for 2 hours and maybe I am just missing something

Upvotes: 1

Views: 2507

Answers (1)

Sason Torosean
Sason Torosean

Reputation: 572

Naturally there will be some learning involved but here is an idea!

1). Get ghost which is a sort of a light weight headless browser, http://jeanphix.me/Ghost.py/.

2). learn how to connect to and interact with google maps and interact with the fields and forms using ghost (I think this should be very easy for you as ghost is fairly simple to use).

3). place the latitude and longitude in the search part, press enter (all done using ghost in your script)

4). save the map, using ghost's image capture.

5). Using python Overlay the images on top of each other, to get the temporal view of the guys position!

Hope this helps a bit.

Upvotes: 1

Related Questions