Giter Site home page Giter Site logo

cyrilby / cph-metro-status Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 420 KB

Contains a web scraper that fetches current operational status of the Copenhagen metro as well as a Streamlit app that visualizes the data.

Home Page: https://cph-metro.streamlit.app/

License: GNU General Public License v3.0

Python 99.96% Batchfile 0.04%
metro operations subway transport underground

cph-metro-status's Introduction

Streamlit App

Copenhagen metro operations monitoring tool

  • Author: kirilboyanovbg[at]gmail.com
  • Last meaningful update: 17-03-2024

This project is centered around automatically gathering data from the Copenhagen Metro's website and monitoring its operations over time in order to find out how often (and when) things are most likely to break. To facilitate the communication of the insights gathered, the data is presented visually using a Streamlit app (the app is still under active development as of 17-03-2024).

The project consists of four scripts, which are described shortly below.

Current status

  • The raw data fetched in the process is then stored in a parquet file, after which point it is subjected to further data processing which standardizes the operational status messages and details their implications for passengers.
  • The web scraping of the data requires the use of a browser instance (implemented using the selenium package) to download the correct data.
  • Finally, some data visualizations are prepared based on the processed data. Please note that the latter is in the idea phase as of 05-03-2024.

get_data.py

This script is designed to automatically collect data on the operational status of the Copenhagen Metro and record disruptions. In practice, this happens by scraping the Metro's website, locating the relevant information and then storing it in local *.csv and *.pkl files.

summarize_data.py

In this script, we import data on the Copenhagen Metro's operational status collected at different timestamps, then add some information on what the status recorded means, then create various tables containing aggregate data. These tables are then exported and can be used for data visualization etc.

upload_data.py

This script is designed to refresh all output data tables in the relevant Azure data lake blob so that we can enable subsequent queries to get the data and use it for e.g. data visualization purposes. The data stored on Azure is then imported for use in the Streamlit app associated with the project.

visualize_data.py

This script contains the source code of the Streamlit app accompanying the CPH metro scraper tool. In here, we create a series of data visualizations that help us get a better understanding of how often the metro breaks down, when and where the impact is felt as well as what the reasons behind the breakdowns are (if information on those is available). The streamlit app can then be run locally or accessed through its website.

cph-metro-status's People

Contributors

cyrilby 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.