election-live icon indicating copy to clipboard operation
election-live copied to clipboard

Implement filtering code for Landslide Winning zones

Open rapee opened this issue 6 years ago • 5 comments

5. เขตที่ชนะขาด

เขตที่คะแนนของผู้สมัครอันดับ 1 ห่างจากอับดับ 2 เกิน 50%

This is a dynamic filter that filter zones depending on their performances.

image

rapee avatar Mar 23 '19 04:03 rapee

I'm trying out this issue. Will report back in 1-2 hours.

unnawut avatar Mar 23 '19 10:03 unnawut

Question: I looked at #22 and I suppose this filter should be derived the same way, so...

  1. The information should be derived from https://www.ect.go.th/ect_th/ewt_dl_link.php?nid=2236 ?
  2. The link above contains only the results separated by constituency seats and party list seats. Should I use either of them or combined?
  3. I guess there's already machine-readable data somewhere? 😅

Thanks!

unnawut avatar Mar 23 '19 11:03 unnawut

Looks like there's not enough information to derive this based on the available fixtures.

I'm backing down from this issue.

unnawut avatar Mar 23 '19 17:03 unnawut

I think this has to be implemented by filtering the live results?

Looking through src/models/ElectionDataSource.d.ts it seems that the only place where each candidate score is available is through PerProvinceJSON, which we can't use for filtering. There should be a server side filter to add this information to ZoneStats first

whs avatar Mar 24 '19 07:03 whs

You are right. I believe @phoneee is working on it.

unnawut avatar Mar 24 '19 07:03 unnawut