npm install
npm run devnpm run build
npm run deployYou can control which CSV to load via URL parameters when opening the app (works on GitHub Pages, localhost, etc.). The loader tries the following in order:
-
url param: use a full CSV URL
- Example:
?url=https://my-cdn.example.com/maps/latest.csv
- Example:
-
filename param (with optional bucket): build a URL to a public S3 (or any host)
- Default base: if only
filenameis provided, it resolves to the public buckethttps://pink-slime-public.s3.amazonaws.com/. - With bucket name (S3):
?filename=courier_sda_asd.csv&bucket=my-bucket→https://my-bucket.s3.amazonaws.com/courier_sda_asd.csv - With bucket host:
?filename=courier_sda_asd.csv&bucket=my-bucket.s3.us-east-1.amazonaws.com→https://my-bucket.s3.us-east-1.amazonaws.com/courier_sda_asd.csv - With full base URL:
?filename=courier_sda_asd.csv&bucket=https://static.example.org/data/→https://static.example.org/data/courier_sda_asd.csv
- Default base: if only
-
Env-configured default base + filename
- If no
bucketis provided, the app will useVITE_S3_BASE_URL(orVITE_DATA_BASE_URL), if set, and appendfilenameto it.
- If no
-
Fallbacks
VITE_DATA_URLif defined, otherwisepublic/data.csvincluded in the repo.
Examples on GitHub Pages:
https://towcenter.github.io/semantic-map?filename=courier_sda_asd.csvhttps://towcenter.github.io/semantic-map?filename=courier_sda_asd.csv&bucket=my-buckethttps://towcenter.github.io/semantic-map?url=https://my-bucket.s3.amazonaws.com/courier_sda_asd.csv
Note: The CSV must be publicly readable and served with proper CORS headers.