-
Notifications
You must be signed in to change notification settings - Fork 244
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
Safety Data new API #2734
Comments
Hi @atalyaalon , |
Hi @atalyaalon , |
Hi @atalyaalon ,
|
Hi @atalyaalon , @citizen-dror
|
Hi @atalyaalon , @citizen-dror |
Calculated fields: We need the following fields / fields modifications in API. @ziv17 the implementation of the fields below can be done in either python or sql (with SQLAlchemy), they can be done either with offline calculations (and mid tables if needed) OR during API query itself (some of the logic are very light and can be done during query) depends on your choice of implementation. The most important things are:
The calculated fields:
Note that I added in the query the calculation of vehicle_type_short_hebrew
|
As discussed, it's the id field in involved, which is unique for each involve in the table (different from involved_id which is unique only within a specific accident) |
|
I think the API should return 404, @citizen-dror what do you think? |
Hi @atalyaalon , Regarding the calculated fields:
|
Yes.
Yes, I prefer it too, and ideally it will be built with localization in mind, we want to add localization to this API to English in the coming future.
As mentioned in 1 - we separated
|
Existing paths: /involved, /involved/groupby, /city
Regarding hotspots and users, we will implement them in the API after we finish building the current API for the existing state.
You can use the API template I created with swaggerhub, or use another template for your choice.
I want you to take into consideration:
My suggestions and thoughts:
cbs_cities table:
cbs_streets table:
There for either: this won't enable to query a specific street in multiple cities, but I think that's ok for now (if we want to enable this, we will find workaround that is still based on
cbs_involved_for_safety_data table:
However, we can also start "lean" and only keep existing functionality with relevant fields, and later on to add additional fields that are not present.
If we create a new table, I assume this table will be similar to involved_markers_hebrew, just w/o the hebrew fields. Perhaps it's better to save in this table only with integer codes and link it with relevant hebrew views (star schema) for a light table.
The text was updated successfully, but these errors were encountered: