Skip to content

Commit

Permalink
Add RST file on the data schema
Browse files Browse the repository at this point in the history
  • Loading branch information
amrit110 committed Nov 13, 2024
1 parent 5c491cc commit 64d8ded
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ docker compose --env-file .env.development --profile frontend -f docker-compose.

### 📥 Data setup

For a detailed description of the data schema used for the recommendation engine, see [Data Schema](schema.rst).

#### Test data

If you want to test the system without real data, you can generate some dummy testing data:
Expand All @@ -96,7 +98,8 @@ You can follow the next step to load this data and embeddings to ChromaDB.
#### Download service data

If you are using the 211 API or Empower's API, make sure you check with them to see if the API keys are
configured correctly for the geography of interest.
configured correctly for the geography of interest. The scripts fetch data from the respective APIs and
transforms them to be compatible with the [Data Schema](schema.rst).

**GTA data (211 API)**

Expand Down
6 changes: 5 additions & 1 deletion docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
self
api
schema
safety_and_evaluation
```

Expand Down Expand Up @@ -91,6 +92,8 @@ docker compose --env-file .env.development --profile frontend -f docker-compose.

### 📥 Data setup

For a detailed description of the data schema used for the recommendation engine, see [Data Schema](schema.rst).

#### Test data

If you want to test the system without real data, you can generate some dummy testing data:
Expand All @@ -105,7 +108,8 @@ You can follow the next step to load this data and embeddings to ChromaDB.
#### Download service data

If you are using the 211 API or Empower's API, make sure you check with them to see if the API keys are
configured correctly for the geography of interest.
configured correctly for the geography of interest. The scripts fetch data from the respective APIs and
transforms them to be compatible with the [Data Schema](schema.rst).

**GTA data (211 API)**

Expand Down
63 changes: 63 additions & 0 deletions docs/source/schema.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Data Schema
===========

The recommendation system aims to provide users with relevant health resources based on their initial query.
We can use service data from different sources such as the `Ontario 211 API <https://211ontario.ca/211-data/>`_
or the `Empower API <https://www.empower.ca/it>`_. But, for the recommendation system, we use a common schema.

The schema is as follows:

.. code-block:: json
[
{
"id": "1",
"name": "Test Service 1",
"description": "This is a test service 1 providing medical clinic services.",
"latitude": 43.563807766096275,
"longitude": -79.40435634607296,
"phone_numbers": [
{
"number": "574-696-8554",
"type": "primary",
"name": "Test Service 1",
"description": "This is the primary phone number for Test Service 1.",
"extension": "123"
}
],
"address": {
"street1": "994 Yonge Street",
"city": "Toronto",
"province": "ON",
"postal_code": "M5E1 B07",
"country": "Canada"
},
"email": "[email protected]",
"metadata": {
"type": "Medical Clinic",
"languages": [
"English",
"French"
]
}
}
]
The schema is a JSON object with the following fields:

- ``id``: A unique identifier for the service.
- ``name``: The name of the service.
- ``description``: A brief description of the service.
- ``latitude``: The latitude of the service location.
- ``longitude``: The longitude of the service location.
- ``phone_numbers``: A list of phone numbers associated with the service. Each phone number object has two fields:
- ``number``: The phone number.
- ``type``: The type of the phone number (e.g., primary, secondary).
- ``address``: The address of the service. The address object has the following fields:
- ``street1``: The first line of the street address.
- ``city``: The city where the service is located.
- ``province``: The province where the service is located.
- ``postal_code``: The postal code of the service location.
- ``country``: The country where the service is located.
- ``email``: The email address of the service.
- ``metadata``: Additional metadata about the service. The metadata object can have any number of fields.

0 comments on commit 64d8ded

Please sign in to comment.