Published
Edited
Oct 10, 2021
2 forks
2 stars
Insert cell
md`# Time Series Analysis with GeoBlaze: Mean Daily Air Temperature for the Month of May

## By Daniel J. Dufour and Victoria Mak

**Explanation**: Daily Mean Air Temperatures at 2 metres averaged over 1 Month for a given Bounding Box

### Citation:
Karger, D.N., Conrad, O., Böhner, J., Kawohl, T., Kreft, H., Soria-Auza, R.W., Zimmermann, N.E., Linder, H.P. & Kessler, M. (2017) Climatologies at high resolution for the earth’s land surface areas. Scientific Data 4, 170122.

Karger, D.N., Conrad, O., Böhner, J., Kawohl, T., Kreft, H., Soria-Auza, R.W., Zimmermann, N.E., Linder, H.P., Kessler, M. (2017) Data from: Climatologies at high resolution for the earth’s land surface areas. Dryad Digital Repository. https://doi.org/10.5061/dryad.kd1d4

### Sources:
http://chelsa-climate.org/wp-admin/download-page/CHELSA_tech_specification.pdf`
Insert cell
month = "05"
Insert cell
start_year = 1979
Insert cell
end_year = 2013
Insert cell
lodash = require("lodash")
Insert cell
years = lodash.range(1979, 2013 + 1)
Insert cell
bounding_box = {
return { xmin: -107.3583984375, xmax: -90.65917968749999, ymin: 24.766784522874453, ymax: 37.47485808497102 };
}
Insert cell
urls = years.map(year => `https://s3.amazonaws.com/geoblaze/CHELSA/CHELSA_tmean_${year}_${month}_V1.2.1.resized.tif`);

Insert cell
geoblaze = require('geoblaze')
Insert cell
georasters = Promise.all(urls.map(geoblaze.load))
Insert cell
georasters[0].toCanvas({ height: 500, width: 500 })
Insert cell
means = georasters.map(georaster => geoblaze.mean(georaster, bounding_box)[0])
Insert cell
Plotly = require("https://cdn.plot.ly/plotly-latest.min.js")
Insert cell
x = years.map(year => `${year}-${month}`)
Insert cell
y = means.map(mean => {
const kelvin = mean / 10;
const celsius = kelvin - 273.15;
const farenheit = (celsius * 9/5) + 32;
return farenheit;
});
Insert cell
{
var trace = {
type: "scatter",
mode: "lines",
name: 'y',
x: x,
y: y,
line: {color: '#17BECF'}
}
var data = [trace];
var layout = {
title: 'Mean Daily Air Temperature for the Month of May (Farenheit)',
width: width
};
const div = DOM.element('div');
Plotly.newPlot(div, data, layout);
return div;
}
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