taxis-vis-frontend

🌐 Interactive Viz. Platform for taxi trip data from any city using React, MapBox, Plotly.js & the beast DuckDB-WASM

https://github.com/vida-nyu/taxis-vis-frontend

Science Score: 75.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • βœ“
    CITATION.cff file
    Found CITATION.cff file
  • βœ“
    codemeta.json file
    Found codemeta.json file
  • βœ“
    .zenodo.json file
    Found .zenodo.json file
  • βœ“
    DOI references
    Found 1 DOI reference(s) in README
  • βœ“
    Academic publication links
    Links to: ieee.org, acm.org
  • β—‹
    Committers with academic emails
  • βœ“
    Institutional organization owner
    Organization vida-nyu has institutional domain (vida.engineering.nyu.edu)
  • β—‹
    JOSS paper metadata
  • β—‹
    Scientific vocabulary similarity
    Low similarity (14.0%) to scientific vocabulary

Keywords

duckdb-wasm frontend plotlyjs reactjs taxis taxisvis urban webassembly
Last synced: 6 months ago · JSON representation ·

Repository

🌐 Interactive Viz. Platform for taxi trip data from any city using React, MapBox, Plotly.js & the beast DuckDB-WASM

Basic Info
  • Host: GitHub
  • Owner: VIDA-NYU
  • Language: JavaScript
  • Default Branch: main
  • Homepage:
  • Size: 91.8 MB
Statistics
  • Stars: 1
  • Watchers: 7
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
duckdb-wasm frontend plotlyjs reactjs taxis taxisvis urban webassembly
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme Citation

README.md

Taxis Vis Icon

Taxis Vis

Frontend-side 🎨

![React](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB) ![Mapbox GL JS](https://img.shields.io/badge/Mapbox%20GL%20JS-3BB3E4?style=for-the-badge&logo=mapbox&logoColor=white) ![Plotly.js](https://img.shields.io/badge/Plotly.js-3F4F75?style=for-the-badge&logo=plotly&logoColor=white) ![DuckDB-WASM](https://img.shields.io/badge/DuckDB--WASM-FFC107?style=for-the-badge&logo=duckdb&logoColor=black) ![Version](https://img.shields.io/badge/Version-0.4.0-red?style=for-the-badge)

[!WARNING] 🚨 Important Notice: This current repository and the Taxis-Vis-Data-Backend are put on hold. The goal was to see what is possible to do with today tools on the Javascript end side for reproducing Taxis-VIS. Now it touches enough yet is not deleted because could be (re-)used. Cheers! @Simon.

_Greetings_ from the **Taxis Vis Frontend**! This project is a component of the larger **Taxis Vis** initiative, which draws inspiration from the paper [_Visual Exploration of Big Spatio-Temporal Urban Data: A Study of New York City Taxi Trips_](https://ieeexplore.ieee.org/abstract/document/6634127/). We aim to _revive_ the paper using _modern_ open-source tools.
Taxis Vis Main Cover

[!IMPORTANT] πŸ“£ Latest News - [0.4.0] πŸš€ DuckDB-WASM Integration & Backend Removal: We have removed Taxis-Vis-GeoSpatial Backend πŸŽ‰ and replaced it with DuckDB-WASM! Thanks to WebAssembly-powered DuckDB, we can now perform the same geo-computations directly in the frontend, making the system more lightweight and efficient. Duck! πŸ¦†βœ¨

  • πŸš€ Taxis Vis Features Videos Available: We have added a series of feature demonstration videos showcasing GeoJSON layer management, Spatial Selections, Query Handling, and Multi-City Exploration. You can find them in the FEATURES.md file of this repository (root).

  • [0.3.0] πŸ—ΊοΈ Migration to Mapbox from Leaflet: We have migrated from Leaflet to Mapbox GL JS for enhanced map performance, interactivity, and styling options. While Mapbox now requires an API access token, it remains largely free for projects like Taxis Vis, where usage stays within 50,000 free map loads per month. We only use tile serving, ensuring a seamless transition. Configure your .env with a valid Mapbox API token (see setup instructions).

  • [0.2.0] 🌎 Taxis Vis Exploration Beyond NYC: Adapt this project for any city with available taxi data and minimal GeoJSON resources. The system architecture is flexible enough to accommodate various schemas and polygon data with minimal config changes.

  • [0.1.0] βœ… Proof of Concept: Reproducing the Taxis-Vis paper is entirely feasible with modern tools like React, Leaflet, DuckDB, Django, and more. We've eliminated the high hurdles of older solutions requiring specialised or custom databases.

πŸš€ Overview

The Taxis Vis Frontend provides geo-spatial insights and interactive visualisations for investigating taxi trip data (βŒ— yes, to any city of interest as long as you have the data that comes with it βŒ— !).

It communicates with:

  1. A DuckDB Web Assembly Module – performing spatial & filtering queries.
  2. A Data Analysis Python Django + Pandas Backend – performing analyses & generating chart data.

While not fully replicating every feature from the paper, this proof-of-concept demonstrates the feasibility of developing a robust, real-time, interactive taxi data exploration tool using today tools without weeks or months of development time.

If you would like to see the current latest version in video examples, please refer to the FEATURES.md file.


β˜€οΈ Key Features

  • Spatial Selections – Draw polygons or lines to define Pickup or Dropoff regions and query them.
  • Spatial Queries – Filter trips based on spatial relationships (e.g., union of Pickup and Dropoff regions, Directional queries, etc.).
  • Temporal Constraints – Combine time ranges with your spatial queries to refine trip filtering.
  • (Optional) Data Analysis – Generate histograms, box plots, scatter plots, and other charts from the filtered data.

[!TIP] πŸ₯± Some Trips & Tricks: - Understanding the queries' outputs: Note that most of the time, blue dots will represent Pickup trips data points, while red dots will represent Dropoff trips data points, regardless of the query.

  • Double-clicking when drawing a polygon will automatically close the shape. Thanks Mapbox Draw! 🌐

πŸ“¦ Installation

Pre-requisites

  • Node.js installed on your system.
  • npm or yarn package manager installed.
  • (Optional) Backend running for full functionality:

Setup

  1. Clone this repository: bash git clone https://github.com/VIDA-NYU/Taxis-Vis-Frontend.git cd Taxis-Vis-Frontend
  2. Install dependencies: bash npm install
  3. Create a .env file and configure Mapbox access:
  • You need a Mapbox API token to use this project. If you don’t have one, sign up at Mapbox to generate an access token.
  • Inside the project root, create a .env file: bash touch .env
  • Open the .env file and add: plaintext REACT_APP_MAPBOX_TOKEN=your-mapbox-access-token-here
  • Replace your-mapbox-access-token-here with your actual Mapbox token. See further Mapbox Access Token.
  1. (Optional) Download Current Config Databases (NYC, DC):
    • To download the current configuration databases for New York City and Washington DC, run: bash pip install gdown # Super Cool OSS to use Google Drive API https://github.com/wkentaro/gdown gdown "https://drive.google.com/uc?id=1eaMIsOabVvYi7M-VWi_6WnZf2n14bXdE"
    • This will download the necessary duckDB database file for New York City. Then, you simply need to drag and drop it into the public/config/taxis_vis_config/NYC/database/ folder || or run: bash mv taxi_vis_nyc.duckdb public/config/taxis_vis_config/NYC/database/

[!TIP]
πŸ’‘ Quick Setup: Instead of running the steps manually, you can simply run:

bash npm run setup:databases # Tested on OSX. Untested on Windows, nor Linux despite being same OSX's core it should be all right.

This will automatically download and place the NYC and DC configuration databases in their respective directories. πŸš€

[!NOTE] For Washington DC, the process is the same, but the link is different:

bash gdown "https://drive.google.com/uc?id=15_LWVegB56-uBwH3i0fuKoMHfL84XWuH" mv taxi_vis_dc.duckdb public/config/taxis_vis_config/DC/database/

  1. Start the development server: bash npm run dev # or npm run start
  2. Open http://localhost:3000 in your browser.

  3. (Optional) Configure Your Own City's Config (saved): We recommend readers to view further in the HOW-TO-CONFIG-OWN-CITY.md file for more details on how to configure your own city's data while saving the configuration.

[!NOTE] If you need to point to different backend URLs, see src/utils/apiUrls.js or adjust your environment variables. By default Django backend's on localhost:8000.


πŸ’‘ Design Philosophy

We started recreating Taxis Vis with the goal of relying on flexible, well-supported semi/open-source tools at every corner of the project.

Carefully selecting React, Mapbox GL JS, DuckDB-WASM, Turf.js, and Plotly.js as both our core UI and database technologies enables us to quickly adapt to new requirements while ensuring that they are well maintained and actively updated.
All in one repository, all on the frontend-client side, makes it very sustainable while efficient. Readers should be noted that this is primarily possible thanks to the WebAssembly module of DuckDB, as discussed in this paper.

Similarly, our data analysis backend leverages Python, Django, and Pandas. This combination allows us to reproduce substantial paper concepts without significant overhead, and in a shorter timeframe. In the long term, it could open the door for machine learning to be leveraged in that region of the overall pipeline.

This philosophy therefore empowers us to create reusable, maintainable libraries of urban-based code that can be easily repurposed and extended for future research and industry projects. As of today, Taxis-Vis Frontend would not be considered a core library at all; rather, it is highly specialised for a specific use-case. However, the architecture is designed with future core libraries in mind. For this long-term vision, see further in OSCUR.

🚧 Limitations

| **Limitation** | **Details** | |---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **Large Data** | Extremely large datasets may degrade performance in the browser. One limitation known with `DuckDB-WASM` is that you cannot upload files larger than 2GB. [Issue #1705](https://github.com/duckdb/duckdb-wasm/issues/1705) | | **Cross-Browser Testing** | Primarily tested on modern browsers (Chrome, Safari, Firefox, etc.). Older browsers might require polyfills. | | **Other Map Management** | The current version uses Mapbox GL JS with a Freemium focus. If you would like to use another map library, it will require reworking the toolbar drawing tools. |

πŸ“– Further Reading

- [Data Analysis Django Backend README](https://github.com/VIDA-NYU/Taxis-Vis-Data-Backend) - [The Original Paper (IEEE)](https://ieeexplore.ieee.org/abstract/document/6634127/)

Happy Exploring!
The Taxis Vis Team

Owner

  • Name: VIDA-NYU
  • Login: VIDA-NYU
  • Kind: organization
  • Location: New York, NY

Visualization, Imaging, and Data Analysis Center at New York University

Citation (CITATION.cff)

cff-version: 1.2.0
message: 'If you use this software, please cite it as below.'
title: 'Taxis Vis: Frontend'
authors:
  - name: Simon Provost
    orcid: https://orcid.org/0000-0001-8402-5464
  - name: Prof. Juliana Freire
    orcid: https://orcid.org/0000-0003-3915-7075
  - name: Prof. Claudio Silva
    orcid: https://orcid.org/0000-0003-2452-2295
  - name: JoΓ£o Rulff
    orcid: https://orcid.org/0000-0003-3341-7059
date-released: 2025-01-27
version: 0.1.0-alpha
url: https://github.com/VIDA-NYU/Taxis-Vis-Frontend
abstract: >
  The Taxis Vis Frontend is the user interface component of the Taxis Vis project, designed to
  provide interactive visualizations and tools for exploring spatio-temporal taxi trip data.

GitHub Events

Total
  • Watch event: 1
  • Push event: 1
  • Public event: 1
Last Year
  • Watch event: 1
  • Push event: 1
  • Public event: 1

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 58
  • Total Committers: 1
  • Avg Commits per committer: 58.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 58
  • Committers: 1
  • Avg Commits per committer: 58.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Provost Simon s****t@e****u 58
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 0
  • Total pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: 13 minutes
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.2
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: 13 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.2
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • simonprovost (5)
Top Labels
Issue Labels
Pull Request Labels
improvement (3) enhancement (1) documentation (1)

Dependencies

package-lock.json npm
  • 2034 dependencies
package.json npm
  • @svgr/core ^8.1.0 development
  • @svgr/plugin-jsx ^8.1.0 development
  • @testing-library/jest-dom ^6.6.3 development
  • @vitejs/plugin-react ^4.3.4 development
  • eslint ^8.57.1 development
  • eslint-config-prettier ^10.0.1 development
  • eslint-import-resolver-alias ^1.1.2 development
  • eslint-plugin-import ^2.31.0 development
  • eslint-plugin-jsx-a11y ^6.10.2 development
  • eslint-plugin-prettier ^5.2.3 development
  • eslint-plugin-react ^7.37.4 development
  • eslint-plugin-react-hooks ^5.1.0 development
  • prettier ^3.5.0 development
  • vite ^6.0.0 development
  • web-vitals ^4.2.4 development
  • @adobe/react-spectrum ^3.39.0
  • @chakra-ui/react ^2.10.5
  • @duckdb/duckdb-wasm ^1.29.0
  • @emotion/react ^11.14.0
  • @emotion/styled ^11.14.0
  • @geoman-io/maplibre-geoman-free ^0.2.27
  • @internationalized/date ^3.7.0
  • @mapbox/mapbox-gl-draw ^1.5.0
  • @mui/icons-material ^6.4.2
  • @mui/material ^6.4.2
  • @react-buddy/ide-toolbox ^2.4.0
  • @react-buddy/palette-chakra-ui ^2.3.1
  • @testing-library/react ^16.2.0
  • @turf/turf ^7.2.0
  • duckdb-wasm-kit ^0.1.38
  • framer-motion ^12.4.2
  • fs ^0.0.1-security
  • lodash.isequal ^4.5.0
  • mapbox-gl ^1.13.3
  • maplibre-gl ^5.1.0
  • plotly.js ^3.0.0
  • prop-types ^15.8.1
  • react ^18.3.1
  • react-dom ^18.3.1
  • react-plotly.js ^2.6.0
  • react-router-dom ^7.1.3
  • react-scripts 5.0.1
  • viject ^1.3.0