Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrape patco elevator status page and create new endpoint (like septa's) and apply results to map (storing outage history etc) #16

Open
jamestyack opened this issue May 21, 2014 · 14 comments

Comments

@jamestyack
Copy link
Contributor

No description provided.

@jamestyack jamestyack changed the title Scrape patco elevator status page and apply resulta Scrape patco elevator status page and apply results May 21, 2014
@jamestyack jamestyack changed the title Scrape patco elevator status page and apply results Scrape patco elevator status page and apply results to map May 21, 2014
@josomo
Copy link
Contributor

josomo commented May 22, 2014

I'll try this. I need to scrape (http://www.ridepatco.org/schedules/alerts.asp), store the statuses in the mongo db, and update the 17 stations on the red line on the mapbox map, right?

@jamestyack
Copy link
Contributor Author

Awesome that you want to help!

I don't think you need to store the result of the scrape in Mongo (for now), but that could be an option if we want to cache once we get it working...

Here's what I was thinking...

Will you be at CodeForPhilly next week? We can catch up, and I can help with any setup you need.

@josomo
Copy link
Contributor

josomo commented May 23, 2014

Ok, I'll see what I can do. Not sure if I'll be at the next meeting but I'm around if you wanna chat on IRC or email or whatever.

Should I add escalator outage information also, or just elevator status?

@jamestyack jamestyack changed the title Scrape patco elevator status page and apply results to map Scrape patco elevator status page and create new endpoint (like septa's) and apply results to map (storing outage history etc) May 26, 2014
@jamestyack
Copy link
Contributor Author

@jamestyack
Copy link
Contributor Author

Next steps:-

  • Refactor/use the new function from the get '/septa/stations/line/:line' function so that as well as calling SEPTA, it also calls the PATCO JSON and merges results together into the response (and also stores the outage data for PATCO to the outageTrackerColl and outagesByDayColl
  • Update the API endpoint I temporarily added (/septa/elevator/outages), so that it uses the new function, but has same response format as /septa/elevator/outages (this endpoint is used by ajax call to populate the info box visible when the map first loads)

(if you prefer a different approach, that's cool too.... the one I'm proposing should mean that the stations are updated on the UI.. .the only change on the UI side I think will be to change the way the info box gets populated to add a call to the PATCO endpoint and populate a new PATCO section/links)

@josomo
Copy link
Contributor

josomo commented May 26, 2014

Ok, I'll give it a shot. I need to tweak the update time too (it returns the time of the scrape, not the time the statuses were updated).

Wont be able to make the meeting this week.

@jamestyack
Copy link
Contributor Author

Sorry to miss you; hack4access this weekend.

@josomo
Copy link
Contributor

josomo commented Jun 4, 2014

Still working on this... I fixed the "time updated" problem but I'm still working on the other changes.

@josomo
Copy link
Contributor

josomo commented Jun 10, 2014

Hey James, I see that you're planning to attend the Philly.rb meetup. I will be there maybe we can catch up.

@jamestyack
Copy link
Contributor Author

Cool, I'll see you later

@jamestyack
Copy link
Contributor Author

Sorry I missed you; couldn't make it.

@josomo
Copy link
Contributor

josomo commented Jun 12, 2014

No prob. I had a good conversation about mongodb at the meetup so I'm going to take another shot at the issue this weekend.

On Jun 11, 2014, at 8:59 PM, jamestyack [email protected] wrote:

Sorry I missed you; couldn't make it.


Reply to this email directly or view it on GitHub.

@jamestyack
Copy link
Contributor Author

Excellent thanks! BTW, I'm doing some cleanup on the script that loads the stations to Mongo on my local machine and will push into the repo.

@josomo
Copy link
Contributor

josomo commented Jun 20, 2014

Hey James. My email is [email protected]. Maybe it's better to communicate that way.

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

No branches or pull requests

2 participants