Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 

README.md

indego.ericoc.com

About

I previously created a similar website in PHP and I have tried to replicate it here using Python.

I previously made this Python library for the Philadelphia Indego bike-share program to familiarize myself with Python for the first time.

I decided to use the Python library that I wrote to generate pretty current and historical graphs of bicycle availability at https://indego.ericoc.com/ as a way to get even more familiar with Python.

The website uses Flask and I tried to keep it pretty simple since I am (clearly) not a stylish web designer, by any means. I love using simple block characters (█) of different colors to represent bicycles or empty docks at each bike-share station.

Data

I previously stored historical data from the Philadelphia Indego bike-share API in a MySQL database. However, I am currently storing the complete JSON response in PostgreSQL every ten (10) minutes:

indego=> select now();
              now
-------------------------------
 2020-07-18 21:19:36.550102+00
(1 row)

indego=> select min(added) from indego;
              min
-------------------------------
 2019-05-01 01:00:41.994451+00
(1 row)

indego=> select count(added) from indego;
 count
-------
 63919
(1 row)

This PostgreSQL database powers the historical charts on the website.

Charts

With the data that I have recorded from the Indego API, I use Highcharts to generate historical graphs of each station. I even got to write this blog post (for the Highcharts blog)!

I was inspired by the awesome graphs showing the availability of bikes at each station during commuting times on Randal Olsons blog here!

More Information

You can’t perform that action at this time.