Skip to content

Instantly share code, notes, and snippets.

View bradlindblad's full-sized avatar

BradL bradlindblad

View GitHub Profile
@bradlindblad
bradlindblad / emotions.R
Last active November 20, 2020 18:37
R NLP
library(dplyr)
library(ggplot2)
library(tidytext)
library(tm)
library(wordcloud)
# input: a dataframe called raw, in this case the text col is biggest_concern, and X is the ID col
base <- knitr::kable(final ,"latex", booktabs = T, longtable = T, align = c("l", "r", "r", "r", "r", "r"))
plott <- base %>%
kableExtra::kable_styling(
latex_options = c("scale_down"),
pandoc -s -o book/final_book.md src/*.md --toc --standalone
@bradlindblad
bradlindblad / helloworld.py
Last active October 19, 2020 17:43
* PYTHON
‎‎​
@bradlindblad
bradlindblad / helloworld.sql
Last active December 13, 2020 22:53
* SQL
select * from dual
library(RSelenium)
library(tidyverse)
# RSELENIUM INSTALL ISSUES ####
# If you have difficulty installing RSelenium from CRAN, try installing with Devtools:
# install.packages("devtools")
# devtools::install_github("johndharrison/binman")
# devtools::install_github("johndharrison/wdman")
# devtools::install_github("ropensci/RSelenium")
using Cascadia, Gumbo, HTTP
r = HTTP.get("http://stackoverflow.com/questions/tagged/julia-lang", require_ssl_verification = false)
h = parsehtml(String(r.body))
qs = eachmatch(Selector(".question-summary"),h.root)
println("StackOverflow Julia Questions (votes answered? url)")
@bradlindblad
bradlindblad / forAlex.R
Created October 8, 2019 01:02
Take simple lat lon pairs and plot them in tidyUSDA and Leaflet
library(sf)
library(tidyverse)
library(tidyUSDA)
library(leaflet)
# Make some random lon lat coord pairs ------------------------------------
save(branches, file = "data/branches.RData")
branches <- read.csv("O:\\exchange\\branches.csv", header = T)