Public
Edited
Mar 15, 2023
1 fork
Insert cell
Insert cell
Insert cell
str_meses = ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre']
Insert cell
horas = Array.from({length: 6}, (x,i) => i*4)
Insert cell
meses = Array.from({length: 12}, (x,i) => i)
Insert cell
mundo = d3.json('https://gist.githubusercontent.com/nestorandrespe/ac4c33022872c39d55da9b645527de2b/raw/7d848fb5faa553e9b8f6dfcf0279c3852c3dc0d4/World%2520contours%2520low.json')
Insert cell
sphere = ({type: "Sphere"})
Insert cell
antipode = ([longitude, latitude]) => [longitude + 180, -latitude]
Insert cell
projection = d3.geoOrthographic().scale(300)
Insert cell
solar = require("solar-calculator@0.3/dist/solar-calculator.min.js")
Insert cell
sun(1,1,2)
Insert cell
sun = (d,m,h=0) => {
const now = new Date(2020,m,d,h,0,0,0);
// console.log(new Date())
const day = new Date(2020,m,d).setUTCHours(0, 0, 0, 0);
const t = solar.century(day);
const longitude = (day - now) / 864e5 * 360 - 180;
return [longitude - solar.equationOfTime(t) / 4, solar.declination(t)];
}
Insert cell
import { renderTextArray, renderTextPaths } from '@meetamit/hershey-fonts'
Insert cell
html`<style>
.legend_h, .legend_m {font-family: 'Lato', sans-serif; stroke: white}
</style>`
Insert cell
html`<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@300&display=swap" rel="stylesheet">`
Insert cell
d3 = require('d3@6',"d3-geo@2", "d3-geo-projection@3")
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