alex.applications.PublicTransportInfoCS.data package

Submodules

alex.applications.PublicTransportInfoCS.data.add_cities_to_stops module

A script that creates a compatibility table from a list of stops in a certain city and its neighborhood and a list of towns and cities.

Usage:

./add_cities_to_stops.py [-d “Main city”] stops.txt cities.txt cities_stops.tsv

alex.applications.PublicTransportInfoCS.data.add_cities_to_stops.add_cities_to_stops(cities, stops, main_city)[source]
alex.applications.PublicTransportInfoCS.data.add_cities_to_stops.get_city_for_stop(cities, stop, main_city)[source]
alex.applications.PublicTransportInfoCS.data.add_cities_to_stops.load_list(filename, suppress_comments=False, cols=1)[source]
alex.applications.PublicTransportInfoCS.data.add_cities_to_stops.main()[source]

alex.applications.PublicTransportInfoCS.data.autopath module

self cloning, automatic path configuration

copy this into any subdirectory of pypy from which scripts need to be run, typically all of the test subdirs. The idea is that any such script simply issues

import autopath

and this will make sure that the parent directory containing “pypy” is in sys.path.

If you modify the master “autopath.py” version (in pypy/tool/autopath.py) you can directly run it which will copy itself on all autopath.py files it finds under the pypy root directory.

This module always provides these attributes:

pypydir pypy root directory path this_dir directory where this autopath.py resides

alex.applications.PublicTransportInfoCS.data.convert_idos_stops module

alex.applications.PublicTransportInfoCS.data.database module

alex.applications.PublicTransportInfoCS.data.download_data module

alex.applications.PublicTransportInfoCS.data.expand_stops module

alex.applications.PublicTransportInfoCS.data.get_cities_location module

A script that collects the locations of all the given cities using the Google Geocoding API.

Usage:

./get_cities_locations.py [-d delay] [-l limit] [-a] cities_locations-in.tsv cities_locations-out.tsv

-d = delay between requests in seconds (will be extended by a random period
up to 1/2 of the original value)

-l = limit maximum number of requests -a = retrieve all locations, even if they are set

alex.applications.PublicTransportInfoCS.data.get_cities_location.get_google_coords(city)[source]

Retrieve (all possible) coordinates of a city using the Google Geocoding API.

alex.applications.PublicTransportInfoCS.data.get_cities_location.random() → x in the interval [0, 1).

alex.applications.PublicTransportInfoCS.data.ontology module

alex.applications.PublicTransportInfoCS.data.ontology.add_slot_values_from_database(slot, category, exceptions=set([]))[source]
alex.applications.PublicTransportInfoCS.data.ontology.load_additional_information(fname, slot, keys)[source]
alex.applications.PublicTransportInfoCS.data.ontology.load_compatible_values(fname, slot1, slot2)[source]

Module contents