I hereby claim:
- I am jhollist on github.
- I am jhollist (https://keybase.io/jhollist) on keybase.
- I have a public key whose fingerprint is D3F0 73AF 7C80 CAAA B965 4E0B 98E3 5E1B 139B 2FEF
To claim this, I am signing this object:
--- | |
title: "Untitled" | |
author: "Jeff W. Hollister" | |
date: "2/2/2016" | |
output: beamer_presentation | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = FALSE) |
> devtools::test() | |
Loading tidytext | |
Testing tidytext | |
Corpus tidiers: .. | |
dictionary tidiers: | |
LDA tidiers: ................................. | |
Counting pairs: W.......W..W..WW... | |
Sparse casters: ................1 | |
Sparse tidiers: ...... | |
tf-idf calculation: ........... |
#Script to scrape NARS website | |
library(rvest) | |
library(dplyr) | |
nars <- read_html("https://www.epa.gov/national-aquatic-resource-surveys/data-national-aquatic-resource-surveys") | |
links <- nars %>% | |
html_nodes(".file-link, a") %>% | |
html_attr("href") %>% | |
tbl_df() %>% | |
filter(grepl("files",value)) %>% |
library(tidycensus) | |
ri <- get_decennial(geography = "state", state = "RI",variables = "P001001", | |
key = api_key, | |
year = 2000) | |
#Returning this error... | |
#Using FIPS code '44' for state 'RI' | |
#Using FIPS code '44' for state 'RI' | |
#Error : lexical error: invalid char in json text. | |
# error: unknown/unsupported geog |
# http://api.census.gov/data/2010/sf1?get=P0010001,P0030001&for=block:1000&in=state:44+county:003+tract:020101 | |
getCensus(name = "sf1",vintage = 2010, key = Sys.getenv("CENSUS_API_KEY"), | |
vars = "P0010001", region = "block:1000", regionin = "state:44+county:003+tract:020101") | |
# Throws error | |
# Error in data[, c(which(sapply(data, class) != "numeric"), which(sapply(data, : | |
# incorrect number of dimensions |
# Got too many private repos in a GitHub Organization? | |
# This will list all of the private repos you have access to and rank them by | |
# days since last push and total number of commits. | |
# Add PAT to .Renviron - mine is obscured | |
# cat("GITHUB_PAT=yourowngithubpatgoeshere\n", | |
# file=file.path(normalizePath("~/"), ".Renviron"), | |
# append=TRUE) |
library(gh) | |
library(dplyr) | |
library(lubridate) | |
library(purrr) | |
usepa_members <- unlist(lapply(gh("/orgs/usepa/members", .limit = Inf), | |
function(x) x$login)) | |
# Get all usepa repos, grab commits for each repo, filter for user and count | |
usepa_repos <- unlist(lapply(gh("/orgs/usepa/repos", type = "all", .limit = Inf), | |
function(x) x$name)) |
library(dplyr) | |
iris2 <- iris %>% | |
mutate(sp_abbr = case_when(Species == "virginica" ~ "vir", | |
Species == "setosa" ~ "set", | |
Species == "versicolor" ~ "vers")) | |
iris2 |
I hereby claim:
To claim this, I am signing this object:
#' Generate a bibliography of packages | |
#' | |
#' This function creates an output bibliography from an input character vector | |
#' of package names. The primary use case for this function is when working | |
#' with other authors and you need to provide a reference list of packages used. | |
#' | |
#' @param pkgs A character vector of packages | |
#' @param csl A csl file used to format the output bibliography. Good place to | |
#' look for these is \url{https://github.com/citation-style-language/styles} | |
#' @param append_bib Existing \code{.bib} file to append package citations to. |