We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#316 uploaded the scorecard data for the CT map, but we still need to upload the GeoJSON.
Refer to the README for an overview of the monorepo structure & key commands: https://github.com/ParkingReformNetwork/parking-lot-map?tab=readme-ov-file#parking-lot-map
tl;dr:
pnpm -F ct start
Cities/locations are identified by kebab-case, like Hartford - Downtown -> hartford-downtown. This ID is used so the map knows what data to load.
Hartford - Downtown
hartford-downtown
In TypeScript, given a name, you can use lodash-es with kebabCase:
lodash-es
kebabCase
parking-lot-map/packages/shared/src/js/model/cityId.ts
Lines 23 to 25 in c7fd0d8
In Python, given a name, you can use this code:
def name_to_id(v: str) -> str: return v.lower().replace(" - ", "-").replace(" ", "-")
We organize the city boundaries into one file: https://github.com/ParkingReformNetwork/parking-lot-map/blob/main/packages/ct/data/city-boundaries.geojson
Each city should be a single entry in Features, with the geometry.type set to Polygon. Each entry must have properties.id set to that place's ID.
Features
geometry.type
Polygon
properties.id
The two current entries should be deleted and come from the main map.
The entries should be sorted alphabetically by city ID.
You'll probably want to reuse this code:
parking-lot-map/packages/scripts/src/base.ts
Lines 40 to 96 in c7fd0d8
Consider using the script https://github.com/ParkingReformNetwork/parking-lot-map/blob/main/packages/scripts/src/add-city.ts.
Each city has its own file. The file name must be city-id.geojson in the folder https://github.com/ParkingReformNetwork/parking-lot-map/tree/main/packages/ct/data/parking-lots, like hartford-downtown.geojson.
city-id.geojson
hartford-downtown.geojson
The file does not need to set properties.id, although it doesn't really matter.
The file is expected to set the geometry to MultiPolygon:
MultiPolygon
parking-lot-map/packages/ct/data/parking-lots/hartford-downtown.geojson
Lines 6 to 8 in c7fd0d8
You probably want to use this code:
Lines 112 to 161 in c7fd0d8
Or this script https://github.com/ParkingReformNetwork/parking-lot-map/blob/main/packages/scripts/src/add-city.ts.
I suspect it will be easiest to use https://github.com/ParkingReformNetwork/parking-lot-map/blob/main/packages/scripts/src/add-city.ts. However, some thoughts:
pnpm fmt
Run pnpm -F ct start. Manually drag around the map to a few (or all) of the places to ensure their parking lot data loads, which is lazy.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
#316 uploaded the scorecard data for the CT map, but we still need to upload the GeoJSON.
How to work with this repo
Refer to the README for an overview of the monorepo structure & key commands: https://github.com/ParkingReformNetwork/parking-lot-map?tab=readme-ov-file#parking-lot-map
tl;dr:
pnpm -F ct start
to start the serverCity IDs
Cities/locations are identified by kebab-case, like
Hartford - Downtown
->hartford-downtown
. This ID is used so the map knows what data to load.In TypeScript, given a name, you can use
lodash-es
withkebabCase
:parking-lot-map/packages/shared/src/js/model/cityId.ts
Lines 23 to 25 in c7fd0d8
In Python, given a name, you can use this code:
City boundaries
We organize the city boundaries into one file: https://github.com/ParkingReformNetwork/parking-lot-map/blob/main/packages/ct/data/city-boundaries.geojson
Each city should be a single entry in
Features
, with thegeometry.type
set toPolygon
. Each entry must haveproperties.id
set to that place's ID.The two current entries should be deleted and come from the main map.
The entries should be sorted alphabetically by city ID.
You'll probably want to reuse this code:
parking-lot-map/packages/scripts/src/base.ts
Lines 40 to 96 in c7fd0d8
Consider using the script https://github.com/ParkingReformNetwork/parking-lot-map/blob/main/packages/scripts/src/add-city.ts.
Parking lots
Each city has its own file. The file name must be
city-id.geojson
in the folder https://github.com/ParkingReformNetwork/parking-lot-map/tree/main/packages/ct/data/parking-lots, likehartford-downtown.geojson
.The file does not need to set properties.id, although it doesn't really matter.
The file is expected to set the geometry to
MultiPolygon
:parking-lot-map/packages/ct/data/parking-lots/hartford-downtown.geojson
Lines 6 to 8 in c7fd0d8
You probably want to use this code:
parking-lot-map/packages/scripts/src/base.ts
Lines 112 to 161 in c7fd0d8
Or this script https://github.com/ParkingReformNetwork/parking-lot-map/blob/main/packages/scripts/src/add-city.ts.
Tip with the add city script
I suspect it will be easiest to use https://github.com/ParkingReformNetwork/parking-lot-map/blob/main/packages/scripts/src/add-city.ts. However, some thoughts:
pnpm fmt
after running the script to pretty-format the GeoJSONHow to test it works
Run
pnpm -F ct start
. Manually drag around the map to a few (or all) of the places to ensure their parking lot data loads, which is lazy.The text was updated successfully, but these errors were encountered: