# Path: urbanaccess/gtfsfeeds.py
# class urbanaccess_gtfsfeeds(object):
#     def __init__(self,
#                  gtfs_feeds={}):
#     def from_yaml(cls, gtfsfeeddir=os.path.join(config.settings.data_folder,
#                                                 'gtfsfeeds'),
#                   yamlname='gtfsfeeds.yaml'):
#     def to_dict(self):
#     def add_feed(self, add_dict, replace=False):
#     def remove_feed(self, del_key=None, remove_all=False):
#     def to_yaml(self, gtfsfeeddir=os.path.join(config.settings.data_folder,
#                                                'gtfsfeeds'),
#                 yamlname='gtfsfeeds.yaml',
#                 overwrite=False):
# def search(api='gtfsdataexch', search_text=None, search_field=None,
#            match='contains', add_feed=False, overwrite_feed=False):
# def download(data_folder=os.path.join(config.settings.data_folder),
#              feed_name=None, feed_url=None, feed_dict=None,
#              error_pause_duration=5, delete_zips=False):
# def _unzip(zip_rootpath, delete_zips=True):
# def _zipfile_type_check(file, feed_url_value):


import os
import time
import matplotlib
import urbanaccess
from urbanaccess.gtfsfeeds import feeds
    gtfsfeeds_dfs=loaded_feeds,
    day='wednesday',
    timerange=['07:00:00', '10:00:00'])

loaded_feeds = urbanaccess.gtfs.headways.headways(loaded_feeds,
                                                  headway_timerange=[
                                                      '07:00:00', '10:00:00'])

osm_nodes, osm_edges = urbanaccess.osm.load.ua_network_from_bbox(bbox=bbox)

ua_network = urbanaccess.osm.network.create_osm_net(
    osm_edges=osm_edges,
    osm_nodes=osm_nodes,
    travel_speed_mph=3,
    network_type='walk')

urbanaccess_nw = urbanaccess.network.integrate_network(
    urbanaccess_network=ua_network,
    headways=True,
    urbanaccess_gtfsfeeds_df=loaded_feeds,
    headway_statistic='mean')

urbanaccess.network.save_network(urbanaccess_network=urbanaccess_nw,
                                 filename='final_net.h5',
                                 overwrite_key=True)

urbanaccess_nw = urbanaccess.network.load_network(filename='final_net.h5')

color_range = urbanaccess.plot.col_colors(df=urbanaccess_nw.net_edges,
                                          col='weight',

# Path: urbanaccess/gtfsfeeds.py
# class urbanaccess_gtfsfeeds(object):
#     def __init__(self,
#                  gtfs_feeds={}):
#     def from_yaml(cls, gtfsfeeddir=os.path.join(config.settings.data_folder,
#                                                 'gtfsfeeds'),
#                   yamlname='gtfsfeeds.yaml'):
#     def to_dict(self):
#     def add_feed(self, add_dict, replace=False):
#     def remove_feed(self, del_key=None, remove_all=False):
#     def to_yaml(self, gtfsfeeddir=os.path.join(config.settings.data_folder,
#                                                'gtfsfeeds'),
#                 yamlname='gtfsfeeds.yaml',
#                 overwrite=False):
# def search(api='gtfsdataexch', search_text=None, search_field=None,
#            match='contains', add_feed=False, overwrite_feed=False):
# def download(data_folder=os.path.join(config.settings.data_folder),
#              feed_name=None, feed_url=None, feed_dict=None,
#              error_pause_duration=5, delete_zips=False):
# def _unzip(zip_rootpath, delete_zips=True):
# def _zipfile_type_check(file, feed_url_value):


# Path: urbanaccess/tests/integration/integration_madison.py
import os
import time
import matplotlib
import urbanaccess
from urbanaccess.gtfsfeeds import feeds

    gtfsfeeds_dfs=loaded_feeds,
    day='wednesday',
    timerange=['07:00:00', '10:00:00'])

loaded_feeds = urbanaccess.gtfs.headways.headways(loaded_feeds,
                                                  headway_timerange=[
                                                      '07:00:00', '10:00:00'])

osm_nodes, osm_edges = urbanaccess.osm.load.ua_network_from_bbox(bbox=bbox)

ua_network = urbanaccess.osm.network.create_osm_net(
    osm_edges=osm_edges,
    osm_nodes=osm_nodes,
    travel_speed_mph=3,
    network_type='walk')

urbanaccess_nw = urbanaccess.network.integrate_network(
    urbanaccess_network=ua_network,
    headways=True,
    urbanaccess_gtfsfeeds_df=loaded_feeds,
    headway_statistic='mean')

urbanaccess.network.save_network(urbanaccess_network=urbanaccess_nw,
                                 filename='final_net.h5',
                                 overwrite_key=True)

urbanaccess_nw = urbanaccess.network.load_network(filename='final_net.h5')

color_range = urbanaccess.plot.col_colors(df=urbanaccess_nw.net_edges,
                                          col='weight',

                                          num_bins=5,