Code Monkey home page Code Monkey logo

bus-timetable-converter's Introduction

Bus Timetable Converter (CSV to JSON)

Introduction

This project is a Python 3 script that converts a given bus timetable in CSV format into a JSON file. The goal is to output a JSON file which can be imported into a MongoDB database.

File structure

Here's a basic overview of the directory:

  • parse.py
    • The main Python script which handles all the conversion from CSV to JSON
  • timetable.pdf
    • The original data found on the Bus website
  • timetable.csv
    • The CSV version of timetable.pdf file (See Useful tools section for more info on how this was created).
  • test.csv and test.json
    • The CSV file is the input file and JSON is the output, this is a simpler problem to work with as it has less data. But it is a subset of timetable.csv.

Prerequisites

  • Python 3 installed
  • CSV file in the format which is similar to "timetable.csv" and "test.csv" provided in this project

Useful tools

I did a lot of research on how to convert the timetable.pdf file into a well formatted CSV file. to be honest there isn't a lot of good tools out there, I personally came across 2 that was quick and easy.

  1. https://pdftables.com

    • Easy to use
    • Converts PDF to CSV very well
    • However needs to pay for its service after Trial ends
  2. http://tabula.technology

    • Requires slightly more work to convert PDF to CSV
    • But it is FREE

bus-timetable-converter's People

Contributors

canyon-hao avatar

Watchers

 avatar

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.