Note that there are some explanatory texts on larger screens.

plurals
  1. POusing images from the web in python
    primarykey
    data
    text
    <p>So here is my goal:</p> <p>Use google maps api to generate a bunch of maps and run them on my computer in real-time similar to what a GIF would look like.</p> <p>I have a pandas <code>dataframe</code> that looks as such:</p> <pre><code> diffSecs latitude longitude altitude time code name 0 1.614 42.386391 -71.013544 50 2011-12-16 08:09:07 PEONY 1 1.115 42.386391 -71.013544 50 2011-12-16 08:09:08 PEONY 2 0.952 42.386391 -71.013544 50 2011-12-16 08:09:09 PEONY 3 0.923 42.386391 -71.013544 50 2011-12-16 08:09:10 PEONY 4 1.307 42.386391 -71.013544 50 2011-12-16 08:09:11 PEONY </code></pre> <p>So I have a function that runs through the latitude and longitude and creates a list consisting of hundreds of urls that are images of a map with a point on the persons position.</p> <p>here is the function:</p> <pre><code>def url_maker(df): urls = [] df = df.reset_index(drop=True) name = df['code name'][0] if name == "APPLE" or name == "DAFODIL" or name == "LILLY" or name == "LILY" or name == "ORANGE" or name == "ROSE" or name == "SUNFLOWER" or name == "SWEETPEA": label = "C" color = 'blue' else: label = "P" color = 'red' lats,lons = df.latitude, df.longitude center = home_finder(df) for i in range(len(df)-1): x,y = str(lats[i]),str(lons[i]) marker = '&amp;markers=color:' + color + '%7Clabel:' + label + '%7C' + x + ',' + y url = 'http://maps.googleapis.com/maps/api/staticmap?size=600x300&amp;maptype=roadmap&amp;zoom=7&amp;center=' + center + marker + '&amp;sensor=true' urls.append(url) return urls </code></pre> <p>This will return a list of urls that are the persons position on the map. So you know, the <code>home_finder</code> function takes gps coordinates in a dataframe and approximates where the person lives so I can watch how far they go from their home.</p> <p><strong>So here is my question:</strong></p> <p>Now that I have a list of all the image urls I need, How can I make a movie out of it so I can watch the point move in real time? Is there a module that can do this for me? I have been stuck on this for over a week!</p> <p><strong>note:</strong></p> <p>I had a thought about doing this in Django with a loop to live update the tag, but I have never used Django before so I really don't know if that is possible, and if it is how I can do that. If I could do it in Django, how would I be able to? <strong>But</strong> if it is possible to do this on my own computer and maybe save it in a GIF or MOV file, that would be 100 times better!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload