Last active
December 21, 2016 05:56
-
-
Save clarkbw/c844120085bfac0bb8238d9b4bac1d85 to your computer and use it in GitHub Desktop.
Revisions
-
clarkbw revised this gist
Dec 21, 2016 . 1 changed file with 4 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,21 +5,9 @@ const YOUR_REDASH = "https://your.redash.io/api/queries/"; // leave this const API_KEY = `?api_key=${API_KEY_ID}`; const RESULT_URL = `${YOUR_REDASH}${QUERY_ID}/results.csv${API_KEY}`; d3.csv(RESULT_URL, function(data) { // you can remove this console log console.log('CSV', data); }); -
clarkbw revised this gist
Sep 1, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ // edit these values const API_KEY_ID = "9352fd37f2f4ce923932c9c6328829a5be7093ea3d"; const QUERY_ID = 1002; const YOUR_REDASH = "https://your.redash.io/api/queries/"; // leave this const API_KEY = `?api_key=${API_KEY_ID}`; const QUERY_URL = `${YOUR_REDASH}${QUERY_ID}${API_KEY}`; // XXX: https://crossorigin.me is needed because this request contains no CORS headers -
clarkbw created this gist
Sep 1, 2016 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ // edit these values const API_KEY_ID = "9352fd37f2f4ce923932c9c6328829a5be7093ea3d"; const QUERY_ID = 1002; // leave this const API_KEY = `?api_key=${API_KEY_ID}`; const YOUR_REDASH = "https://your.redash.io/api/queries/"; const QUERY_URL = `${YOUR_REDASH}${QUERY_ID}${API_KEY}`; // XXX: https://crossorigin.me is needed because this request contains no CORS headers d3.json(`https://crossorigin.me/${QUERY_URL}`, function(error, data) { // you can remove this console log console.log('JSON', error, data); const id = data.latest_query_data_id; const RESULT_URL = `${YOUR_REDASH}${QUERY_ID}/results/${id}.csv${API_KEY}`; // you can remove this console log console.log('url', RESULT_URL); d3.csv(RESULT_URL, function(data) { // you can remove this console log console.log('CSV', data); }); });