A first lesson in R for The Digital Past.
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Demonstration of using BootStrap</title> | |
<!-- |
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
#!/usr/bin/env bash | |
set -e | |
VER=$1 | |
ZIP="wordpress-$VER.zip" | |
URL="https://wordpress.org/$ZIP" | |
echo "Trying to upgrade to WordPress $VER" | |
echo "Downloading $URL" |
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
command! -nargs=0 PDF call PDF() | |
function! PDF() | |
:silent exec "!open ".expand("%:p").".pdf" | |
endfunction |
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
install.packages("genderdata", repos = "http://packages.ropensci.org", type = "source") |
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
library(magrittr) | |
library(internetarchive) | |
query <- c("collection" = "smithsonian") | |
smithsonian <- query %>% | |
ia_search(num_results = 6000) %>% | |
ia_get_items() %>% | |
ia_metadata() |
This file has been truncated, but you can view the full file.
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
list(structure(list(ok = TRUE, content = list(structure(list( | |
sha = "2e39d0dbc2e1cccac2f2735fcf4534f9ff2f1e21", filename = "actionpack/lib/action_dispatch/http/url.rb", | |
status = "modified", additions = 6L, deletions = 4L, changes = 10L, | |
blob_url = "https://github.com/rails/rails/blob/797b8c2d13593d3c286cb7943c29df6928d397fa/actionpack/lib/action_dispatch/http/url.rb", | |
raw_url = "https://github.com/rails/rails/raw/797b8c2d13593d3c286cb7943c29df6928d397fa/actionpack/lib/action_dispatch/http/url.rb", | |
contents_url = "https://api.github.com/repos/rails/rails/contents/actionpack/lib/action_dispatch/http/url.rb?ref=797b8c2d13593d3c286cb7943c29df6928d397fa", | |
patch = "@@ -1,7 +1,9 @@\n module ActionDispatch\n module Http\n module URL\n- # Returns the complete \\URL used for this request.\n+ mattr_accessor :tld_length\n+\n+ # Returns the complete URL used for this request.\n def url\n protocol + host_with_port + fullpath\n end\n@@ -85,13 +87,13 @@ de |
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
library(rvest) | |
library(dplyr) | |
library(magrittr) | |
# First find the list of people and parse out their names and urls. | |
base <- "http://josephsmithpapers.org" | |
list_of_people <- "/reference/people#a::" | |
results <- paste0(base, list_of_people) %>% | |
html() %>% | |
html_nodes(".alphaItem") |
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
<style> | |
#counter { | |
width:100%; | |
height:100%; | |
font-size:400px; | |
text-align:center; | |
padding-top:40px; | |
overflow:hidden; | |
} | |
::selection { |
Using d3-carto-map to create a map which cannot be zoomed or panned.
NewerOlder