devinit / datahub-cms

A better organised version of https://github.com/devinit/digital-platform to act as a CMS for the Data Hub
0 stars 5 forks source link

Set value to NULL for countries that should not show in P20 maps #21

Closed epicallan closed 7 years ago

epicallan commented 7 years ago

Countries like USA shouldn't show in this map, they currently show coz they have a value of zero. If they were sent to NULL they wouldn't show.

This is for data_series.percent_in_p20_national && data_series.poorest_20_percent

I think @akmiller01 should avail new data files to @dw8547 .

screen shot 2017-07-31 at 10 56 06

dw8547 commented 7 years ago

@epicallan & @akmiller01 alternatively provide list of countries to remove from table.

akmiller01 commented 7 years ago

Hi Allan,

I believe that without exception, all countries with zero poverty can be removed. It's only at the subnational level that zero-poverty values are valid.

dw8547 commented 7 years ago

NULLifying in data_series.poorest_20_percent:

 di_id | year | value 
-------+------+-------
 BY    | 2013 |     0
 BY    | 2014 |     0
 BY    | 2015 |     0
(3 rows)

NULLifying in data_series.percent_in_p20_national:

 di_id | year | value 
-------+------+-------
 AT    | 2013 |  0.00
 AU    | 2013 |  0.00
 BE    | 2013 |  0.00
 BY    | 2013 |  0.00
 CA    | 2013 |  0.00
 CH    | 2013 |  0.00
 CY    | 2013 |  0.00
 DE    | 2013 |  0.00
 DK    | 2013 |  0.00
 ES    | 2013 |  0.00
 FI    | 2013 |  0.00
 FR    | 2013 |  0.00
 GB    | 2013 |  0.00
 GL    | 2013 |  0.00
 GR    | 2013 |  0.00
 IE    | 2013 |  0.00
 IL    | 2013 |  0.00
 IS    | 2013 |  0.00
 IT    | 2013 |  0.00
 JO    | 2013 |  0.00
 JP    | 2013 |  0.00
 LU    | 2013 |  0.00
 NL    | 2013 |  0.00
 NO    | 2013 |  0.00
 PS    | 2013 |  0.00
 PT    | 2013 |  0.00
 RU    | 2013 |  0.00
 SE    | 2013 |  0.00
 SG    | 2013 |  0.00
 US    | 2013 |  0.00
(30 rows)
dw8547 commented 7 years ago

Live.