title: Google maps distance matrix has similar duration values with or without departure time
body: <p>python <code>googlemaps.Client.distance_matrix</code> returns a quite similar results with and without <code>departure_time</code>.</p>
  
  <p>In my project, We are running the <code>googlemaps.Client.distance_matrix</code> function with and without departure time.
  Our main goal is see the connection between <em>predictive travel</em>, which is based on the time of day in which the travel is occurring, to <em>street-level routing (SLR)</em>, which we thought was based on "empty streets" traffic.</p>
  
  <p>Strangely, we see that the difference between the SLR and predictive is always less then 15 minutes (!!!), no matter if we compare them in rush hours or not.</p>
  
  <pre class="lang-py prettyprint-override"><code>import pandas as pd
  import googlemaps
  import numpy as np
  import matplotlib.pyplot as plt
  import datetime
  
  google_key = "some_google_key_here"
  google_client = googlemaps.Client(key=google_key)
  
  
  def get_from_google(origin_string, dest_string, time):
      google_response = google_client.distance_matrix(origins=origin_string,
                                                      destinations=dest_string,
                                                      departure_time=time,
                                                      mode="driving")
      travel_data = google_response["rows"][0]["elements"][0]
      if travel_data["status"] != "OK":
          return np.nan
      return travel_data["duration"]["value"]
  
  
  def get_google_results(origin_string, dest_string, time_string):
      time = datetime.datetime.strptime(time_string, '%m/%d/%Y %I:%M:%S %p')
      return [get_from_google(origin_string, dest_string, None),
              get_from_google(origin_string, dest_string, time)]
  
  
  data_frame = pd.read_csv("path_to_csv_of_travels.csv").sample(1000, random_state=42)
  data_frame[["google_slr", "google_predictive"]] = data_frame.apply(lambda x: get_google_results(x.origin, x.destination, x.time),
                                                                     axis=1,
                                                                     result_type="expand")
  diff = (data_frame.google_predictive - data_frame.google_slr) / 60
  plt.hist(diff, bins=10)
  plt.title("Google Predictive and SLR comparison")
  plt.xlabel("Difference between predictive and SLR in minutes")
  plt.ylabel("Number of samples")
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/jITQu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jITQu.png" alt="Output plot"></a></p>
  
  <p>Our main question is: How does <em>SLR</em> is calculated in google maps? Is it a 24 hours average, or is it a time-slot-based average over the day? Maybe we have some mistake in our code?</p>