Skip to content
New issue

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

Create safety_data_api.yaml #2733

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Create safety_data_api.yaml #2733

wants to merge 3 commits into from

Conversation

atalyaalon
Copy link
Collaborator

No description provided.

@atalyaalon atalyaalon requested a review from ziv17 December 5, 2024 18:08
@ziv17
Copy link
Collaborator

ziv17 commented Dec 9, 2024

Hi @atalyaalon ,
I have a few questions:

  • Does the schema specifies which parameters accept multiple values? Does it specify how the values are separated? I understand that the separation is with a comma.

  • Do we have the following fields of city?
    id_osm, lat, lon,

  • /city response: what is the difference between name and name_he?

  • In the response example for /involved query, the vehicles field has two values separated by a comma:
    "vehicles": "אופניים חשמליים,מכונית"
    Is it a valid value?

@ziv17
Copy link
Collaborator

ziv17 commented Dec 10, 2024

Hi @atalyaalon ,
I have a question regarding רכבים מעורבים. Do they include vehicles that did not have a passenger that was injured? Where are they registered?

@ziv17
Copy link
Collaborator

ziv17 commented Dec 10, 2024

Hi @atalyaalon
In the current system, there are two types parameters for vehicle types:
vcl - I think רכב הנפגע, and
vcli - I think רכבים מעורבים
I only see vcl in the document.

@ziv17
Copy link
Collaborator

ziv17 commented Dec 10, 2024

Hi @atalyaalon
Is there a filter to city size in the new API?

@ziv17
Copy link
Collaborator

ziv17 commented Dec 12, 2024

Hi @atalyaalon ,
Looking at the safety-data site with the developer tools, it seems that the accidents query returns 27 fields, while in the API document 11 are listed. What is the reason for the difference?

accident_timestamp accident_type_hebrew accident_year accident_yishuv_name age_group_hebrew day_in_week_hebrew day_night_hebrew injured_type_hebrew injury_severity_hebrew latitude location_accuracy_hebrew longitude multi_lane_hebrew one_lane_hebrew population_type_hebrew road1 road2 road_segment_name road_type_hebrew road_width_hebrew sex_hebrew speed_limit_hebrew street1_hebrew street2_hebrew vehicle_vehicle_type_hebrew vehicles _id

type: array
items:
type: string
description: List of city names in hebrew (strings)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @atalyaalon , this will be changed to int (yishuv_symbol), right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should. However you and dror should finalize the cities table and queries before implementation since there might be needed some FE changes as well.

schema:
type: array
items:
type: string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @atalyaalon , this will be changed to int, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above - I think this should, and that the yishuv and street queries should be integers based both in FE and in BE. However you and dror should finalize it together since there might be needed some FE changes as well, for example he will need streets API per yishuv, as it exists in ANYWAY Media to display name to user, and send the chosen street/s integer in API.

@ziv17
Copy link
Collaborator

ziv17 commented Dec 29, 2024

Hi @atalyaalon , @citizen-dror ,

Regarding the st (street) parameter in the /involved query, should it be tested against both values street1 or street2?

@atalyaalon atalyaalon linked an issue Jan 1, 2025 that may be closed by this pull request
@atalyaalon
Copy link
Collaborator Author

Hi @atalyaalon , I have a few questions:

  • Does the schema specifies which parameters accept multiple values? Does it specify how the values are separated? I understand that the separation is with a comma.
  • Do we have the following fields of city?
    id_osm, lat, lon,
  • /city response: what is the difference between name and name_he?
  • In the response example for /involved query, the vehicles field has two values separated by a comma:
    "vehicles": "אופניים חשמליים,מכונית"
    Is it a valid value?
  • Indeed separation today is with comma in FE queries. BE needs to support this unless we ask FE to perform changes
  • cities table will be discussed with Dror
  • vehicles query is in a comment in this issue
    It is a valid value as discussed.

@atalyaalon
Copy link
Collaborator Author

Hi @atalyaalon , I have a question regarding רכבים מעורבים. Do they include vehicles that did not have a passenger that was injured? Where are they registered?

I added the vehicles calculation in the issue

@atalyaalon
Copy link
Collaborator Author

Hi @atalyaalon , Looking at the safety-data site with the developer tools, it seems that the accidents query returns 27 fields, while in the API document 11 are listed. What is the reason for the difference?

accident_timestamp accident_type_hebrew accident_year accident_yishuv_name age_group_hebrew day_in_week_hebrew day_night_hebrew injured_type_hebrew injury_severity_hebrew latitude location_accuracy_hebrew longitude multi_lane_hebrew one_lane_hebrew population_type_hebrew road1 road2 road_segment_name road_type_hebrew road_width_hebrew sex_hebrew speed_limit_hebrew street1_hebrew street2_hebrew vehicle_vehicle_type_hebrew vehicles _id

You are correct, we want to have all of these fields and not only the 11 listed in the API

@atalyaalon
Copy link
Collaborator Author

Hi @atalyaalon , @citizen-dror ,

Regarding the st (street) parameter in the /involved query, should it be tested against both values street1 or street2?

I think so - I think it queries both street1 and street (with OR). But please verify with dror

@atalyaalon
Copy link
Collaborator Author

Hi @atalyaalon In the current system, there are two types parameters for vehicle types: vcl - I think רכב הנפגע, and vcli - I think רכבים מעורבים I only see vcl in the document.

You are correct, you can fix it on your request

@atalyaalon
Copy link
Collaborator Author

Hi @atalyaalon Is there a filter to city size in the new API?

I asked Dror regarding only the cities fields used in cities, waiting for his response.

@atalyaalon
Copy link
Collaborator Author

Once we're done with the discussion, I suggest closing this PR w/o merging and merging only your pr #2735

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Safety Data new API
2 participants