Skip to content

Instantly share code, notes, and snippets.

@jing-jin-mc
jing-jin-mc / Get_ClientID_List.ipynb
Created December 3, 2018 11:36
Google Analytics Reporting API
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jing-jin-mc
jing-jin-mc / Google_Drive.ipynb
Created December 3, 2018 16:11
Connect Jupyter Notebook with Google Sheet
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function myFunction() {
var activeSpreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheet = activeSpreadsheet.getSheetByName('Main');
var resultsheet = activeSpreadsheet.getSheetByName('Result');
var userInputs = sheet.getRange("A3:B").getValues();
var webPropertyId = String(userInputs[0][0]);
var numClients = userInputs[0][1]
for (var i = 0; i<numClients;i++){
var typeOfId = String(userInputs[2+i][1]);
@jing-jin-mc
jing-jin-mc / Automate_User_Deletion.ipynb
Created December 6, 2018 20:16
Get Data from Analytics Reporting API, Connect Jupyter Notebook with Spread Sheet
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jing-jin-mc
jing-jin-mc / AB_Test_Query.ipynb
Created December 10, 2018 17:54
BigQuery Example for getting AB test data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jing-jin-mc
jing-jin-mc / A_Simple_AB_test.ipynb
Created December 16, 2018 13:52
Get AB test data and do a simple AB test Analysis on the result
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function deleteUser() {
var activeSpreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheet = activeSpreadsheet.getSheetByName('Main');
var resultsheet = activeSpreadsheet.getSheetByName('Result');
var userInputs = sheet.getRange("A3:B").getValues();
var webPropertyId = String(userInputs[0][0]);
var numClients = userInputs[0][1]
for (var i = 0; i<numClients;i++){
var typeOfId = String(userInputs[2+i][1]);
@jing-jin-mc
jing-jin-mc / Pandas - Select Data.ipynb
Created December 2, 2020 20:46
select_data.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jing-jin-mc
jing-jin-mc / Pandas - Merge and reshaping.ipynb
Created December 2, 2020 21:46
Pandas - Merge and reshaping
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jing-jin-mc
jing-jin-mc / Pandas - Working with text data.ipynb
Created December 3, 2020 16:44
Pandas - Working with text data.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.