Skip to content

Instantly share code, notes, and snippets.

View andre347's full-sized avatar
🏠
Working from home

Andre de Vries andre347

🏠
Working from home
View GitHub Profile
@andre347
andre347 / app.js
Created May 1, 2020 13:08
Pablo WDC
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);
<!-- 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;"
@andre347
andre347 / app.js
Created August 20, 2019 19:34
Tableau getFilterValues
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()
<?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>
@andre347
andre347 / index.html
Created October 13, 2018 17:19
Tableau Extension: Step 5
<!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>
@andre347
andre347 / index.html
Last active October 13, 2018 17:18
Tableau Extension: Step 4
<!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>
@andre347
andre347 / index.html
Created October 12, 2018 14:49
Tableau Extension: Step 3
<!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>
@andre347
andre347 / index.html
Created October 12, 2018 14:16
Tableau Extension: Step 2
<!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>