Commit b4cf70a3 authored by alain's avatar alain 🐙
Browse files

sensor/station name changes for search functionality

parent cbdbd72e
......@@ -53,17 +53,14 @@ export default {
const filterExtended = parameter === "no2" ? true : false
const data = all
.filter(sensor => {
const data = all.filter(sensor => {
return filterExtended ? sensor.extended : true
})
.map(sensor => {
}).map(sensor => {
const sensorData = latest.find(o => +o.id === +sensor.id)
const sensorDataReturn = {
id: sensor.id.toString(),
name: "HOLU-sensor " + sensor.id.toString() + ": " + sensor.name,
name: `HOLU-kit ${sensor.id.toString()}: ${sensor.tag} - ${sensor.name}`,
source: "holu",
type: sensor.extended ? "extended" : "basic",
coordinates: [sensor.longitude, sensor.latitude],
......@@ -78,6 +75,7 @@ export default {
if(dataAgeInHours >= 48 || dataAgeInHours < 0) {
sensorDataReturn.status = 0
offlineSensors.push(sensor.id)
} else if(dataAgeInHours > 8) {
sensorDataReturn.status = 1
} else {
......
......@@ -126,8 +126,7 @@ export default {
delete station.timestamp_measured
station.source = "luchtmeetnet"
station.name = "Officieel station: " + station.name
station.coordinates = station.coordinates //.reverse()
station.name = "Officieel station: " + station.name.replace('-', ' - ')
station.dataAge = (new Date() - new Date(station.timestamp)) / 3600000
return station
......@@ -143,7 +142,7 @@ export default {
stationMeta: function(station, parameter) {
const stationMeta = {
name: station.name,
description: `<span>${station.description}<br /><br /><em>bron data: <a href="https://www.luchtmeetnet.nl/" target="_blank" rel="noopener noreferrer">luchtmeetnet.nl</a></em></span>`
description: `<span>${station.organisation}<br /><br /><em>bron data: <a href="https://www.luchtmeetnet.nl/" target="_blank" rel="noopener noreferrer">luchtmeetnet.nl</a></em></span>`
}
return stationMeta
......
......@@ -2,6 +2,7 @@ import { textsNL } from '../data-on-a-map-app/config/default/texts'
export const texts = {
...textsNL,
search: 'Stations/sensorkits',
about: {
title: "over deze kaart",
body: "<p>Deze kaart toont data van HOLU-sensorkits én die van officiële meetpunten van <a href='https://www.luchtmeetnet.nl/' target='_blank' rel='noopener noreferrer'>luchtmeetnet.nl</a>. Hollandse&nbsp;Luchten is een experimenteel project waarin er onderzoek wordt gedaan naar de <a href='https://hollandseluchten.waag.org/veelgestelde-vragen/over-luchtkwaliteit/#meten' target='_blank' rel='noopener noreferrer'>kwaliteit van sensordata</a>, <a href='https://hollandseluchten.waag.org/veelgestelde-vragen/over-luchtkwaliteit#waarom-worden-fijnstofmetingen-van-holu-sensorkits-gekalibreerd' target='_blank' rel='noopener noreferrer'>kalibratiemethoden</a>, en hoe je sensordata het beste kunt inzetten.</p><small><em>Alle data zijn indicatief en hebben geen juridische betekenis.</em></small>"
......@@ -26,5 +27,5 @@ export const texts = {
},
chartHeaderAddition: "(uurwaarden)",
downloadCsv: "download csv",
downloadInfo: "<small><a class='more' href='https://hollandseluchten.waag.org/data-downloaden/' target='_blank' rel='noopener noreferrer'>meer info over data downloaden en de API</a></small>"
downloadInfo: "<small><a class='more' href='https://hollandseluchten.waag.org/data/' target='_blank' rel='noopener noreferrer'>meer info over data downloaden en de API</a></small>"
}
Subproject commit c63f9fbab66ae7d495e230e27e374bf1be98eec8
Subproject commit 1b57b7b9aa86bf08f9a0be2f204c87aa094436c9
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment