data-for-change / anyway

ANYWAY - Car accidents map
http://www.anyway.co.il
MIT License
77 stars 244 forks source link

Widget: Seriously injured & killed in Bicycles and Scooter accidents-Line chart #1713

Open MichalOren opened 3 years ago

MichalOren commented 3 years ago

Name Widget display the numbers of cyclists and scooters injuries who were seriously injured or killed in a selected road section. Seriously_injured_killed_in_Bicycles_Scooter

Title מקטע/ עיר ושם רחוב רוכבי אופנים וקורקינט שנפצעו קשה או נהרגו

Visualization image

Visualization explanation Visualization contains Line Graph display sum of injuries etch year in in a selected road section. 2 types of injuries: seriously injured and killed. 3 types of vehicle: bicycles, electric bicycles and electric scooter. Those 3 types reflect what is consider as “soft mobility”. Years are between “year lower bound” (2008) and “year upper bound” (2022) I recommend to display 10 years 2012-2022

Use case This infographic should be displayed when:

  1. bicycles, electric bikes or scooter are mention in news flash.
  2. When the input is only a location (considering those are mainly urban accidents) display the widget if at least half of the included years have data.

SQL query SQL query for line chart (Actually, the location and starting year should be taken from the infographic query.) The query has the flowing parameters:

  1. Yishuv Symbol (same as city code) the output will be Yishuv name in Hebrew.
  2. Year lower bound (currently 2008)
  3. Year upper bound (change over time) (make sure we are counting pepole and not accidents)

Additional context Bicycles: vehicle_type=15 Electric Bicycles: vehicle_type = 23 Electric Scooter: vehicle_type = 21

Information : מספר נפגעים שנפצעו קשה או נהרגו בתאונות אופנים, אופנים חשמליים וקורקינט

ziv17 commented 2 years ago

Hi @MichalOren, If the api call provides location rather than news flash, this widget should not appear? I think currently we do not have the types of vehicles that are mentioned in the news flash. Do you think a simple search for a word like אופניים or קורקינט will be good enough?

MichalOren commented 2 years ago

Hi @ziv17 Thanks for your feedbak. In light of this, I have updated the "use case" section and link to the sql query. Hope this helps...

ziv17 commented 2 years ago

Hi @MichalOren

MichalOren commented 2 years ago

Hi @ziv17

  1. Im not sure what you mean... The query expect Number to identify Yishuv, is that our input ?
  2. Yes. In 2008 there was sparce data on scooters and electric bicycles, I expect it would be more common in recent years.
  3. I have fixed the "Information" text.
ziv17 commented 2 years ago

Hi @MichalOren , regarding 1, I mean that actually the query will use the infographic location, which is either yishuv & street, or road segment.

ziv17 commented 2 years ago

Hi @MichalOren , I updated the description comment (added a comment to the query, and changed the text of when to display.) Is it OK?

atalyaalon commented 2 years ago

Json Structure:

{
"name": "seriously_injured_killed_in_bicycles_scooter",
"data": {
    "items": [
        {
            "label_key": 2018,
            "value": 3
        },
        {
            "label_key": 2019,
            "value": 4
        },
        {
            "label_key": 2020,
            "value": 20
        },
        {
            "label_key": 2021,
            "value": 43
        },
        {
            "label_key": 2022,
            "value": 74
        },
    ],
    "text": {
        "title": "רוכבי אופניים וקורקינט שנפגעו קשה או נהרגו",
        "subtitle": "במקטע צומת טבריה - צומת כפר נחום"
    }
},
"meta": {
    "rank": 32,
    "information": "Ask Product"
}
},

Ask Product regarding the information field

MichalOren commented 2 years ago

Hi @tkalir Information text : מספר הנפגעים שנפצעו קשה או נהרגו בתאונות אופנים, אופנים חשמליים וקורקינט

regarading subtitle as far as i know it is part of the "meta" section @atalyaalon & @ziv17 : is that duplicate information? image

atalyaalon commented 2 years ago

@MichalOren it's not exactly the same string since subtitle has the addition of "במקטע" or "ברחוב" We can create standartization and make sure that we use location info and subtitles from meta section only, for example (perhaps standartization that will include organizing titles and subtitles) If so I suggest we'll perform it in a different issue and pr, and not in this pr - and only after consulting and approving with Daniel @ziv17 what do you think?

atalyaalon commented 2 years ago

@MichalOren in urban resolution - should we filter both street and yishuv or only yishuv?

MichalOren commented 2 years ago

Hi @atalyaalon @tkalir Good point, in urban resolution, probably there will not be enough data per street+yishuv. Lets go with only Yishuv. Regarding Titles and Subtitles - i will rase this issue in our next meeting

tkalir commented 2 years ago

@MichalOren Making sure - the title & subtitle in Hebrew are "רוכבי אופנים וקורקינט שנפגעו קשה או נהרגו" "ב(שם הישוב)" / "בכביש (מספר) במקטע (שם)"

and in English "Severely injured or killed in bike, e-bike, or scooter accidents" "in (yishuv name)" \ "in road (number) in segment (name)" ?

MichalOren commented 2 years ago

Hi @tkalir Road number is in rigth side of the widgets. no need to include "רוכבי אופנים וקורקינט שנפגעו קשה או נהרגו" "ב(שם הישוב)" / במקטע (שם)"

and in English "Severely injured or killed in bike, e-bike, or scooter accidents" "in (yishuv name)" \ "in segment (name)"

MichalOren commented 1 year ago

Hi @tkalir Great job & well done (: Some feedback reproduce https://anyway-infographics-staging.web.app/newsflash/133673

  1. Need update "title" and "information"- in hebrew "title": "רוכבי אופנים וקורקינט שנפגעו קשה או נהרגו", "subtitle": ברחוב הזיתים בגבעת שמואל "information": מספר נפגעים שנפצעו קשה או נהרגו בתאונות אופנים, אופנים חשמליים וקורקינט

  2. "subtitle" should contain "location_text" without road number ( take example from killed_and_injured_count_per_age_group

"text": { "title": "Number of severely injured or killed in bike, e-bike, or scooter accidents", "subtitle": "בגבעת שמואל" } }, "meta": { "widget_digest": "4ce0cd19dce03af188b332db430c8349", "rank": 32, "information": "Severely injured or killed in bike, e-bike, or scooter accidents"

welcome to ask me if something is not clear

MichalOren commented 1 year ago

Reopen due to coding completion