- results need to be reproducible
- Documentation of code
- easier to read and understand later on to extend
- Great for making reports as well
- Sharing results leads to facilitating discussion
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
require(Quandl) | |
symbolList <- c("AMZN","GOOG", "MSFT", "AAPL", "GLW", "HAL") | |
data <- data.frame("Date" = c(), | |
"Effective Tax Rate" = c(), | |
"Earnings Before Interest and Taxes" = c(), | |
"symbol" = c()) | |
for(symbol in symbolList){ |
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
from pandas import DataFrame, concat, merge | |
import Quandl | |
symbol_list = ["AMZN","GOOG", "MSFT"] | |
df = DataFrame(columns=['Effective Tax Rate', 'Earnings Before Interest and Taxes', 'symbol']) | |
for symbol in symbol_list: | |
effective_tax_parameter = "DMDRN/" + symbol + "_EFF_TAX" |
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
Entity | State | Ownership | Customers (Count) | Sales (Megawatthours) | Revenues (Thousands Dollars) | Average Price (cents/kWh) | |
---|---|---|---|---|---|---|---|
Alaska Electric Light&Power Co | AK | Investor Owned | 13,912 | 142,255 | 16,970.0 | 11.93 | |
Alaska Power and Telephone Co | AK | Investor Owned | 4,803 | 24,391 | 7,470.0 | 30.63 | |
Alaska Village Elec Coop, Inc | AK | Cooperative | 6,148 | 31,085 | 19,275.0 | 62.01 | |
Anchorage Municipal Light and Power | AK | Municipal | 24,443 | 146,789 | 17,221.2 | 11.73 | |
Barrow Utils & Elec Coop, Inc | AK | Cooperative | 1,471 | 11,511 | 1,364.0 | 11.85 | |
Bethel Utilities Corp | AK | Investor Owned | 1,671 | 10,677 | 5,990.0 | 56.10 | |
Chugach Electric Assn Inc | AK | Cooperative | 69,495 | 549,748 | 76,083.0 | 13.84 | |
City & Borough of Sitka - (AK) | AK | Municipal | 3,669 | 47,899 | 4,570.0 | 9.54 | |
City of Petersburg - (AK) | AK | Municipal | 1,354 | 20,803 | 2,010.2 | 9.66 |
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
fs = require('fs'); | |
// get and parse the HEAD | |
var HEAD = fs.readFileSync("./.git/HEAD").toString(); | |
HEAD = HEAD.replace(/(\r\n|\n|\r)/gm,""); | |
HEAD = HEAD.split(": ")[1] | |
var HEADpath = fs.readFileSync('./.git/' + HEAD).toString().replace(/\n/, ""); | |
// function to print pretty output | |
var exec = require('child_process').execSync; |
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
# This file will be called the `le_correcter.R` file shown below | |
# and both files must be in the same directory. | |
# This file contains the low-level functions to find the clusters | |
# as well as convert ROIs to voxelwise data. | |
suppressPackageStartupMessages(library(connectir)) | |
suppressPackageStartupMessages(library(inline)) | |
plugin_bigmemory <- function() { | |
l <- getPlugin("RcppArmadillo") |
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
require(ggplot2) | |
members <- jsonlite::fromJSON(readLines('https://gist.githubusercontent.com/neerajt/6f0ff957e7ff3adab63471460cade5d5/raw/55e3b7691aefe8e1c1dca7543dd4d41c8b5bee09/members.json')) | |
plt <- ggplot(members, aes(x=Date, y=TotalMembers)) + | |
geom_point() + geom_point(aes(y = ActiveMembers), color="red") + | |
geom_point(aes(y = TotalMembers - ActiveMembers), color="blue") | |
print(plt) |
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
license: mit | |
border: no |
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
license: mit | |
border: no |
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
license: mit | |
border: no |
OlderNewer