Published
Edited
Apr 21, 2022
Insert cell
Insert cell
infoclimat = import('https://cdn.skypack.dev/infoclimat@1.1.2?min')
Insert cell
infoclimat.getNextWeather("48.856578,2.351828")
Insert cell
infoclimat.getNextWeatherInFrench("48.856578,2.351828")
Insert cell
infoclimat.getWeather("48.856578,2.351828")
Insert cell
infoclimat.getWeather("48.856578,2.351828").then(d => Object.keys(d))
Insert cell
select_keys = infoclimat.getWeather("48.856578,2.351828").then(d => Object.keys(d).filter(d => d.match("(^[0-9])\.")))
Insert cell
weather = infoclimat.getWeather("48.856578,2.351828")
Insert cell
// astuce de https://stackoverflow.com/questions/38750705/filter-object-properties-by-key-in-es6
weather_data = Object.keys(weather)
.filter(key => select_keys.includes(key))
.reduce((obj, key) => {
obj[key] = weather[key];
return obj;
}, {});
Insert cell
weather_data
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