---
# System prepended metadata

title: geobo

---

geobo
===
```javascript=
async function getLatLon(url) {
	return await fetch(url)
		.then(response => {
			return response.text()
		})
		.then(html => {
			var parser = new DOMParser();
			var doc = parser.parseFromString(html, 'text/html')
			return (
				[...doc.querySelectorAll('.table.table-striped tr')]
				.filter(tr => tr.cells[0].textContent.includes('Name') || tr.cells[0].textContent.includes('Centre Point'))
				.reduce((acc, curr) => {
					acc[curr.cells[0].textContent.replace(' ','')] = curr.cells[1].textContent
					return acc
				}, {})
			)
		})
		.catch(err => console.log(err))
}
var list = $('.table.table-striped.table-responsive tbody tr')
	.filter((index,tr) => tr.querySelectorAll('td')[0].textContent.includes('Provincia'))
	.map((index, tr) => { return {name: tr.cells[0].textContent, url: tr.cells[5].childNodes[0].href}})

var result = []
for (var i = 0;i < list.length; i++) {
	var tempo = await getLatLon(list[i].url)
	var res = {
		name: tempo.Name,
		latitud: parseFloat(tempo.CentrePoint.split(',')[0]),
		longitud: parseFloat(tempo.CentrePoint.split(',')[1])
	}
	result.push(res)
}
copy(result)

```