Weather dashboard
https://natronics.org/weather/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
450 B
13 lines
450 B
var d3 = require('d3')
|
|
import {readxml} from './data.js'
|
|
import {render_astronomy, render_temperature} from './render.js'
|
|
|
|
let canvas = d3.select('svg')
|
|
|
|
//const url = 'https://forecast.weather.gov/MapClick.php?lat=39.9243509&lon=-75.1696126&FcstType=digitalDWML'
|
|
const url = '/forcast.xml'
|
|
d3.xml(url).then(function(xmldoc) {
|
|
let data = readxml(xmldoc)
|
|
render_astronomy(canvas, 80, 25, data)
|
|
render_temperature(canvas, 500, 80, data)
|
|
})
|