producer ======== .. py:module:: producer .. autoapi-nested-parse:: Kafka Producer for Taxi Trips ----------------------------- Reads a sample dataset (CSV or Parquet), maps it to the unified schema, and publishes messages into Kafka topic `rides_raw` with time compression. Functions --------- .. autoapisummary:: producer.parse_args producer.get_config producer.make_payload producer.sleep_scaled producer.main Module Contents --------------- .. py:function:: parse_args() .. py:function:: get_config() .. py:function:: make_payload(row, ts_field, key_field) Convert a pandas row into a JSON-serializable dict following schema. .. py:function:: sleep_scaled(curr, prev, speedup, min_sleep) Sleep according to time compression. .. py:function:: main()