This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getData = document.getElementById("getData"); | |
let pablosData = []; | |
async function fetchData() { | |
const value = document.getElementById("valueForURL").value; | |
if (value) { | |
console.log("Getting the data..."); | |
const url = `https://servicios.ine.es/wstempus/js/ES/DATOS_METADATAOPERACION/EPA?g1=115:&&g2=18:454&&g3=3:283910&&g4=141:21387&&p=3&&nult=${value}&&tip=A`; | |
const resp = await fetch(url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- loading the tableau js file --> | |
<script src="https://public.tableau.com/javascripts/api/tableau-2.min.js"></script> | |
<!-- setting up the containers for the tableau viz and the buttons --> | |
<!-- we assign IDs so we can grab on to them in JS --> | |
<!-- we also add some styles which mean the buttons show up on the right hand side of the dashboards --> | |
<div id="rootTableau" style="display: flex;"> | |
<div id="vizContainer"></div> | |
<div | |
id="buttonContainer" | |
style="display: flex; flex-direction: column;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initializeViz() { | |
const url = "https://public.tableau.com/views/RegionalSampleWorkbook/Storms"; | |
const div = document.getElementById("container"); | |
let options = { | |
// when the viz has finished loading get the workbook | |
onFirstInteractive: () => { | |
let workbook = viz | |
.getWorkbook() | |
.getActiveSheet() | |
.getWorksheets() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest manifest-version="0.1" | |
xmlns="http://www.tableau.com/xml/extension_manifest"> | |
<dashboard-extension id="com.theinformationlab.extensions.datarefresh" extension-version="1.0.0"> | |
<default-locale>en_US</default-locale> | |
<name resource-id="name"/> | |
<description>Data refresh of Tableau Dashboards</description> | |
<author name="Andre de Vries" email="andre.devries@theinformationlab.co.uk" organization="The Information Lab" website="https://www.theinformationlab.co.uk"/> | |
<min-api-version>0.8</min-api-version> | |
<source-location> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Data-Refresh Tableau</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Data-Refresh Tableau</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Data-Refresh Tableau</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Data-Refresh Tableau</title> | |
</head> |