From 5f623600fb3fe1376b697a64fb82e2f9a50a0c79 Mon Sep 17 00:00:00 2001 From: Per Liedman Date: Mon, 9 Mar 2020 08:51:50 +0100 Subject: [PATCH] =?UTF-8?q?Add=20Tr=C3=A4dportalen=20as=20a=20source?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources.js | 1 + sources/sweden.js | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 sources/sweden.js diff --git a/sources.js b/sources.js index 4387947..62fd105 100644 --- a/sources.js +++ b/sources.js @@ -463,6 +463,7 @@ module.exports = [ ...require('./sources/france'), ...require('./sources/usa'), ...require('./sources/germany'), + ...require('./sources/sweden'), ]; /* diff --git a/sources/sweden.js b/sources/sweden.js new file mode 100644 index 0000000..2dc0e16 --- /dev/null +++ b/sources/sweden.js @@ -0,0 +1,19 @@ +module.exports = [ + { + id: 'tradportalen', + info: 'https://www.tradportalen.se/Summary.aspx', + download: 'https://tradportalen.s3.eu-north-1.amazonaws.com/tradportalen.zip', + format: 'zip', + filename: 'data/combined.json', + short: 'Trädportalen', + long: 'Trädportalen', + country: 'Sweden', + crosswalk: { + scientific: x => String(x.Species).split(', ')[1], + common: x => String(x.Species).split(', ')[0], + height: 'Height', + dbh: x => Number(x['TrunkCircumference']) / 3.14159 * 2, + }, + country: 'Sweden' + } +]