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(googleAuthR) | |
library(shiny) | |
library(shinyjs) |
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(googleAuthR) | |
## set scopes for calendar | |
options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/calendar.readonly", | |
googleAuthR.client_id = "XXXX", ## add your Google project client Id | |
googleAuthR.client_secret = "XXXX") ## add your Google project client secret | |
## make sure calendar API is activated for your Google Project at below URL: | |
# https://console.cloud.google.com/apis/api/calendar-json.googleapis.com/overview |
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
## in server.r | |
output$null_plot <- renderDygraph({ | |
## don't output anything unless you have the data ready | |
validate( | |
need(casualImpactData(), "Model Working") | |
) | |
## the data for the plot is in here | |
ci <- casualImpactData()$series | |
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
--- | |
title: "Host image files on Google Cloud storage" | |
author: "Michael Whitaker" | |
date: "January 12, 2017" | |
output: | |
html_document: | |
self_contained: false | |
--- | |
```{r setup, include=FALSE} |
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
I am looking for an enthusiastic self-motivated junior data programmer or student to help with my projects. | |
You are needed to work on an exciting backlog of innovation projects with me and the rest of the team at IIH Nordic. | |
Ideally you will be knowledgeable in R, Python, JS, Google Cloud and experience working with digital marketing APIs, | |
but if you only know one of those and are willing to learn that's a good start - that’s how I started. | |
Please be ready to show some practical experience, thoughts or projects based on the above. | |
IIH Nordic offers a 4 day workweek and exciting prospects. | |
Will consider remote or based out of our office in Copenhagen, Denmark. |
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
sudo: required | |
dist: trusty | |
group: edge | |
language: ruby | |
services: | |
- docker | |
cache: |
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
Rscript -e "setwd('/srv/shiny-server/xxxxx/'); zz<-file('rscript.log', open='wt');sink(zz, type = 'm'); rmarkdown::render('getData.Rmd')" |
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 analytics | |
## | |
## Demo of searchConsoleR R package. | |
## | |
## Version 1 - 10th August 2015 | |
## | |
## Mark Edmondson (http://markedmondson.me) | |
## load the required libraries | |
## (Download them with install.packages("googleAuthR") and install.packages("searchConsoleR" if necessary |
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(idbr) # devtools::install_github('walkerke/idbr') | |
library(ggplot2) | |
library(animation) | |
library(dplyr) | |
library(ggthemes) | |
idb_api_key("Your Census API key goes here") | |
male <- idb1('JA', 2010:2050, sex = 'male') %>% | |
mutate(POP = POP * -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
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()); |