Skip to content

CorrelAid/paris-bikes

Repository files navigation

"Where to build new bicycle parking spots in Paris? Supporting data-driven decision-making with open data"

TL;DR This is the repository of the CorreAid project paris-bikes in collaboration with the City of Paris. The main tangible output is a prototype of the Paris Parking Demand Index. It is a map that shows bike parking supply and indicators for parking demand (using open data) at the scale of IRIS (the smallest statistical spatial units used in France). Click here to run the prototype (it might take up to a minute to load).

Table of Contents

Context

Metropolitan areas like the city of Paris are facing important challenges transitioning to green mobility. Space to build new infrastructures for alternative transport, like bicycle lanes or parking spots, is limited. Often, existing infrastructure has to be repurposed, and there are lots of local restrictions. In the last years, the City of Paris has implemented ambitious goals in terms of mobility transition, which will continue in the years to come.

Paris, and France on a regional and national level, have also started publishing lots of open data on a multitude of platforms, like data.gouv.fr or parisdata.opendatasoft.com.

This raises the question, if (or rather how) all of this data could be used to support decision-making, e.g. on where to build new bike parking spots.

And this is where CorrelAid comes in! (You don't know CorrelAid? Have a look here)

After a first contact for Open Data Day 2022 the mobility agency "Mission Vélo" (Mission Bike) and the innovation office of the City of Paris teamed up with an international group of CorrelAid volunteers to work on this question.

From July to December 2022, the team explored open data repositories, researched approaches of other cities, brainstormed, discussed, designed, and coded. The results can be found in this repository :)

Paris Parking Demand Index

The Paris Parking Demand Index is a web app that visualizes the number of existing bicycle parking spaces in the City of Paris in relation to metrics that might indicate demand for bicycle parking, such as the number of stores or people entering the metro. Aggregated at the IRIS level, the smallest unit of municipal infrastructure in France, this index helps determine how adequately areas are served in terms of parking facilities, while leaving flexibility as to which exact location they should be built. All data used in this project is from French open data portals.

Click here to access a hosted version of the Parking Demand Index (it might take up to a minute to load).

You can also clone the repository and work with the code yourself. See section Project setup.

Screenshot

Blog article

Would you like to learn more about the project, and how we worked together as a group of volunteers to address the challenge of supporting decision-making in the City of Paris with open data?

Check out the blog article about this project! [Link will follow soon]

Contributors and supporters

Meet the project team! (listed in alphabetical order)

Special thanks go to @friep from CorrelAid for helping us setting up the project, to the CorrelAid organization, to Mélanie, Benoît, and Mourad from the City of Paris for taking the time to collaborate with us and thus giving us the chance to work on this interesting project, and to Gaëll from the Learning Planet Institute for setting up the contact, and to the Learning Planet Institute for having CorrelAid as a student club and enabling us to use rooms and infrastructure.

We thank

        

Project setup

Dash application

The is the web app of the Parking Demand Index. It is an interactive map, which allows you to select and combine different metrics to calculate and visualize parking demand for IRIS sectors in Paris.

To start the Dash application server locally, from the root of this repo, execute:

python paris_bikes/dash_application.py

and navigate to http://localhost:5000 in your browser.

Development environment

We use python>=3.10 and poetry to manage our development environment. poetry manages dependencies and makes it easy to create a virtual environment that is compatible with our package. You can install poetry using conda or pip.

To setup a development environment:

poetry install

If you are on Apple Silicon, you might have to install gdal, a dependency of fiona/geopandas. You can do this with homebrew: brew install gdal

To activate the virtual environment:

poetry shell

Data management

We use DVC for data management and version control. DVC is setup to store our data repository on our project's Google Drive (folder name dvcstore).

Important: We stored the files for dvc in a private cloud from CorrelAid, so you won't be able to access the raw data unless you have access to that cloud. However, the feature.geojson file, which you need to run the dash application, is in this GitHub repository. Since we used open data, all the raw data can be found online, see metadata.md.

DVC is easy to use and follows a syntax similar to git.

To install DVC:

DVC is already installed if you followed the Environment setup. If necessary, check here for other installation methods.

If you are a member of the project, copy the config.local file that can be found in the shared Google Drive folder into the .dvc folder.

To get DVC-managed files from the remote repository:

dvc pull

To track a new data file with DVC:

dvc add data/new_file.csv
git commit -m "Add new data file"

To push new DVC-managed files to the remote repository:

dvc push

To sync DVC-managed files with the current git branch/commit:

dvc checkout

A quick starting guide can be found here.

Deploying the application to Google Cloud Run

The application has been deployed on Google Cloud Run and can be found here.

To deploy a new version:

  1. Make sure you have access to the project (contact @operte)
  2. Make sure you are familiar with the Cloud Run Python guide, that you have the Google Cloud CLI installed and initialized
  3. Make sure that .dockerignore and Dockerfile are up-to-date (and ideally try them out locally using e.g. Docker)
  4. Deploy using gcloud run deploy

Project management

Useful links

Definition of Done

How do we know that we're really done with a task and have not forgotten anything important? In this project, we use the following Definition of Done:

  • Functionality: the code runs / has no defects
  • Code documentation: the code itself is properly documented
  • Data documentation: metadata of raw files should be documented in data/metadata.md
  • Project documentation such as README/wiki is updated where necessary
    • scope/features of project: what does this project do? How can you run it?
    • setup of project
      • data requirements (files, folders)
      • software requirements (packages, other tooling)
    • developer documentation: things like the definition of done, agreed upon standards, ...
  • Peer Review: someone else has had a look at the code and tested it on their machine
  • Git: the code is ready to be merged to the main branch or is already on the main branch
  • Clean Repository: old, outdated code and files are deleted
  • Consistent code style: code is styled consistently and linted using black

See here for more details.

About

Where to build new bicycle parking spots in Paris? Supporting data-driven decision making with open data

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published