Skip to content

Commit c170d6d

Browse files
committed
feat: initial demo website
1 parent a8e529d commit c170d6d

5,380 files changed

Lines changed: 2593532 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pages.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy Demo Dashboard to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
# Only one concurrent deployment; cancel in-progress runs on new push
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
cache: npm
30+
cache-dependency-path: web/package-lock.json
31+
32+
- name: Install dependencies
33+
working-directory: web
34+
run: npm ci
35+
36+
- name: Build Astro site
37+
working-directory: web
38+
run: npm run build
39+
40+
- name: Copy old static demos into new build output
41+
run: |
42+
if [ -d demos ]; then
43+
cp -r demos web/dist/demos
44+
fi
45+
46+
- name: Upload Pages artifact
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: web/dist
50+
51+
deploy:
52+
needs: build
53+
runs-on: ubuntu-latest
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
env
2+
.DS_Store
3+
*.egg-info
4+
*.c
5+
6+
**/__pycache__/
7+
otp/data*

README.md

Lines changed: 160 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,160 @@
1-
# inocs-sum-pt-nsm-optimization-demo
1+
# INOCS SUM PT-NSM Optimization Demo
2+
3+
Static demonstrators for optimization models developed by the INOCS team at INRIA in the context of EU SUM project for shared mobility integrated with public transport.
4+
5+
This repository contains a static web application built with Astro and React, static JSON and GeoJSON datasets used by the demo pages, and a reference OpenTripPlanner setup that was used during data generation.
6+
7+
Live demo: https://inria.github.io/inocs-sum-pt-nsm-optimization-demo
8+
9+
## What this repository contains
10+
11+
- `web/`: the main static website, built with Astro and React, and deployed to GitHub Pages
12+
- `web/public/data/`: static JSON and GeoJSON files consumed by the demo pages
13+
- `demos/`: legacy static demonstrators kept for reference
14+
- `otp/`: reference OpenTripPlanner setup and local runtime data directory
15+
16+
At this stage, the repository is focused on publishing the demonstrators and their static inputs. In future iterations, the Python packages used to generate these datasets for each optimization study will also be published here with their own documentation.
17+
18+
## Demonstration topics
19+
20+
The current demonstrators cover three complementary research directions.
21+
22+
### 1. Public transport and new shared mobility network visualization
23+
24+
The city map demo visualizes transit and shared mobility data for the Geneva living lab. It is used to explore spatial structures such as stops, bike stations, itineraries, grids, and ridership layers derived from GTFS and related geographic processing.
25+
26+
### 2. Bike-sharing station network design
27+
28+
The legacy bike-sharing demonstrator illustrates optimization outputs related to station placement and bike-sharing system design. This demo will be enhanced with latest model updates with results for Geneva living lab.
29+
30+
### 3. Price setting and demand nudging
31+
32+
The dynamic pricing demonstrator exposes optimization outputs related to pricing policies and user behavior simulation for integrated public transport and new shared mobility systems.
33+
34+
## Repository structure
35+
36+
```text
37+
.
38+
├── README.md
39+
├── demos/ # Legacy static demonstrators kept for reference
40+
├── otp/ # OpenTripPlanner reference setup and local data
41+
│ └── docker-compose.yml
42+
└── web/ # Main Astro + React static demo website
43+
├── public/
44+
│ └── data/ # Static JSON and GeoJSON assets used by the site
45+
└── src/
46+
```
47+
48+
More detailed documentation is available in:
49+
50+
- `demos/README.md`
51+
- `web/README.md`
52+
53+
## Static data included in the repository
54+
55+
The website consumes versioned static datasets stored under `web/public/data/`.
56+
57+
- `sum_gtfs_geojson/`: GeoJSON layers derived from GTFS and geographic preprocessing for several spatial configurations in Geneva
58+
- `nsm_pt_dynamic_pricing/`: optimization outputs and derived metrics used by the dynamic pricing demonstrator
59+
60+
These files are committed so the GitHub Pages deployment remains fully static and reproducible.
61+
62+
## Run the web demo locally
63+
64+
From the repository root:
65+
66+
```bash
67+
cd web
68+
npm install
69+
npm run dev
70+
```
71+
72+
Then open:
73+
74+
`http://localhost:4321/inocs-sum-pt-nsm-optimization-demo`
75+
76+
To build the production version locally:
77+
78+
```bash
79+
cd web
80+
npm run build
81+
npm run preview
82+
```
83+
84+
## Legacy static demos
85+
86+
Earlier static demonstrators are preserved in `demos/` for reference and comparison with the new Astro-based site.
87+
88+
See `demos/README.md` for details and local usage.
89+
90+
## OpenTripPlanner reference setup
91+
92+
The repository includes an OpenTripPlanner reference setup in `otp/docker-compose.yml`.
93+
94+
This setup is provided as documentation and reproducibility support: it was used during the preparation of demo inputs, but it is not required to run the published static website.
95+
96+
### Expected input data
97+
98+
The Compose services mount `otp/data/` into OTP at `/var/opentripplanner`.
99+
100+
Before building the graph, place the following files in `otp/data/`:
101+
102+
- `geneva-gtfs.zip`: GTFS archive containing the `.txt` files
103+
- `geneva-osm.pbf`: OSM extract for the target area
104+
105+
Useful sources for Switzerland include:
106+
107+
- https://download.geofabrik.de/europe/switzerland.html
108+
- https://data.opentransportdata.swiss/de/dataset/timetable-2025-gtfs2020
109+
110+
GBFS feeds can be obtained from mobility providers supported by OpenTripPlanner. The MobilityData systems list is available at https://github.com/MobilityData/gbfs/blob/master/systems.csv
111+
112+
### Build the OTP graph
113+
114+
Run from the `otp/` directory:
115+
116+
```bash
117+
cd otp
118+
docker compose --profile build up
119+
```
120+
121+
This runs OTP with `--build --save` and writes the graph into `otp/data/`.
122+
123+
### Serve OTP locally
124+
125+
Run from the `otp/` directory:
126+
127+
```bash
128+
cd otp
129+
docker compose --profile serve up
130+
```
131+
132+
OTP is then available at `http://localhost:8080`.
133+
134+
### Optional cleanup
135+
136+
```bash
137+
cd otp
138+
docker compose --profile build down
139+
docker compose --profile serve down
140+
```
141+
142+
The runtime data under `otp/data/` should remain local and is not intended for publication.
143+
144+
## Deployment
145+
146+
The website is deployed to GitHub Pages from the `web/` Astro build output. The GitHub Actions workflow also copies the legacy `demos/` folder into the published static site.
147+
148+
## Team and publications
149+
150+
This repository is maintained in the context of the INOCS team at INRIA.
151+
152+
Publications: https://team.inria.fr/inocs/publications/
153+
154+
## Roadmap
155+
156+
Planned future additions include:
157+
158+
- Python packages used to generate the demo datasets
159+
- Package-specific documentation for each optimization workflow
160+
- Clearer linkage between demo datasets, code, and related publications

demos/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Legacy demos
2+
3+
This folder contains earlier static demonstrators that predate the Astro-based website in `web/`.
4+
5+
They are kept in the repository for reference, reproducibility, and quick access to previous standalone visualizations. The active public website is now built from `web/`, but these legacy demos are still useful to inspect the original static artifacts associated with each research topic.
6+
7+
## Included demos
8+
9+
### `livinglab_gva_network/`
10+
11+
Static visualization assets for the Geneva living lab, focused on public transport and new shared mobility network exploration. This demo includes JavaScript files for network and ridership map rendering.
12+
13+
### `network_design_bike_stations/`
14+
15+
Legacy demo for bike-sharing station network design. It includes a standalone page, styling, and a GeoJSON file containing selected bike station results.
16+
17+
### `price_setting_demand_nudging/`
18+
19+
Legacy demo for price setting and demand nudging, with static JSON inputs describing origin-destination options, cluster nodes, and metadata used by the visualization.
20+
21+
### `legacy-index.html`
22+
23+
Archived entry page for browsing the legacy static demos.
24+
25+
## Run locally
26+
27+
From the repository root, start a simple static server:
28+
29+
```bash
30+
python -m http.server 8080
31+
```
32+
33+
Then open one of the following:
34+
35+
- Legacy index: `http://localhost:8080/demos/legacy-index.html`
36+
- Geneva living lab demo: `http://localhost:8080/demos/livinglab_gva_network/`
37+
- Bike-sharing network design demo: `http://localhost:8080/demos/network_design_bike_stations/`
38+
- Price setting and demand nudging demo: `http://localhost:8080/demos/price_setting_demand_nudging/`
39+
40+
## Relationship with the main website
41+
42+
The GitHub Pages deployment is built from the Astro application in `web/`. During deployment, this `demos/` folder is copied into the final static output so the legacy pages remain accessible alongside the newer site.

demos/assets/sum_logo.png

3.57 KB
Loading

0 commit comments

Comments
 (0)