Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to habitatmap to prevent missing geometries #39

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions fetcher/providers/habitatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
const measures = new Measures(FixedMeasure);

const locations = await fixed_locations(source);
console.log(locations)

Check failure on line 27 in fetcher/providers/habitatmap.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon

if (!locations.length) {
console.warn('No fixed locations returned, exiting.');
return { source_name: 'habitatmap:fixed', locations: 0, measures: 0 };
Expand Down Expand Up @@ -132,7 +134,8 @@
usernames: '',
sensor_name: 'airbeam2-pm2.5',
measurement_type: 'Particulate Matter',
unit_symbol: 'µg/m³'
unit_symbol: 'µg/m³',
is_indoor: false,

Check failure on line 138 in fetcher/providers/habitatmap.js

View workflow job for this annotation

GitHub Actions / build

Unexpected trailing comma
};

const url = new URL('/api/fixed/active/sessions.json', source.meta.url);
Expand All @@ -144,7 +147,7 @@
url: url
});

return res.body.sessions;
return res.body.sessions.filter(d=>d.latitude!=200);

Check failure on line 150 in fetcher/providers/habitatmap.js

View workflow job for this annotation

GitHub Actions / build

Expected parentheses around arrow function argument

Check failure on line 150 in fetcher/providers/habitatmap.js

View workflow job for this annotation

GitHub Actions / build

Expected '!==' and instead saw '!='

Check failure on line 150 in fetcher/providers/habitatmap.js

View workflow job for this annotation

GitHub Actions / build

Operator '!=' must be spaced
}

async function mobile_measures(source, station_id) {
Expand Down
Loading