Reverse location map colour scale

This commit is contained in:
Tom Russell 2019-01-22 21:40:35 +00:00
parent 84686d3481
commit 1b1a5d9163
3 changed files with 14 additions and 11 deletions

View File

@ -42,23 +42,23 @@
</Style>
<Style name="location_info_count">
<Rule>
<Filter>[location_info_count] &gt;= 5</Filter>
<Filter>[location_info_count] &gt; 0 and [location_info_count] &lt; 2</Filter>
<PolygonSymbolizer fill="#f0f9e8" />
</Rule>
<Rule>
<Filter>[location_info_count] = 4</Filter>
<Filter>[location_info_count] &gt;= 2 and [location_info_count] &lt; 4</Filter>
<PolygonSymbolizer fill="#bae4bc" />
</Rule>
<Rule>
<Filter>[location_info_count] = 3</Filter>
<Filter>[location_info_count] &gt;= 4 and [location_info_count] &lt; 6</Filter>
<PolygonSymbolizer fill="#7bccc4" />
</Rule>
<Rule>
<Filter>[location_info_count] = 2</Filter>
<Filter>[location_info_count] &gt;= 6 and [location_info_count] &lt; 8</Filter>
<PolygonSymbolizer fill="#43a2ca" />
</Rule>
<Rule>
<Filter>[location_info_count] = 1</Filter>
<Filter>[location_info_count] &gt;= 8</Filter>
<PolygonSymbolizer fill="#0868ac" />
</Rule>
</Style>

View File

@ -6,12 +6,13 @@ import './legend.css';
const LEGEND_CONFIG = {
location: {
title: "Location",
description: "% data collected",
elements: [
{ color: '#f0f9e8', text: '>5' },
{ color: '#bae4bc', text: '4' },
{ color: '#7bccc4', text: '3' },
{ color: '#43a2ca', text: '2' },
{ color: '#0868ac', text: '1' }
{ color: '#0868ac', text: '≥80%' },
{ color: '#43a2ca', text: '6080%' },
{ color: '#7bccc4', text: '4060%' },
{ color: '#bae4bc', text: '2040%' },
{ color: '#f0f9e8', text: '<20%' }
]
},
age: {

View File

@ -144,7 +144,9 @@ router.get('/location/:z/:x/:y.png', function(req, res) {
case when b.location_town is null then 0 else 1 end +
case when b.location_postcode is null then 0 else 1 end +
case when b.location_latitude is null then 0 else 1 end +
case when b.location_longitude is null then 0 else 1 end
case when b.location_longitude is null then 0 else 1 end +
case when b.ref_toid is null then 0 else 1 end +
case when b.ref_osm_id is null then 0 else 1 end
) as location_info_count,
g.geometry_geom
FROM