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

Refactor populate_graph and generate_cross_feed_edges #5

Closed
kuanb opened this issue Dec 3, 2017 · 0 comments
Closed

Refactor populate_graph and generate_cross_feed_edges #5

kuanb opened this issue Dec 3, 2017 · 0 comments
Assignees

Comments

@kuanb
Copy link
Owner

kuanb commented Dec 3, 2017

Per this comment (#4 (comment)):

    for i, row in wait_times_by_stop.iterrows():
        sid = str(row.stop_id)
        full_sid = nameify_stop_id(name, sid)

        # TODO: Join tables before hand to make
        #       this part go faster
        id_mask = (feed.stops.stop_id == sid)
        stop_data_head = feed.stops[id_mask].head(1)

This operation is performed twice during the final steps of graph generation. It's expensive and slow. Need to replace with a single merge operation whose results are passed to both methods.

@kuanb kuanb changed the title Refactor populate_graph and generate_cross_feed_edges Refactor populate_graph and generate_cross_feed_edges Dec 3, 2017
@kuanb kuanb self-assigned this Dec 3, 2017
@kuanb kuanb closed this as completed in #7 Dec 3, 2017
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

1 participant