Published
Edited
Sep 28, 2021
Importers
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// Diese Funktion fragt die Daten für die jeweilige IMEI und Start-/Enddaten ab.
// Wir können die Funktion jetzt immer wieder verwenden, wenn wir Daten abfragen möchten
async function getData(imei, startDateISO, endDateISO) {
const rohdaten = await fetch(
'https://fruchtfolge.agp.uni-bonn.de/db/gps/_all_docs?' +
new URLSearchParams({
include_docs: 'true',
startkey: `"${imei}::${startDateISO}::\uffff"`,
endkey: `"${imei}::${endDateISO}"`
})
);
const json = await rohdaten.json();
return json;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
gps_rohdaten = getData(imei, startDateISO, endDateISO)
Insert cell
Insert cell
map(turf.lineString(gps_rohdaten.rows.map(row => row.doc.pos)))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
map(
turf.lineString(gps_rohdaten_clean.map(point => point.geometry.coordinates))
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more