You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add filter panel and enhance institution filtering
Introduces a FilterPanel component to allow filtering institutions by type, region, department, commune, and name. Updates the App to use these filters for both markers and isochrones, and extends the Etablissement and Isochrone types to support richer filtering and linking. Also updates the README with project-specific information and improves ESLint config for type-aware linting.
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
-
5
-
Currently, two official plugins are available:
6
-
7
-
-[@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
-
-[@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
-
10
-
## Expanding the ESLint configuration
11
-
12
-
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
-
14
-
- Configure the top-level `parserOptions` property like this:
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
31
-
32
-
```js
33
-
// eslint.config.js
34
-
importreactfrom'eslint-plugin-react'
35
-
36
-
exportdefaulttseslint.config({
37
-
// Set the react version
38
-
settings: { react: { version:'18.3' } },
39
-
plugins: {
40
-
// Add the react plugin
41
-
react,
42
-
},
43
-
rules: {
44
-
// other rules...
45
-
// Enable its recommended rules
46
-
...react.configs.recommended.rules,
47
-
...react.configs['jsx-runtime'].rules,
48
-
},
49
-
})
50
-
```
1
+
## Uni-Chrono
2
+
3
+
Uni-Chrono is a web application for visualizing isochrones for higher-education institutions in France. It displays universities/schools on a map, and for each one a polygon representing the area reachable in X minutes for a given mode of transport.
4
+
5
+
### What the application does
6
+
7
+
- Fetches the list of higher-education institutions (France) from the MESR open data platform.
8
+
- Displays each institution as a marker on a map (OpenStreetMap via Leaflet).
9
+
- Computes and draws, for each institution, an isochrone (reachable area) based on:
10
+
- the selected time (in minutes),
11
+
- the mode of transport (walking, cycling, driving).
12
+
- Updates the map live when you change the time or transport mode.
13
+
- Shows a progress bar indicating how many isochrones have been computed out of the total.
14
+
- Caches institutions and isochrones in local storage (localStorage) to speed up subsequent loads.
15
+
- Provides a filter panel to search institutions by name, type, region, department, or commune.
16
+
17
+
### Data and services used
18
+
19
+
- Institutions data: dataset "fr-esr-principaux-etablissements-enseignement-superieur" (data.enseignementsup-recherche.gouv.fr), filtered to France.
20
+
- Isochrone computation: Mapbox Isochrone API (supported profiles: walking, cycling, driving). A Mapbox token (VITE_MAPBOX_API_KEY) is required.
21
+
- Basemap: OpenStreetMap tiles, rendered via React-Leaflet.
22
+
23
+
## Start the project (How to run)
24
+
25
+
Prerequisites:
26
+
- Node.js LTS (18+ recommended)
27
+
- A valid Mapbox token for the Isochrone API
28
+
29
+
Environment setup:
30
+
1. Create a `.env` file at the project root (or `.env.local`) and add your key: `VITE_MAPBOX_API_KEY=pk.XXXXXXXXXXXX`
31
+
2. Check `vite.config.ts`: the field `base: '/Uni-Chrono/'` is suited for GitHub Pages deployment under the `Uni-Chrono` repo. Locally, it works as is.
32
+
33
+
Install and run locally:
34
+
1. Install dependencies: `npm install`
35
+
2. Start the development server: `npm run dev`
36
+
3. Open the URL printed by Vite (typically http://localhost:5173).
0 commit comments