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 characters
# These are all the main Causal Map 3 functions except for the NLP functions which are in a separate file. | |
# constants ----------------------------------------------------------------- | |
contrary_color <- "#f2ab73" | |
ordinary_color <- "#058488" | |
# helpers ----------------------------------------------------------------- |
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 characters
library(tidyverse) | |
library(readxl) | |
suppressMessages(library(dendextend)) | |
library(d3heatmap) | |
data <- readxl::read_excel("Data.xlsx",range="A3:CU24",na="NK") | |
mat=data %>% select(-(1:3)) | |
rownames(mat) <- data[1:21,1] | |
mat2 <- mat %>% |
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 characters
# Animation not yet possible natively in DiagrammeR: https://github.com/rich-iannone/DiagrammeR/issues/8 | |
# so this simple hack for Shiny is based on https://stackoverflow.com/questions/27194893/reset-animation-in-shiny-r-studio#27224900 | |
library(shiny) | |
library(DiagrammeRsvg) | |
library(DiagrammeR) | |
ui <- (fluidPage( | |
# Application title | |
headerPanel("Diagrammer Animation"), |
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 characters
<?xml version="1.0" encoding="utf-8"?> | |
<rss version="2.0"> | |
<channel> | |
<title>{{title}}</title> | |
<link>{{blogURL}}</link> | |
<description>The feed of updates on R to {{name}}'s blog.</description> | |
<updated>{{updated}}</updated> | |
<id>{{blogURL}}</id> | |
<author> | |
<name>{{name}}</name> |
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 characters
#!/usr/bin/env python | |
import poppler, os.path, os, time, datetime | |
from bs4 import BeautifulSoup | |
g = open("./output/all.html","w") | |
x="" |
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 characters
#!/usr/bin/env python | |
# see http://socialdatablog.com/extract-pdf-annotations.html | |
myxkfolder="/home/steve/xk/" #you need to set this to where you want your to-dos to appear | |
import poppler, os.path, os, time, datetime | |
for root, dirs, files in os.walk('./'): | |
for lpath in files: |