Skip to content

Instantly share code, notes, and snippets.

aleszu

  • Northeastern J-school
  • Boston
Block or report user

Report or block aleszu

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
View recreate-wapo-opioids-table.R
library(data.table)
library(dplyr)
library(R.utils)
# JUST MASS
mass <- gunzip("arcos-ma-statewide-itemized.tsv.gz")
mass_opioids <- fread(file = 'arcos-ma-statewide-itemized.tsv')
glimpse(mass_opioids) # 2,574,240 observations
summary(mass_opioids)
View R_leaflet_maps_tooltips.R
library(tidyverse)
library(leaflet)
library(geojsonio)
library(htmlwidgets)
library(htmltools)
nycmarkers <- read.csv("nycmarkers.csv", stringsAsFactors=F) # with "lat", "lon" and "string" columns
nycshapefile <- geojsonio::geojson_read("nycshapefile.geojson", what = "sp")
View beto_cruz_ads.R
library(dplyr)
library(tidyverse)
library(tidytext)
library(plotly)
library(stringr)
# Pull in spreadsheet
df <- read.csv("fbads.csv", header=TRUE, stringsAsFactors = FALSE)
df$date <- as.Date(df$created_at) # Add date column
df %>% glimpse()
View stevens-parser.js
var fs = require("fs");
var table = read_table("data/hurdat2-1851-2017-050118.txt", ",");
var curr_obj,
curr_entry_count;
var data = [],
geojson = {
"type": "FeatureCollection",
View tf-idf-wine-reviews.R
library(tidyverse)
library(ggplot2)
dataset <- read.csv("winemag-data.csv",
header=TRUE, stringsAsFactors=FALSE)
dataset %>% glimpse(102)
# Quick view and descriptive stats
min(dataset$points)
max(dataset$points)
View state-map-from-csv.R
library(ggplot2)
library(tidyverse)
library(fiftystater)
mapdata <- read.csv("state-medal-count.csv", header=TRUE, stringsAsFactors=FALSE)
mapdata %>% glimpse()
data("fifty_states")
ggplot() + geom_polygon( data=fifty_states, aes(x=long, y=lat, group = group),color="white", fill="grey10" )
View scrape-urls-to-text-files-from-csv.py
import csv
import requests
import threading
import os
import sys
from Queue import Queue
from bs4 import BeautifulSoup as bs
# Globals
q = Queue()
View magnifyimg.html
<img src="subwaymap.jpg" class="zoom" data-magnify-src="subwaymap-large.jpg" />
View magnifyhead.html
<link rel="stylesheet" href="css/magnify.css">
<script src="http://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="js/jquery.magnify.js"></script>
View magnifyscript.js
<script>
$(document).ready(function() {
$('.zoom').magnify();
});
</script>
You can’t perform that action at this time.