ltadatamallcrawler

所属分类:交通/航空行业
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2018-03-28 06:42:07
上 传 者sh-1993
说明:  从LTA数据中心API获取流量数据的包。,
(A package that gets traffic data from LTA datamall APIs.,)

文件列表:
.editorconfig (292, 2018-03-27)
.travis.yml (229, 2018-03-27)
AUTHORS.rst (167, 2018-03-27)
CONTRIBUTING.rst (3163, 2018-03-27)
HISTORY.rst (45, 2018-03-27)
LICENSE (35141, 2018-03-27)
MANIFEST.in (305, 2018-03-27)
Makefile (1740, 2018-03-27)
docs/ (0, 2018-03-27)
docs/Makefile (6810, 2018-03-27)
docs/authors.rst (28, 2018-03-27)
docs/conf.py (8526, 2018-03-27)
docs/contributing.rst (33, 2018-03-27)
docs/history.rst (28, 2018-03-27)
docs/index.rst (525, 2018-03-27)
docs/installation.rst (223, 2018-03-27)
docs/make.bat (6483, 2018-03-27)
docs/usage.rst (99, 2018-03-27)
ltadatamallcrawler/ (0, 2018-03-27)
ltadatamallcrawler/__init__.py (218, 2018-03-27)
ltadatamallcrawler/_version.py (15848, 2018-03-27)
ltadatamallcrawler/cli.py (112, 2018-03-27)
ltadatamallcrawler/config.py (1582, 2018-03-27)
ltadatamallcrawler/requestor.py (1537, 2018-03-27)
ltadatamallcrawler/settings.yaml (1945, 2018-03-27)
ltadatamallcrawler/urls.csv (1233, 2018-03-27)
requirements-in.txt (16, 2018-03-27)
requirements.txt (16, 2018-03-27)
setup.cfg (217, 2018-03-27)
setup.py (2019, 2018-03-27)
tests/ (0, 2018-03-27)
tests/__init__.py (24, 2018-03-27)
tests/test_ltadatamallcrawler.py (400, 2018-03-27)
tox.ini (199, 2018-03-27)
versioneer.py (62474, 2018-03-27)

# lta-datamall-crawler [![Build Status](https://travis-ci.org/hiimivantang/ltadatamallcrawler.svg?branch=master)](https://travis-ci.org/hiimivantang/ltadatamallcrawler) LTA is responsible for planning, operating, and maintaining Singapore's land transport and systems. This repository contains a python module to get data from LTA's [datamall][1] (free). Maybe I should not name this repository as LTA-datamall-crawler but you can always create a simple cronjob for crawling purposes. ### Installation ```python pip install ltadatamallcrawler ``` Or, you can always clone this project and run the script directly. ### Requirements You will need LTA datamall API key and GUUID. To get the API key, click "Request for API Access" on the [LTA datamall page][3]. API key will be granted immediately. Using the API key, you can generate a GUUID on [this page][4]. ### Usage ```bash # to view the available APIs: lta-datamall-crawler -h # Expected output: Usage: lta-datamall-crawler [options] #Options: # -h, --help show this help message and exit # # Available APIs: # Please select one! # # --traffic-incidents # --bus-arrival # --bus-routes # --estimated-travel-times # --road-openings # --erp-rates # --vms-emas # --taxi-availability # --faulty-traffic-lights # --carpark-availability # --bus-stops # --traffic-images # --traffic-speed-bands # --bus-services # --road-works # to get 'real-time' traffic incidents data lta-datamall-crawler --traffic-incidents ``` ### Motivation Sometimes it can be quite labourous to create boilerplate codes for doing HTTP get requests to different APIs even though the [requests package][2] can make life slightly easier. I've created this project to make life easier for people who are interested in getting traffic data from Singapore LTA datamall. ### Available API | description | freq | url | |------------------------|----------|---------------------------------------------------------------------| | Bus Arrival | 1m | http://datamall2.mytransport.sg/ltaodataservice/BusArrival | | Bus Services | ad-hoc | http://datamall2.mytransport.sg/ltaodataservice/BusServices | | Bus Routes | ad-hoc | http://datamall2.mytransport.sg/ltaodataservice/BusRoutes | | Bus Stops | ad-hoc | http://datamall2.mytransport.sg/ltaodataservice/BusRoutes | | Taxi Availability | 2m | http://datamall2.mytransport.sg/ltaodataservice/Taxi-Availability | | Carpark Availability | 1m | http://datamall2.mytransport.sg/ltaodataservice/CarParkAvailability | | ERP Rates | ad-hoc | http://datamall2.mytransport.sg/ltaodataservice/ERPRates | | Estimated Travel Times | 5m | http://datamall2.mytransport.sg/ltaodataservice/EstTravelTimes | | Faulty Traffic Lights | 2m | http://datamall2.mytransport.sg/ltaodataservice/FaultyTrafficLights | | Road Openings | 1d | http://datamall2.mytransport.sg/ltaodataservice/RoadOpenings | | Road Works | 1d | http://datamall2.mytransport.sg/ltaodataservice/RoadWorks | | Traffic Images | 5m | http://datamall2.mytransport.sg/ltaodataservice/Traffic-Images | | Traffic Incidents | 2m | http://datamall2.mytransport.sg/ltaodataservice/TrafficIncidents | | Traffic Speed Bands | 5m | http://datamall2.mytransport.sg/ltaodataservice/TrafficSpeedBands | | VMS / EMAS | 2m | http://datamall2.mytransport.sg/ltaodataservice/VMS | ### Project Roadmap * use as a library in python script * allow HTTP requests with parameters for filtering results * create appropriate unittests [1]:https://www.mytransport.sg/content/mytransport/home/dataMall.html [2]:https://pypi.python.org/pypi/requests/2.11.1 [3]:https://www.mytransport.sg/content/mytransport/home/dataMall.html [4]:http://datamall.mytransport.sg/tool.aspx

近期下载者

相关文件


收藏者