Skip to content

Instantly share code, notes, and snippets.

@neerajt
neerajt / Distances.csv
Created Apr 18, 2019
Rawdata and Distance
View Distances.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 25 columns, instead of 9. in line 5.
API_UWI,WellName,PadPseudonym,Unformatted_API_UWI,API_UWI_12,WellName_Short,Closest Offset,d_FWL,TVD_Avg,TVD_Stdv,Formation,dx_CO,dy_CO,dh_CO,dh_CO_Same Zone,FPD,Parent/Child,Parent 1,dFP_1,mn_AP_1,Parent 2,dFP_2,mn_AP_2,d_FWW,d_FEW
30-025-44122,CONDOR 32 STATE #602H,Condor,3002544122,30-025-44122-00,C 602H,CONDOR 32 STATE #709H,8892,12336.34,12.50,TBSG SAND,139,299,330,1000,2/1/2018,,,,,,,,,
30-025-44117,CONDOR 32 STATE #706H,Condor,3002544117,30-025-44117-00,C 706H,CONDOR 32 STATE #709H,8950,12916.58,13.93,WFMP B,197,282,344,571,2/1/2018,,,,,,,,,
30-025-44580,CONDOR 32 STATE COM #740H,Condor,3002544580,30-025-44580-00,C 740H,CONDOR 32 STATE COM #712Y,7539,13145.41772,29.64817528,WFMP B,51,505,508,1429,9/1/2018,,,,,,,,,
30-025-44904,CONDOR 32 STATE COM #712Y,Condor,3002544904,30-025-44904-00,C 712Y,CONDOR 32 STATE #603H,7590,12640.23766,17.72593282,A/XY,311,170,354,1163,9/1/2018,,,,,,,,,
30-025-44674,CONDOR 32 STATE COM #614H,Condor,3002544674,30-025-44674-00,C 614H,CONDOR 32 STATE COM #712Y,6915,12470.18052
View PDF_Scraping.R
library(pdftools)
library(tidyverse)
library(tidytext)
library(tm)
# ============================================================
# Part 1: Recreating PDF Table
# ============================================================
pdf_url <- "https://www.bea.gov/system/files/2018-12/pi1118_hist.pdf"
View web_scraping_script.R
# Houston R Users Group - Web Scraping Script
# =========================================================================================================================================
# Loading Necessary Libraries
library(rvest)
library(tidyverse)
library(reshape2)
# Other useful libraries
#library(XML) # Hides xml function from rvest
#library(RSelenium) # Helpful in dealing with dynamic webpages
View alfreds_vix_app.R
library(shiny)
library(quantmod)
get_symbols <- function(symbol){
symbol_data <- getSymbols(symbol,
src = "yahoo",
auto.assign = FALSE)
names(symbol_data) <- c("Open", "High", "Low", "Close", "Volume", "Adjusted.Close")
symbol_data
}
@neerajt
neerajt / 0 Text Mining and NLP
Last active Nov 8, 2018
Text Mining and NLP
View 0 Text Mining and NLP
11/06/18 Station Houston
Houston R User Group
Text Mining and NLP
Ami Duran
library('Matrix')
library('dplyr')
@neerajt
neerajt / shiny-ubuntu-reference.md
Created Dec 19, 2017
setting up shiny server on ubuntu
View shiny-ubuntu-reference.md

To install latest version of R

  echo "deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu trusty/" > /etc/sources.list.d/r.list
  sudo apt-get update
  sudo apt-get upgrade -y
  sudo apt-get dist-upgrade -y
  sudo apt-get install r-base -y

To install git

  sudo apt-get install git
@neerajt
neerajt / en_to_es_for_needs_api
Created Sep 22, 2017
English to Spanish translations for needs api views
View en_to_es_for_needs_api
<!-- SHELTERS TAB -->
Albergue
Agregar albergue
Mostrar : Búsqueda:
10
entradas
@neerajt
neerajt / .block
Last active Feb 25, 2017
flight-paths-houston
View .block
license: mit
@neerajt
neerajt / .block
Created Feb 25, 2017
flight-paths-full-map
View .block
license: mit
View .block
license: mit