This is forked from bycoffe!!! Please see there for more instruction.
I am going to modify this to show cool (but made up) data.
This is forked from bycoffe!!! Please see there for more instruction.
I am going to modify this to show cool (but made up) data.
#put in lib/tasks/fixtures.rake | |
namespace :db do | |
namespace :fixtures do | |
desc 'Create YAML test fixtures from data in an existing database. | |
Defaults to development database. Set RAILS_ENV to override.' | |
task :dump => :environment do | |
sql = "SELECT * FROM %s" | |
skip_tables = ["schema_migrations"] | |
ActiveRecord::Base.establish_connection(:development) | |
(ActiveRecord::Base.connection.tables - skip_tables).each do |table_name| |
require 'json' | |
require 'net/http' | |
def getPrettyJSON(url) | |
uri = URI.parse(url) | |
http = Net::HTTP.new(uri.host, uri.port) | |
request = Net::HTTP::Get.new(uri.request_uri) | |
response = http.request(request) | |
p = JSON.parse(response.body) | |
return JSON.pretty_generate(p) |
http://www-03.ibm.com/able/guidelines/web/accessweb.html
This is an attempt at a slightly D3-ish way of drawing a dot density map on a canvas element. In short, each polygon is drawn (invisibly) with a unique color, then random points are thrown at polygon bounding boxes and the pixel color is used for a point-in-polygon test. This example draws one dot for every 2 people in central Boston census blocks, for a total of approximately 132,000 dots.
A Pen by Cristen Jones on CodePen.
license: cc-by-sa-3.0 | |
height: 800 | |
border: no |
"CASE_NUM","CASE_YR","REF_MRKR","ACCD_DTE","ROAD_SYS","NUM_OF_FATALITIES","NUM_OF_INJURIES","REPORTABLE","POLICE_DEPT","INTERSECT_NUM","MUNI","PRECINCT","NUM_OF_VEH","ACCD_TYP","LOCN","TRAF_CNTL","LIGHT_COND","WEATHER","ROAD_CHAR","ROAD_SURF_COND","COLLISION_TYP","PED_LOC","PED_ACTN","EXT_OF_INJURIES","REGN_CNTY_CDE","LOW_NODE","HIGH_NODE","ACCD_TME","RPT_AGCY","DMV_ACCD_CLSF","ERR_CDE","COMM_VEH_ACC_IND","HIGHWAY_IND","INTERSECT_IND","UTM_NORTHING","UTM_EASTING","GEO_SEGMENT_ID","GEO_NODE_ID","GEO_NODE_DISTANCE","GEO_NODE_DIRECTION","GEO_LCODE" | |
"33274808",2010,"","2010-01-05 00:00:00","12",1,0,"Y","03030","","01","007",1,"03","Y","01","1","1","1","1","09","2","14","K","N3","","","2010-01-05 16:02:00","NYC PD","1","011","3","N","Y",4508040.91,585391.79,429082113,169972,0,"3",2 | |
"33308985",2010,"","2010-01-02 00:00:00","09",0,1,"Y","03030","","01","030",1,"02","Y","02","1","2","1","2","09","2","13","C","N3","","","2010-01-02 07:00:00","NYC PD","2","011","1","N","N",0,0,0,0,0,"",12 | |
"33309028",2010,"","2010-01-02 |