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
{ | |
"reportDescription":{ | |
"source": "realtime", | |
"reportSuiteID":"rtd-example", | |
"metrics":[ | |
{"id":"pageviews"} | |
], | |
"elements": [ | |
{ | |
"id": "page", |
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
{ | |
"real_time_settings":[ | |
{ | |
"metric":"instances", | |
"elements":[ | |
"page", "sitesection", "referringdomain" | |
], | |
"min_granularity":"1", | |
"name":"Content Real Time Report", | |
"ui_report":"true" |
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
library(dplyr) | |
library(ggplot2) | |
library(lubridate) | |
library(XML) | |
#load apple health export.xml file | |
xml <- xmlParse("C:\\Users\\praskry\\Desktop\\apple_health_data\\export.xml") | |
#transform xml file to data frame - select the Record rows from the xml file | |
df <- XML:::xmlAttrsToDataFrame(xml["//Record"]) |
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
library(dplyr) | |
library(ggplot2) | |
library(lubridate) | |
#load steps data into data frame | |
dfsteps <- read.csv("C:\\Users\\praskry\\Desktop\\apple_health_data\\StepCount.csv") | |
str(dfsteps) | |
#make endDate in a date time variable POSIXct using lubridate with eastern time zone | |
dfsteps$endDate <-ymd_hms(dfsteps$endDate,tz="America/New_York") |
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> | |
<head> | |
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
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> | |
<head> | |
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"> | |
</head> | |
<body> | |
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST"> | |
<script> |
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 uploadData() { | |
var accountId = "xxxxxxxx"; | |
var webPropertyId = "UA-xxxxxxxx-x"; | |
var customDataSourceId = "xxxxxxxx"; | |
var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
var maxRows = ss.getLastRow(); | |
var maxColumns = ss.getLastColumn(); | |
var data = []; | |
for (var i = 1; i <= maxRows; i++) { | |
data.push(ss.getRange([i], 1, 1, maxColumns).getValues()); |
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
library(shiny) | |
library(ggvis) | |
runApp(shinyApp( | |
ui <- fluidPage( | |
sidebarLayout( | |
sidebarPanel( | |
uiOutput("choose_dataset") | |
), | |
mainPanel(ggvisOutput("plot1"), ggvisOutput("plot2"), ggvisOutput("plot3")) | |
) |
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
## A script to download and archive Google search console analytics (formerly webmaster tools) | |
## | |
## searchConsoleR package created by Mark Edmondson (http://markedmondson.me) | |
## | |
## This script downloads and writes data to .csv for the most recent day of search console data (3 days ago) | |
## load the required libraries | |
## (Download them with install.packages("googleAuthR") and install.packages("searchConsoleR") if necessary | |
library(googleAuthR) | |
library(searchConsoleR) |
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
## A script to download and archive Google search console analytics (formerly webmaster tools) | |
## | |
## searchConsoleR package created by Mark Edmondson (http://markedmondson.me) | |
## | |
## This script downloads and writes data to .csv for the last 90 days of data available | |
## load the required libraries | |
## (Download them with install.packages("googleAuthR") and install.packages("searchConsoleR") if necessary | |
library(googleAuthR) | |
library(searchConsoleR) |