dime-worldbank / googletraffic

R package to query Google Maps traffic data and transform into data
Other
55 stars 9 forks source link

Date and time #11

Closed temospena closed 6 months ago

temospena commented 1 year ago

Hi,

Thanks fot this package, I've been using it to collect data for research in a case study.

I wonder if there is a possibility to set the date and time as arguments so we can have the information related to that time. For instance, if I want to retrieve data for a Wednesday at 9am, is there a way that we can define that?

Thanks again

ramarty commented 1 year ago

Hi @temospena -

Unfortunately I don't think it's possible to do that with the Maps Javascript API. According to the documentation, the traffic layer only shows "real-time traffic information."

I know it's possible to see "typical" traffic (for example, on a Wed at 9am) when on Google Maps -- but it seems this functionality isn't extended to the API.

Although I could be wrong! So if it's in fact possible to specify date/time in the Maps Javascript API (to look at historic averages), it would be straightforward to add to this package!