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
/* Loads IFrame Player API Code asynchronously */ | |
var tag = document.createElement('script'); | |
tag.src = "https://www.youtube.com/iframe_api"; | |
var firstScriptTag = document.getElementsByTagName('script')[0]; | |
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); |
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
/* Media Module Config */ | |
s.enableVideoTracking=true | |
if(s.enableVideoTracking){ | |
s.loadModule('Media'); | |
s.Media.autoTrack=false; | |
s.Media.playerName='YouTube'; | |
s.Media.segmentByMilestones=true; | |
s.Media.trackMilestones='25,50,75'; | |
s.Media.trackUsingContextData=true; | |
s.Media.contextDataMapping = { |
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
/*YouTube Player updates required by Adobe Video Tracking module */ | |
var n=0; | |
jQuery('iframe').each(function() { | |
var src = jQuery(this).attr('src'); | |
if(src){ | |
if (src.indexOf('youtube.com') > -1) { | |
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
#import the pandas library | |
import pandas as pd | |
#pull adobe report download into a dataframe; ignorning the comment header | |
df = pd.read_csv("/Users/jasonthompson/Documents/analysis/python/sp/adobe_id.csv", comment="#", header=1) | |
#export cleaned data to a new csv file | |
df.to_csv("/Users/jasonthompson/Documents/analysis/python/sp/adobe_id_no-comments.csv", encoding='utf-8') |
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
# We will use data structures and data analysis tools provided in Pandas library | |
import pandas as pd | |
# Import retail sales data from an Excel Workbook into a data frame | |
path = '/Documents/analysis/python/examples/2015sales.xlsx' | |
xlsx = pd.ExcelFile(path) | |
df = pd.read_excel(xlsx, 'Sheet1') | |
# Let's add a new boolean column to our dataframe that will identify a duplicated order line item (False=Not a duplicate; True=Duplicate) | |
df['is_duplicated'] = df.duplicated(['order_id', 'order_item_id']) |
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
# Load Shiny | |
library(shiny) | |
# Define server logic required to request summary data from Adobe Analytics | |
shinyServer(function(input, output) { | |
# Load RSiteCatalyst | |
library("RSiteCatalyst") | |
# Listen for a click on the 'Get Report Suite Summary' button |
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
#import the urlprase library to break url into components | |
from urlparse import urlparse | |
#import pandas for data processing | |
from pandas import DataFrame, Series | |
import pandas as pd | |
#import URL data | |
df = pd.read_csv("/Users/Documents/analysis/my_urls.csv") |
OlderNewer