vccs
Composable charting components for Vue 3, ported from Recharts
Web app for uploading infrastructure data and visualizing its exposure to hazards like floods
AI summary · revised during review
DataTypeScript · PythonGitHub @SebKrantzOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
A high-performance web application for analyzing infrastructure assets against hazard layers. Upload spatial datasets (Shapefile, GeoPackage, or CSV) representing infrastructure and visualize their exposure to various hazard risks with interactive maps and statistics.Read the full README ↗A high-performance web application for analyzing infrastructure assets against hazard layers. Upload spatial datasets (Shapefile, GeoPackage, or CSV) representing infrastructure and visualize their exposure to various hazard risks with interactive maps and statistics.
geopandas, xarray, rasterio, pyogrio, pandascd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
mkdir -p data
Create data/hazard_layers.csv with semicolon-delimited format:
hazard;dataset_url;description;background_paper
Flood Hazard 10 Years;https://example.com/flood.tif;Description;Paper URL
python main.py
# Or: uvicorn main:app --reload --host 0.0.0.0 --port 8000
The API will be available at http://localhost:8000
cd frontend
npm install
npm run dev
The application will be available at http://localhost:5173
Upload Infrastructure Data:
lat/lon, latitude/longitude, or y/x)Select Hazard Layer:
Customize Visualization:
View Results:
backend/
├── main.py # FastAPI application entry point
├── app/
│ ├── config.py # Configuration & paths
│ ├── api/
│ │ ├── upload.py # File upload endpoints
│ │ ├── hazards.py # Hazard layer endpoints
│ │ ├── analyze.py # Analysis endpoints
│ │ └── tiles.py # Tile serving endpoints
│ └── utils/
│ └── geospatial.py # Geospatial utilities
├── requirements.txt # Dependencies
└── README.md # Backend setup instructions
frontend/
├── index.html # HTML entry point
├── package.json # NPM dependencies & scripts
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
├── tailwind.config.js # TailwindCSS configuration
├── postcss.config.js # PostCSS configuration
├── README.md # Frontend setup instructions
└── src/
├── main.tsx # React entry point
├── App.tsx # Main app component
├── index.css # Global styles
├── vite-env.d.ts # Vite type definitions
├── components/
│ ├── ui/ # Reusable UI components
│ │ ├── button.tsx
│ │ ├── input.tsx
│ │ ├── select.tsx
│ │ ├── slider.tsx
│ │ ├── card.tsx
│ │ └── dialog.tsx
│ ├── Sidebar.tsx # Collapsible sidebar with controls
│ ├── MapView.tsx # Map component with basemap selector
│ └── BarChart.tsx # Chart component (Recharts)
├── types/
│ └── index.ts # TypeScript type definitions
├── services/
│ └── api.ts # API service functions
└── lib/
└── utils.ts # Utility functions
POST /api/upload - Upload spatial file (Shapefile, GeoPackage, or CSV)GET /api/hazards - List available hazard layersGET /api/hazards/{hazard_id} - Get hazard layer detailsGET /api/hazards/{hazard_id}/stats - Get hazard statistics (min, max, mean)POST /api/analyze - Perform spatial intersection analysisGET /api/tiles/{hazard_id}/{z}/{x}/{y}.png - Get hazard layer tilesFor detailed API documentation, visit http://localhost:8000/docs when the backend is running.
HOST: Server host (default: 0.0.0.0)PORT: Server port (default: 8000)DEBUG: Debug mode (default: False)Hazard Layers CSV (data/hazard_layers.csv):
;)hazard, dataset_urldescription, background_paperInfrastructure Upload Formats:
.shp, .shx, .dbf (and optionally .prj).gpkg fileRun with auto-reload:
uvicorn main:app --reload --host 0.0.0.0 --port 8000
The Vite dev server includes hot module replacement (HMR) for instant updates.
Frontend:
cd frontend
npm run build
Backend:
uvicorn main:app --host 0.0.0.0 --port 8000 --workers 1
Note: Use
--workers 1as the application uses in-memory state for uploaded files and analysis caching. Multi-worker deployment would require Redis or similar for shared state.
GPL-3