Delineo Data Library & Database
You'll need to install node and pnpm first.
Then, you'll want to install PostgreSQL and start the postgres instance.
Next, clone this repository and create a .env file in the root directory with the following schema:
DATABASE_URL=<POSTGRES_DB_URL>
Finally, run the following commands:
pnpm install
pnpm prisma generate
pnpm prisma migrate dev
pnpm devThis will install all dependencies, database migrations, and start the development server.
Used for pinging the backend for uptime
{
"message": "Hello, World!"
}Returns a list of all convenience zones from the backend
{
"data": [
{
"id": 1,
"label": "Barnsdall, OK",
"name": "barnsdall",
"latitude": 36.562036,
"longitude": -96.160775,
"cbg_list": [],
"size": 3477,
"created_at": "2025-02-24T19:22:06.559Z"
}
]
}Creates a new convenience zone for use in simulation and visualization
{
"name": "barnsdall", # internal name
"label": "Null Island", # display name
"latitude": 0.0, # location data
"longitude": 0.0,
"cbg_list": [], # list of associated census block groups
"size": 0 # population size
}Returns the created zone object
{
"data": {
"id": 1,
"label": "Barnsdall, OK",
"name": "barnsdall",
"latitude": 36.562036,
"longitude": -96.160775,
"cbg_list": [],
"size": 3477,
"created_at": "2025-02-24T19:22:06.559Z"
}
}