jsilke / TfL-API-Exploration

Playing around with the TfL API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transport for London API exploration Issues Last Commit Code style: black

This repo is adapted from the first mini-project in Lighthouse Labs' Data Science bootcamp.

Motivation

The main goal of this project is to practice making HTTP requests and extracting values from complex lists and nested dictionaries using the Transport for London API.

The results of the following tasks were suggested for presentation:

  • Print a response JSON object from TfL's AirQuality API.
  • Parse the dictionary and print the AirQuality predictions for tomorrow.
  • List the different modes of transport which are operated by TfL. State how many modes they have.
  • State the number of BikePoints in London that are operated by TfL. State the total number of docks in all BikePoints.
  • State the number of tube and bus lines in London. Print the names of all tube lines.
  • State the number of stations on the victoria line.
  • Plan the journey from Heathrow Airport to Tower Bridge using Bus and Tube and display the version of each in minutes.

The solutions to these tasks are provided in the solutions notebook.

Structure

.
│   .gitignore
│   README.md
│   constants.py      # API configuration constants.
│   solutions.ipynb   # Notebook containing task solutions.
│   task_functions.py # Abstracted functions for each task.
│   utility.py        # Utility functions to solve the tasks.

How to use this project

Open the solutions notebook and run all cells to produce current solutions to the tasks directly from TfL's API.

About

Playing around with the TfL API


Languages

Language:Jupyter Notebook 60.4%Language:Python 39.6%