Skip to content

This project utilizes RNN models with LSTM layers to predict bicycle availability at Bicing Barcelona stations in future time frames. Each time period is represented by a unique model, enhancing pattern recognition. The dataset, sourced from Bicing Barcelona

elbanche/Bikesharing_Forecast_with_LSTM-RNN_using_BicingBCN_data

Repository files navigation

Index

Description

This project uses recurrent neural network (RNN) models with LSTM layers to predict the number of bicycles available at Bicing Barcelona stations in future timeframes. An approach has been implemented where individual models are generated for each time interval. During testing, the day has been divided into 30-minute intervals, resulting in a total of 48 time slots and, consequently, the creation of 48 different models. This strategy facilitates the capture of specific patterns and trends for each moment of the day. The data used in this project were provided by Bicing Barcelona and contain detailed historical information about bicycle availability at each station at different time intervals.

Project structure

./data/raw/: Files to process obtained from the official source OpenData Ajuntament Barcelona. All the files from 2023 are here. For the most recent data, users should check online.

./data/dataframes/: Dataframes created to organize the data in a way that makes it easy to consume.

./models/: Contain folders where each one implements different prediction models.

./models/analyze_models.ipynb: Collect the predictions made by each of the models in a single location, and then analyze the results.

./config.json: Centralized configuration file.

Instructions to run

  1. Prepare the development environment:
sudo apt-get update
sudo apt-get install python3-pip
git clone https://github.com/elbanche/Bikesharing_Forecast_with_LSTM-RNN_using_BicingBCN_data.git
cd Bikesharing_Forecast_with_LSTM-RNN_using_BicingBCN_data
pip install -r requirements.txt
chmod +x script.sh
  1. Put all data files into the directory ./data/raw/.

  2. Configure the config.json file

  3. Process the data, train all models, and execute testing for each one using the following instruction:

./script.sh
  1. Analyze the results from the Jupyter Notebook named 'analyze_models'.

Results

The following image shows a comparison between actual values and predictions generated by the model. The predictions correspond to a time window of 3 hours.

image info

Contact

Feel free to reach out to me at elbanche@gmail.com. I'm always open to feedback and ideas.

About

This project utilizes RNN models with LSTM layers to predict bicycle availability at Bicing Barcelona stations in future time frames. Each time period is represented by a unique model, enhancing pattern recognition. The dataset, sourced from Bicing Barcelona

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published