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

Healthy Ride data #70

Open
vonbearshark opened this issue Jan 25, 2017 · 12 comments
Open

Healthy Ride data #70

vonbearshark opened this issue Jan 25, 2017 · 12 comments
Assignees

Comments

@vonbearshark
Copy link
Contributor

We have data on all the healthy ride stations (https://data.wprdc.org/dataset/healthyride-stations), including a live display of availability: https://data.wprdc.org/dataset/current-bike-availability-by-station. Might be interesting to include. Let's consider this low priority, though

@vonbearshark vonbearshark added this to the Data management milestone Jan 25, 2017
@vonbearshark vonbearshark changed the title Healthy Ride Healthy Ride data Jan 25, 2017
@jfw20
Copy link
Collaborator

jfw20 commented Jan 28, 2017

I'm interested in doing this.

@vonbearshark
Copy link
Contributor Author

Sure thing. This one is a bit weird because that second source is actually live data. We haven't handled that yet. We also don't have a standard way to display that kind of data--the pin description might not be update-able, for example. As you get into it, we can run through some ideas as to how to handle it on here. For now, we can just plot the healthyride stations in the Oakland area.

@vonbearshark
Copy link
Contributor Author

Maybe @saylorsd has a suggestion on how to work with this data

@saylorsd
Copy link

After taking a bit of a look at the data, I think the best bet would be just to work with current availabilty data, since it will always be up to date, and it will always be at the same location. The HealthyRide stations dataset will go stale each quarter when they publish a new one.

In general, you could make a request here to get an xml representation of Pittsburgh's stations and then iterate over the places. You can map it using the lat and lng fields and maybe display the current number of bikes and free racks available in the popup. As long as the call is made when the user accesses the map , it should be pretty accurate.

I'd be more than happy to help on any of the specifics, just mention me in a comment if you have a question for me.

@jfw20
Copy link
Collaborator

jfw20 commented Jan 28, 2017

could you check out my main.js in my fork of project? Seems dataset loads alright, but points aren't plotting and I can't figure out why exactly.

@saylorsd
Copy link

@jfw20 It looks like you're using the data dictionary's resource ID for the healthy rides stuff. Now that I see how everything else is set up, I see that my previous solution is a bit more tricky. The actually data for that dataset is a XML feed which is completely different from all of the other datasets you guys are using so far. It won't work by adding it in like the ones that are currently there. If I have time tomorrow, I'll make a script job that harvests that XML feed and hosts it like the rest of our datasets. Otherwise, I'll do it Monday when I get back to the office.

In the meantime, you can get the points up using the data here: https://data.wprdc.org/dataset/healthyride-stations/resource/6934a5a3-0ba8-4e8e-a6a9-fcca801c2d48 . You'll be able to follow the same procedure for this one that's been done for the others. Then, when I get the new dataset up, you'll just have to make a few small changes and you'll have the live bike counts up too.

Once again, just @ me if you have any other questions or comments.

@vonbearshark
Copy link
Contributor Author

We don't want you to have to make a new dataset aggregations. Plus, we have another live XML dataset we'd like to do. So @jfw20, I think you should write a function similar to the fetchWPRDCdata function we have for the other kind of calls. Like fetchWPRDCXML. Would something like this work, do you think:http://stackoverflow.com/questions/8237923/parsing-xml-rss-from-url-using-java-script?

@vonbearshark
Copy link
Contributor Author

We'll also want to add a visual unique to this dataset that shows the bike availability. After you get the data, we can merge that PR before we add the HTML/CSS popup

@jfw20
Copy link
Collaborator

jfw20 commented Jan 28, 2017

Alright, I'll take a look at writing a fetchWPRDCXML function as soon as I can.

@vonbearshark
Copy link
Contributor Author

vonbearshark commented Apr 1, 2017

@jfw20 How is this coming along? Any hang-ups I can help you with?

@jfw20
Copy link
Collaborator

jfw20 commented Apr 4, 2017

Hey, sorry for slow response. Haven't really worked on it. If anyone else wants to take a whack at it you can re-assign it, otherwise I'll try to get to it as soon as I can.

@vonbearshark
Copy link
Contributor Author

You're good!

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

3 participants