Skip to content

A json parser for ptx.transportdata bus stops base on python 3.4

License

Notifications You must be signed in to change notification settings

mattlin4567/PTX-bus-stop-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ptx-transportdata-bus-stops-parser

intro

This parser can only parse .json file from 公共運輸整合資訊平台, you will get explicit information of following data:

  • 台北市公車站牌
  • 新北市公車站牌
  • 桃園市公車站牌
  • 台中市公車站牌
  • 台南市公車站牌
  • 高雄市公車站牌

The ouput file contains stop names in Chinese, English and position datas of longitude, latitue.

Usage

Put .json file which download from 站牌資料 in the "input" folder, and simply run:

$ python parser.py

The results will be created in "output" folder with pre suffix 'parsed_'.

Results

Source json:

[
  {
    "StopUID": "string",
    "StopID": "string",
    "AuthorityID": "string",
    "StopName": {
      "Zh_tw": "string",
      "En": "string"
    },
    "StopPosition": {
      "PositionLat": 0,
      "PositionLon": 0
    },
    "StopAddress": "string",
    "UpdateTime": "string"
  }
]

Output json:

[
  {
    "StopName": {
      "Zh_tw": "string",
      "En": "string"
    },
    "StopPosition": {
      "PositionLat": 0,
      "PositionLon": 0
    }
  }
]

License

MIT

About

A json parser for ptx.transportdata bus stops base on python 3.4

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages