Skip to content

Instantly share code, notes, and snippets.

alexbrey

Block or report user

Report or block alexbrey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alexbrey
alexbrey / project.R
Last active Aug 10, 2016 — forked from mdlincoln/project.R
Maintain other attributes when making a bipartite projection
View project.R
library(igraph)
library(dplyr)
# Assume you have a dataframe "objects" with columns "object_id", "artist_id", "date"
# Create an identical table that just gives a new variable name to "artist_id"
flipped_objects <- objects %>% rename(artist2_id = artist_id)
# Join the tables together (essentially joining objects to itself, creating every combination
# of artist that share an object_id and date
edges <- objects %>%
View networktutorial
#Networks of Gothic Illuminators Tutorial
## Step 1: Acquire Data
- Scan summary list of manuscripts
- crop scans using briss
- OCR scans using Adobe Acrobat
- manually copy Artist, Region, and MSS data into a google sheet (there must be a better way than this, I do not know what it is)
- download google sheet as a tab-separated value file (.tsv)
estimated time ca. 3-4 hours
View BM_UglyQueryForCountries
SELECT DISTINCT ?item ?countryLabel ?yearAcquired
WHERE
{
{ SELECT * WHERE {
?item ecrm:P30i_custody_transferred_through ?hasCustody .
?hasCustody ecrm:P4_has_time-span ?hasTime .
?hasTime rdfs:label ?yearAcquired .
?item ecrm:P12i_was_present_at ?placeThing .
?placeThing ecrm:P7_took_place_at ?locality .
?locality skos:prefLabel ?countryLabel .
@alexbrey
alexbrey / index.html
Last active Dec 17, 2015
Mapping Byzantine Mints
View index.html
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<script src='http://api.tiles.mapbox.com/mapbox.js/v1.0.2/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.0.2/mapbox.css' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.0.2/mapbox.ie.css' rel='stylesheet' >
<![endif]-->
<style>
@alexbrey
alexbrey / index.html
Created Feb 2, 2013
Visualizing page data from a book
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
You can’t perform that action at this time.