Skip to main content

Export data from web portals and save to database.

Project description

gather_taxi_data

Gather all taxi data and store it.

Overview

The gather_taxi_data package is designed to gather data from various sources such as GPS trackers and web portals, and store the collected data in a database. This package includes modules for gathering data from specific sources and a main module to orchestrate the data gathering process.

Modules

gather_all_data

This module gathers data from all sources and stores it in the database.

Functions

  • async_gather_bwc_data(start_date: str, finish_date: str, destination: str) -> None

    • Asynchronously gathers data from the Black and White Cabs web portal.
  • async_gather_gps_data(start_date: str, finish_date: str, destination: str) -> None

    • Asynchronously gathers data from the GPS tracker web portal.
  • gather_all_data(start_date: str, finish_date: str, destination: str) -> None

    • Asynchronously gathers data from all sources and stores it in the database.
  • main() -> None

    • Entry point for the module. Parses command-line arguments and initiates the data gathering process.

Example Usage

python -m gather_taxi_data.gather_all_data --start_date 01/01/2023 --finish_date 07/01/2023 --destination /path/to/destination

This command will gather all taxi data from the specified start date to the finish date and store it in the specified destination directory.

Command-Line Arguments

  • --start_date: The start date for data gathering in DD/MM/YYYY format.
  • --finish_date: The finish date for data gathering in DD/MM/YYYY format.
  • --destination: The directory where the gathered data will be stored.

Example

To gather data from January 1, 2023, to January 7, 2023, and store it in the /data/taxi directory, use the following command:

python -m gather_taxi_data.gather_all_data --start_date 01/01/2023 --finish_date 07/01/2023 --destination /data/taxi

Make sure to replace /data/taxi with the actual path where you want to store the data.

gather_bwc_data

This module gathers data specifically from the Black and White Cabs web portal.

Functions

  • get_driver_list(browser: webdriver) -> List[Driver]

    • Retrieves a list of drivers from the web portal.
  • get_vehicle_list(browser: webdriver) -> List[Taxi]

    • Retrieves a list of vehicles from the web portal.
  • duration_to_seconds(duration: str) -> int

    • Converts a duration string to seconds.
  • get_shift_list(browser: webdriver, db_name: str, from_date: str, to_date: str) -> List[Shift]

    • Retrieves a list of shifts from the web portal.
  • get_job_list(browser: webdriver, db_name: str) -> List[Job]

    • Retrieves a list of jobs from the web portal.
  • gather_bwc_data(start_date: str, finish_date: str, destination: str) -> None

    • Gathers data from the Black and White Cabs web portal and stores it in the database.
  • main() -> None

    • Entry point for the module. Parses command-line arguments and initiates the data gathering process.

Example Usage

python -m gather_taxi_data.gather_bwc_data --start_date 01/01/2023 --finish_date 07/01/2023 --destination /path/to/destination

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gather_taxi_data-0.1.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gather_taxi_data-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file gather_taxi_data-0.1.1.tar.gz.

File metadata

  • Download URL: gather_taxi_data-0.1.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.0rc1

File hashes

Hashes for gather_taxi_data-0.1.1.tar.gz
Algorithm Hash digest
SHA256 31324999034d4cb2e448da18cd79db89fc46a6d711e17b8ec7c7afbf7a650316
MD5 81b097b3dc10ac1b2c59f68d916b4250
BLAKE2b-256 1d6455d4fe56ccaac5f04806e284f5fafa732e598607fb6008a641dfe0360830

See more details on using hashes here.

File details

Details for the file gather_taxi_data-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gather_taxi_data-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 174ca874c7682c646b83363e76d2e9382f1cf8dd764ce0547ec71dfb2d5567e9
MD5 3211d9f6f897dbd889e3ffec131a7e92
BLAKE2b-256 6d98d3e2c767275e6b24f9c2d03dcd05ac40428509f6967425f2f5606285a9c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page