openaq-fetch icon indicating copy to clipboard operation
openaq-fetch copied to clipboard

Update Netherlands adapter to use API

Open sruti opened this issue 4 years ago • 4 comments

Netherlands data is available through an API https://api.luchtmeetnet.nl/open_api. With it we can:

  • get more accurate data (the current method is sometimes returning -999 when it shouldn't be)
  • programmatically access station data (including coordinates, local authority data provider, and even some metadata)
  • access stations reporting BC data others we may be missing

sruti avatar May 20 '20 00:05 sruti

thx. Already looked into it last year. Then the data interface was crappy then. Will look into it again and hope it is better.

gruijter avatar May 23 '20 07:05 gruijter

Small update: confirmed with someone from luchtmeetnet that

  • the measurements are averaged hourly
  • the "timestamp_measured" parameter returned by the API is the start of the measurement period and we want the end, so an hour should be added (their website does this btw)

sruti avatar May 30 '20 00:05 sruti

This looks promising, I want to compare this to the data that we already have and check for duplicates.

majesticio avatar Feb 03 '23 21:02 majesticio

Going to table this for now. I made a branch called 'lambda-netherlands'. I created a duplicate detector that returned this:

    parameterMatch: 'no2 µg/m³',
    distanceToNearest: '0.4 meters',
    original: {
      location: 'Groningen-Europaweg',
      coordinates: [ 53.2178, 6.5789 ],
      value: 29.5,
      date: '2023-02-13T19:00:00.000Z'
    },
    nearest: {
      location: 'Groningen-Europaweg',
      coordinates: [ 53.217796, 6.578901 ],
      value: 30.77,
      date: '2023-02-13T19:00:00.000Z'
    }
  },
  {
    parameterMatch: 'pm25 µg/m³',
    distanceToNearest: '0.5 meters',
    original: {
      location: 'Enschede-Winkelhorst.',
      coordinates: [ 52.2345, 6.91949 ],
      value: 17.0986,
      date: '2023-02-13T19:00:00.000Z'
    },
    nearest: {
      location: 'Enschede-Winkelshorst',
      coordinates: [ 52.234504, 6.919494 ],
      value: 16,
      date: '2023-02-13T19:00:00.000Z'
    }
  }
]
there are 83 stations with possible duplicates
there are 5 stations with no duplicates

While the values are slightly different (maybe due to a time offset problem) the stations are mostly reporting the same data from the same locations so it does not really enhance our coverage of the Netherlands.

majesticio avatar Feb 13 '23 23:02 majesticio