Instantly share code, notes, and snippets.

Andrew Bannerman flare9x

  • USA
View GitHub Profile
View rectangle_vessel_one_stay_plate.R
# Rectangle Vessels With Stay Plates
# Figure 13-2(a) - Sketch (7)
# 13-9 STAYED VESSELS OF RECTANGULAR CROSS SECTION
# [FIGURE 13-2(A) SKETCHES (7) AND (8)]
#--- Begin single Script
# Material SA-516 Gr 70 (S)
S = 20000
View rectangle_vessel_stresses_tmin.R
# ASME VIII 2017
# 13-4 DESIGN OF VESSELS OF NONCIRCULAR CROSS SECTION
# Figure 13-2(a) Vessels of Rectangular Cross Section
# Selection = Sketch (1)
#--- Begin single script - validate calculations against example problem
# ASME PTB-4-2013 - Example Problem - Header Box Data
# Material = SA516, Grade 70 (S)
View abs_tmin.jl
# ABS Tmin
# 5.1.1 Pipes Subject to Internal Pressure (2002)
ID = 4.0
OD = 4.5
ratio = OD / ID
ratio = 1.125
# Check tmin applies:
View FDA.Event.Study.rbind.weeks.prior.FDA.R
# Scrape Historical FDA events
# Clean Data - Extract Date from text
# Clean up Catalyst Column - remove date, white space
# Sort by ascending date order
# Note 2x non ticker symbols, these are removed
require(XML)
require(dplyr)
require(PerformanceAnalytics)
require(data.table)
View nasdaq_etf_list.R
# Obtain List of ETFS From nasdaq.com
# Andrew Bannerman 10.4.2017
library(data.table)
# Read ETF list csv file from nasdaq.com
# Use fread() from data.table package
# install.packages("data.table")
read.data <- fread("http://www.nasdaq.com/investing/etfs/etf-finder-results.aspx?download=Yes")
View us_census_texas_vacancy_rate.R
# Packages
library(tigris)
library(acs)
library(stringr) # to pad fips codes
library(rgdal) # for readOGR and others
library(sp) # for spatial objects
library(leaflet) # for interactive maps (NOT leafletR here)
library(dplyr) # for working with data frames
library(ggplot2) # for plotting
library(RColorBrewer) # color pallete
View us_census_median_home_value.R
# Packages
library(tigris)
library(acs)
library(stringr) # to pad fips codes
library(rgdal) # for readOGR and others
library(sp) # for spatial objects
library(leaflet) # for interactive maps (NOT leafletR here)
library(dplyr) # for working with data frames
library(ggplot2) # for plotting
library(RColorBrewer) # color pallete
View population_age_6_yr_change.R
# Packages
library(tigris)
library(acs)
library(stringr) # to pad fips codes
library(rgdal) # for readOGR and others
library(sp) # for spatial objects
library(leaflet) # for interactive maps (NOT leafletR here)
library(dplyr) # for working with data frames
library(ggplot2) # for plotting
library(RColorBrewer) # color pallete
View us_census_6yr_population_change.R
# US Census Population 6 yr change
# create a geographic set to grab tabular data (acs)
geo<-geo.make(state=c("TX"),
county="*", tract="*")
#geo<-geo.make(state=c("NY"),
# county=c(5, 47, 61, 81, 85), tract="*")
# !!!! important note -- the package has not been updated to 2013
# data so I'm using the five year span that ends in 2012
View texas_median_rent.R
# Visualise US census median rent
# Packages
library(tigris)
library(acs)
library(stringr) # to pad fips codes
library(rgdal) # for readOGR and others
library(sp) # for spatial objects
library(leaflet) # for interactive maps (NOT leafletR here)
library(dplyr) # for working with data frames