HackMD
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    [2018-02-13 端傳媒 Initium Media:巴士是如何變得不安全的?大埔奪命意外後,兩位車長如是說](https://theinitium.com/article/20180213-hongkong-kmb-bus-accident/](https://theinitium.com/article/20180213-hongkong-kmb-bus-accident/) > 導致車長長期疲勞的,不只是超長工時制度。過往曾出現公司為削減成本,而減少出車率、行內叫「收車」的做法:一條巴士線路原本10部車行駛,只出6部,乘客等車及上車時間延長,於是行車時間亦延長,但載客量可維持不變。「以前有段時間,回到車廠,沒有車給我們開。」尹偉民說。 ### Question: ## 一條巴士線路上现在有多少部车? 问题拆分: 一條 *巴士線路* 上 *现在* 有 *多少部车* ? ### Is this question appropriate? (Should we compare the real time ETA and official time-table instead?) ### 巴士線路 - [x] Structured Data: `stop: JO02W10000` - [x] Geolocation - [x] Visualization: Mapbox? - [x] http://search.kmb.hk/KMBWebSite/ 可以看到网络请求: - [x] 所有巴士站:http://search.kmb.hk/KMBWebSite/Function/FunctionRequest.ashx?action=getallstops - [x] 此巴士站线路: http://search.kmb.hk/KMBWebSite/Function/FunctionRequest.ashx?action=getRoutesInStop&bsiCode=YU05-T-1200-0 - [x] 按一个线路后同时发送 5 个请求: - [x] 此线路信息: http://search.kmb.hk/KMBWebSite/Function/FunctionRequest.ashx?action=getstops&route=182%20%20%20%20%20&bound=1&serviceType=1 - [x] 此线路通知: http://search.kmb.hk/KMBWebSite/Function/FunctionRequest.ashx?action=getAnnounce&route=182&bound=1 - [x] 此线路的特别线路: http://search.kmb.hk/KMBWebSite/Function/FunctionRequest.ashx?action=getSpecialRoute&route=182&bound=1 - [x] 此线路 BBI (不知道什么鬼): http://search.kmb.hk/KMBWebSite/Function/FunctionRequest.ashx?action=getbbiforroute&route=182&bound=1 - [x] 此线路 Schedule: http://search.kmb.hk/KMBWebSite/Function/FunctionRequest.ashx?action=getschedule&route=182&bound=1 [巴士路線及收費資料(英文/繁體中文/簡體中文) ](https://data.gov.hk/tc-data/dataset/hk-td-tis_3-routes-and-fares-of-public-transport/resource/f99b1c3f-4150-4e4a-a351-a30014a60565) ### 现在 Real-time API - [ ] [有没有 API?](http://www.info.gov.hk/gia/general/201601/06/P201601060325.htm) - (六)运输署有否鼓励各公共交通营办商开放旗下交通工具到站的实时数据,让运输署及其他机构发展提供交通服务实时资讯的系统;若有,现时的进展为何;若否,该署会否鼓励该等营办商开放有关数据? - 所涉数据属相关公司所有,数据数量庞大而变化迅速,亦涉及个别营办商的商业营运资料。为进一步方便乘客,运输署正与专营巴士公司商讨,以便在署方的「香港乘车易」智能手机程式加入连结至个别路线实时巴士服务资讯的新功能。当具体安排落实后 blah blah (没有对公众的 API) - [ ] 可否抓包? - [ ] Surge 抓包 DONE - [ ] http://etav3.kmb.hk/?action=geteta&lang=tc&route=2E&bound=1&stop=JO02W10000&stop_seq=7&servicetype=01&updatedTime=1519916030000 ``` curl 'http://etav3.kmb.hk/?action=geteta&lang=tc&route=2E&bound=1&stop=JO02W10000&stop_seq=7&servicetype=01&updatedTime=1519916030000' -H 'Host: etav3.kmb.hk' -H 'Accept: */*' -H 'User-Agent: myBus/1 CFNetwork/894 Darwin/17.4.0' -H 'Accept-Language: en-us' -H 'Accept-Encoding: gzip, deflate' -H 'Connection: keep-alive' --compressed ``` ### 多少部车? - [x] 有了 API, 但是只有每个站点最近3班车的计划到站时间 比如 `3 分钟` `15 分钟计划` `23 分钟计划`, 怎么算现在这条路线有多少部车? ### 展示? - 前端 Mapbox - deck.gl - https://uber.github.io/deck.gl/#/examples/custom-layers/trip-routes - https://uber.github.io/deck.gl/#/examples/core-layers/hexagon-layer ### 其他数据源 - https://data.gov.hk/en-data/dataset/hk-td-tis_3-routes-and-fares-of-public-transport - http://static.data.gov.hk/td/routes-and-fares/dataspec/ptroutefare_dataspec.pdf ### Legal http://www.legco.gov.hk/yr15-16/chinese/panels/tp/papers/tp20160115cb4-595-1-c.pdf 系統的開發和運作涉及專營巴士公司的相當資源,而實時到站數據屬公司的私產,亦涉及商業營運資料。有見及此,專營巴士公司表示現時無意公開數據予其他應用程式開發者免費使用。 So the government regarded the schedule data of buses as the private property of franchised bus companies. This property right is probably exercised throught the copyright of the data. Let's examine the basic question of copyrightability of data. According to the Hong Kong Copyright Ordinance section 4 http://www.hklii.org/eng/hk/legis/ord/528/s4.html "literary work" (文學作品) means any work, other than a dramatic or musical work, which is written, spoken or sung, and accordingly includes— (a)a compilation of data or other material, in any form, which by reason of the selection or arrangement of its contents constitutes an intellectual creation, including but not limiting to a table; (b)a computer program; and (c)preparatory design material for a computer program; https://www.bitlaw.com/copyright/database.html An example of a database that is protected as a compilation would be a database of selected quotations from U.S. Presidents. The individual quotations themselves may or may not be subject to copyright protection. However, the selection of the quotations involves enough original, creative expression that it is protected by copyright. Therefore, a database of quotations will be protected by copyright as a compilation even though some of the quotations are not protected. https://law.stackexchange.com/questions/11359/can-you-copyright-data Subject matter eligible for copyright protection in the US must be expressive and creative. To the extent data are merely measurements of observable fact in the world, they are not copyrightable.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully