Skip to content

Instantly share code, notes, and snippets.

View gelicia's full-sized avatar
🕴️
Never logging off

Kristina gelicia

🕴️
Never logging off
View GitHub Profile
@gelicia
gelicia / slack_delete.rb
Last active September 28, 2018 12:58 — forked from jamescmartinez/slack_delete.rb
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/custom-integrations/legacy-tokens (See Legacy token generator) into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
@gelicia
gelicia / bicycle-data.csv
Last active August 29, 2015 14:23 — forked from mbostock/.block
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 12 columns, instead of 11. in line 8.
Crash ID,County,Community,Primary Road,Intersecting Road,Date,Time,Type,Level,Crash Rpt.,lat,long
00-012546,Hennepin,Minneapolis,7th St S,Marquette Av S,1/14/00,1000,Bicycle,Possible Injury (C),,44.9763201,-93.2708829
00-014058,Hennepin,Minneapolis,25th St E,Bloomington Av S,1/15/00,2128,Bicycle,Possible Injury (C),,44.9573537,-93.252417
00-026570,Hennepin,Minneapolis,5th Av S,Franklin Av E,1/29/00,1845,Bicycle,Possible Injury (C),,44.9626904,-93.2689627
00-028624,Hennepin,Minneapolis,2nd St S,19th Av S,1/31/00,1830,Bicycle,Possible Injury (C),,44.9733766,-93.2458744
00-038600,Hennepin,Minneapolis,17th St N,Dunwoody Blvd W,2/10/00,1000,Bicycle,Possible Injury (C),,44.9719114,-93.2869467
00-050325,Hennepin,Minneapolis,19th St E,Nicollet Av S,2/22/00,843,Bicycle,Possible Injury (C),,44.9639556,-93.277817
00-051603,Hennepin,Minneapolis,12th St N,Linden Av W,2/23/00,1227,Bicycle,Fatalities,,44.9759309,-93.2810714
00-051804,Hennepin,Minneapolis,50th St W,Chowen Av S,2/23/00,1650,Bicycle,Property Damage Only,,44.91
@gelicia
gelicia / README.md
Last active August 29, 2015 13:56 — forked from milroc/README.md
Yelp Business Checkins by Category

The list is scrollable: Click and drag / mousewheel / arrow up or down to see all the categories!

The yellow line indicates where you are on that day/time chart. The line only updates when you load a new category.

This visualization is of Yelp check-ins to certain categories of businesses over time. A business can have more than one category. The data is from an area in Arizona, collected between January 19th to March 12th, 2013.

The data was originally in JSON and provided by Yelp for a contest held at kaggle.com. To make it easier to aggregate, I split it up into tables and imported it into a MySQL database. I made the tables manually and imported much of the data by exporting the JSON to a CSV to match the table structure and imported the data from CSV to the database. The exception to this is business categories, since that was the only data that was relational and not split up by the original JSON files. First I used ruby to make a distinct list of the categ