NYC Subway Turnstile Data

栏目: IT技术 · 发布时间: 5年前

内容简介:Download NYC subway turnstile data files fromHastily put together in March 2020, structured as a Rails app but the only functionality is to download files and load them into a Postgres table calledThe repo does not currently support the MTA file formats fo

NYC Subway Turnstile Data

Download NYC subway turnstile data files from the MTA's website and load them into a database

Hastily put together in March 2020, structured as a Rails app but the only functionality is to download files and load them into a Postgres table called turnstile_observations

The repo does not currently support the MTA file formats for the time period 5/5/2010–10/11/2014

Initialize database

bundle exec rake db:setup

Example usage

From the Rails console, import a single file:

TurnstileObservation.import_turnstile_observations(date: "2020-03-21".to_date)

Import all files:

TurnstileObservation.
  all_available_dates.
  select { |d| d >= TurnstileObservation::FIRST_DATE_WITH_NEW_FORMAT }.
  each { |d| TurnstileObservation.import_turnstile_observations(date: d) }

After importing files, you have to run another query to set the net_entries and net_exits colums:

TurnstileObservation.set_net_entries_and_net_exits

以上所述就是小编给大家介绍的《NYC Subway Turnstile Data》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

引爆用户增长

引爆用户增长

黄天文 / 机械工业出版社 / 2017-11-1 / 79.00

本书是用户增长领域的开创性著作,是作者在去哪儿、360、百度等知名企业多年用户增长工作的经验总结。宏观层面,从战略高度构建了一套系统的、科学的用户增长方法论;微观层面,从战术执行细节上针对用户增长体系搭建、用户全生命周期运营等总结了大量能引爆用户增长的实操方法和技巧。 不仅有方法论和技巧,而且非常注重实操。对电商、团购、共享经济、互联网金融等4大行业的50余家企业(360、美团、滴滴等)的1......一起来看看 《引爆用户增长》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器