Giter Club home page Giter Club logo

gtfs.edn's Introduction

gtfs.edn

Build Status Clojars Project

The General Transit Feed Specification (GTFS) as pure edn data

Original data taken from https://github.com/google/transit

This is a convenience tool for those who would like to work with GTFS data but dont want to manually recreate it.

Usage

This project can be used in two ways:

  • as a Clojure(script) library

This is very useful if you want to work with this data in your code. There are several convenience functions exposed through the hiposfer.gtfs.edn namespace.

(ns my.namespace
  (:require [hiposfer.gtfs.edn :as gtfs])) 

;; fetch the reference gtfs spec first
;; ONLY for clojure -> in clojurescript you would need to use the git submodule
;; approach. See below
(def gtfs-spec (gtfs/spec))

;; fetch all gtfs fields that are required
(filter :required (gtfs/fields gtfs-spec))

;; fetch all gtfs fields that represent a dataset unique attribute
(filter :unique (gtfs/fields gtfs-spec))

;; fetch all gtfs fields for the "agency.txt" feed
(filter #(= "agency.txt" (:filename %)) (gtfs/fields gtfs-spec))
  • as a git submodule

If you are only interested in the data itself, and would like to use it without Clojure, you can add it as a git submodule. You can use one of the many EDN reader implementations to parse the gtfs data to your convenience.

$ git submodule add https://github.com/hiposfer/gtfs.edn.git

## you will find the gtfs reference spec inside the resources dir
$ my-custom-script parse gtfs.edn/resources/reference.edn

Distributed under LGPL v3

gtfs.edn's People

Contributors

carocad avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

yflim

gtfs.edn's Issues

consider adding a "display" attribute

Most field names are pretty self descriptives, however some are cryptic like desc.

We should have an entry for knowing what to display in case the name is not intuitive

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.