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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more