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
# purpose: use changepoint algorithm to determine | |
# appropriate history range for statistical control charts | |
# 0.0 Packages ---- | |
library(ggplot2) # for visualizations | |
library(gridExtra) # for plotting charts together | |
library(lubridate) # for data manipulations | |
library(tidyverse) # for piping data | |
library(reshape2) # for wide to long data transform | |
library(changepoint) # for finding change points in ts data |
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
# purpose: use changepoint algorithm to benchmark | |
# Piketty's time buckets for inflationary periods | |
# 0.0 Packages ---- | |
library(ggplot2) # for visualizations | |
library(gridExtra) # for plotting charts together | |
library(lubridate) # for data manipulations | |
library(tidyverse) # for piping data | |
library(reshape2) # for wide to long data transform | |
library(changepoint) # for finding change points in ts data |
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
# packages | |
library(syuzhet) | |
library(dplyr) | |
library(ggplot2) | |
# subset of text (to start) | |
limiting_beliefs <- "I never had a plan for my career and now it’s too late. | |
I wanted to be X, but didn’t start early enough in life and now it’s too late. | |
I go to work to support my family, not to be fulfilled. | |
I can’t make enough money doing a job I want to do. |
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
# purpose: support article on scenario planning with monte carlo | |
# caution: this is a learning script (for me, and you) | |
# read packages | |
library(dplyr) | |
library(ggplot2) | |
library(tidyr) | |
library(EnvStats) | |
library(MASS) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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(tidyverse) | |
library(ggplot2) | |
# create holder data frame | |
data <- data.frame(magic_number=numeric(), equity_fraction=numeric(), | |
mgmt_span=numeric(), ps_fit=numeric(), | |
salary_growth=numeric()) | |
# create ranges for variables | |
s_set <- 1:20 |
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 packages | |
library(tidyverse) | |
library(ggplot2) | |
library(gganimate) | |
# define initialization parameters | |
the_step <- rep(0, 5) | |
the_options <- c(1,2,3,4,5) | |
print(the_options) |
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
# python3 | |
# this gist helps parse an osm file to identify good | |
# running nodes in an area of interest | |
import xml.etree.cElementTree as ET # to parse OSM file | |
import folium # to create map | |
from folium.plugins import MarkerCluster # to create map | |
import os # to view map | |
import webbrowser # to view map |
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
# Weather Underground API history call format example | |
# http://api.wunderground.com/api/<YOUR_API_KEY>/history_20060405/q/CA/San_Francisco.json | |
start_string = "http://api.wunderground.com/api/<YOUR_API_KEY>/history_" | |
end_string = "/q/MN/Minneapolis.json" | |
the_dates = ['2015-05-24', '2015-10-29', '2015-11-06', '2015-09-27', | |
'2015-04-01', '2015-06-16', '2015-08-28', '2015-08-30', | |
'2015-05-15', '2015-03-06', '2015-01-24', '2015-05-07', | |
'2015-01-02', '2015-09-01', '2015-10-17', '2015-08-10', |
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
#!/bin/bash | |
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ | |
# Install stuff # | |
################# | |
# Install development tools and some misc. necessary packages | |
yum -y groupinstall "Development tools" | |
yum -y install zlib-devel # gen'l reqs |