Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Add support for OpenWeatherMap API for facilitate weather information #448

Open
egofer opened this issue Sep 21, 2014 · 6 comments
Open

Comments

@egofer
Copy link

egofer commented Sep 21, 2014

One of the main advantages of OpenTripPlanner and its Android client is that it allows the user to manage your own mobility, adapting to their own context. In this regard it would be interesting to the user have the weather information that is expected during your trip or transfers. This would allow you to choose the best transportation alternative. Over all in cities where the weather is a key factor in the trips.

OpenWeatherMap provides a free API with open weather data, weather forecasts and maps in HTML, JSON and XML formats that might be used in the Android client (or the OTP server).

@barbeau
Copy link
Member

barbeau commented Sep 30, 2014

@egofer Definitely an interesting idea. Do you have any ideas how we would present this information to users? In other words, where would this information be placed in the UI?

@egofer
Copy link
Author

egofer commented Oct 1, 2014

I believe that the roadmap would be the best place. A panel would show a simple weather forecast in that place and for that particular time below each transfer (perhaps with the probability of rain and temperature is sufficient.).

This panel, along with the succession of stops if it were the case, would only be visible if the user deploys it, because for some people this information will not be relevant and makes more complex the roadmap.

In addition this panel could be reused to add more information in the future (fare, link to the photo stored in the GTFS file, incidents, etc.).

otpweather

@vreixo
Copy link
Contributor

vreixo commented Oct 1, 2014

@egofer I think that this would be a very nice addition :-)

Are you thinking on a panel per itinerary or per step of the itinerary? For
long trips the weather may change in between legs, but I'm wondering if
would be too much to add one for each segment.

2014-10-01 18:23 GMT+02:00 egofer [email protected]:

I believe that the roadmap would be the best place. A panel would show a
simple weather forecast in that place and for that particular time below
each transfer (perhaps with the probability of rain and temperature is
sufficient.).

This panel, along with the succession of stops if it were the case, would
only be visible if the user deploys it, because for some people this
information will not be relevant and makes more complex the roadmap.

In addition this panel could be reused to add more information in the
future (fare, link to the photo stored in the GTFS file, incidents, etc.).

[image: otpweather]
https://cloud.githubusercontent.com/assets/3096716/4478634/1d1b8e32-4987-11e4-8695-7503cde875ac.png


Reply to this email directly or view it on GitHub
#448 (comment)
.

@barbeau
Copy link
Member

barbeau commented Oct 1, 2014

I think weather/temperature would likely be most relevant for walking legs. I believe most transit modes should be covered from weather. We could only display weather for more than one leg when the result is different per leg.

@egofer Where did you get the icons you used in your mockup? They are nice.

@egofer
Copy link
Author

egofer commented Oct 3, 2014

I think it would be interesting to show the weather information on all transfers, especially in walking and cycling for obvious reasons. However probably the premise should be that obtaining weather forecasting does not cause a delay in displaying optimal routes and the roadmap. I think this could be achieved:

  1. Calling the API only if the user displays the information panel of the leg (or to do this in the background).
  2. Due to the fact that OpenWeatherMap facilitates weather forecasts throughout the day in periods of 3 hours (00:00, 03:00, 06:00, etc.), if the trip is within one of these periods and duration is less than 3 hours, the Android client does a single query to the OpenWeatherMap API, because the rest are irrelevant.

@barbeau I got the icons from NounProject (with CC and PD licenses). On the other hand, OpenWeatherMap API returns a code with the name of the icon (although this style is perhaps not the most appropriate). However there are free fonts styles that can be used to represent the weather if required:

@barbeau
Copy link
Member

barbeau commented Nov 10, 2014

FYI - another free weather API:
https://www.mashape.com/george-vustrey/ultimate-weather-forecasts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants