Skip to main content

Prediction of bike sharing usage.

Project description

Prediction of Bike Sharing Usage based on Citibike New York Data in 2018

Please download and open the html files to see the plots. The available plots demonstrate the stations with the highest Departures and Arrivals.

To install, please do:

pip install bspred

Key Variables

Arrivals: number of trips that end at a station per day.

Departures: number of trips that start at a station per day.

Characteristic prediction: prediction of bike sharing usage at a specific location, given that there are no bike stations in a vicinity of the location.

Dependency

keras

Description

This is a project in progress.

There are two kinds of prediction available. All predictions come with asymptotic 95% confidence intervals.

import bspred
import numpy as np
import pandas as pd

data = pd.DataFrame({
'latitude':[40.75058535], 
'longitude':[-73.99468482]
})
  1. Prediction of bike sharing usage without current Citibike stations.

Please notice that this is not the true bike sharing usage, but rather an order of magnitude analysis.

bspred.predict(data)

The results will be:

Arrivals = 826.452942,

Departures = 839.163513.

  1. Prediction of bike sharing usage given the current active Citibike stations.
bspred.predict_with_Citibike(data)

The result will be a pandas dataframe of the predicted bike sharing usage at current bike stations and the newly added ones.

The last row of the dataframe, which is the prediction of bike sharing usage at the new bike station, will be:

Arrivals = 441.030067,

Departures = 474.2624.

If removing some current Citibike stations is desired, a list of the station names can be passed as remove_list:

bspred.predict_with_Citibike(data, remove_list = [])

The names can be extracted from https://member.citibikenyc.com/map/.

Or, to view the current Citibike trip history data, run:

path = bspred.get_path()
df = pd.read_csv(path + '/stations_reshaped.csv', sep=',', engine='python')
df

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bspred, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size bspred-0.0.5-py3-none-any.whl (4.2 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size bspred-0.0.5.tar.gz (4.2 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page