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

Widget: Update accident_count_by_accident_type widget #2122

Closed
MichalOren opened this issue Feb 18, 2022 · 8 comments
Closed

Widget: Update accident_count_by_accident_type widget #2122

MichalOren opened this issue Feb 18, 2022 · 8 comments
Assignees
Milestone

Comments

@MichalOren
Copy link
Collaborator

MichalOren commented Feb 18, 2022

Name
Required changes to widget accident count by accident type

Title
accident_count_by_accident_type widge

Required changes
• Add Title - years and widget name to heading (BE & FE)
• Add filter “top 3 types” results (BE)
• Pie will display only “top 3 types” results (FE)
• Enlarge pie size (FE)
• Remove years details below (FE)
• Add information text (BE)

Visualization explanation
New display
image

Current display
image

Use case
When this infographic should be displayed: allways

Information Tag
Will include the following description:
התפלגות תאונות לפי סוג התאונה במקטע, בפרק הזמן הנבחר. מוצגים 3 סוגי התאונות הנפוצים ביותר במקטע זה.

Additional context

  • Definition will be used by BE team to generate a Json response to FE
  • Definition will be provided by Data team, after internal review
  • Definition will be written in English and should use language agnostic definitions and data structures
    (e.g. SQL columns) as much as possible.
@MichalOren MichalOren modified the milestones: v0.15.0, v0.14.0 Feb 20, 2022
@ziv17 ziv17 self-assigned this Feb 26, 2022
@ziv17
Copy link
Collaborator

ziv17 commented Feb 26, 2022

Hi @atalyaalon @yuvalbl ,
Who from the FE team should I work with to coordinate the API format for this widget?
Thanks, Ziv

@atalyaalon
Copy link
Collaborator

@ziv17 Let's keep the same format for now - since widget already exists in FE, but with multiple categories.
Also, widget uses Hebrew field (accident_type_hebrew), I suggest using the accident_type and create relevant constants.

@atalyaalon
Copy link
Collaborator

Also @shaysw needs to create a similar title to a different widget (#2109) - I suggest you coordinate how this should look like

@ziv17
Copy link
Collaborator

ziv17 commented Mar 10, 2022

Hi @MichalOren , @danielsh28 @atalyaalon
BE work is done and merged. Is there a twin task in the FE repository?

@MichalOren
Copy link
Collaborator Author

MichalOren commented Mar 11, 2022

Hi @ziv17 👍 greate
@atalyaalon @danielsh28
No twin task in the FE repository. will it help if I open one for FE?
I checked recent jason of a newsflash(from 10.03- using postman) i can still see multiple types?
when the change will be visble?

@ziv17
Copy link
Collaborator

ziv17 commented Mar 12, 2022

Hi @MichalOren , what do you mean by "multiple types"?
I do not know what environment you are using. It is visible in this repository in branch dev.

@atalyaalon
Copy link
Collaborator

atalyaalon commented Mar 16, 2022

Local API Link for example- 127.0.0.1:8080/api/infographics-data?news_flash_id=16577&years_ago=8&lang=he
Server API Link for example

    {
        "name": "accident_count_by_accident_type",
        "data": {
            "items": [
                {
                    "accident_type": "התנגשות",
                    "count": 120
                },
                {
                    "accident_type": "החלקה",
                    "count": 4
                },
                {
                    "accident_type": "התהפכות",
                    "count": 3
                }
            ],
            "text": {
                "title": "מספר תאונות לפי סוג"
            }
        },
        "meta": {
            "rank": 6,
            "information": "התפלגות תאונות לפי סוג התאונה במקטע, בפרק הזמן הנבחר. מוצגים 3 סוגי התאונות הנפוצים ביותר במקטע זה."
        }
    },

@MichalOren @ziv17 FYI

@ziv17
Copy link
Collaborator

ziv17 commented Mar 19, 2022

BE work is completed.

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

No branches or pull requests

3 participants