Skip to content

Instantly share code, notes, and snippets.

@andrewxhill
Created June 23, 2014 19:16
Show Gist options
  • Save andrewxhill/6c1f7fe885669bc2203f to your computer and use it in GitHub Desktop.
Save andrewxhill/6c1f7fe885669bc2203f to your computer and use it in GitHub Desktop.
Course notes
  • import file
  • explore table and map
  • Reclaim some space!
update nyct2010 set the_geom = ST_SimplifyPreserveTopology(the_geom, 0.0003)
  • prompt CartoDB to update tablesize
VACUUM FULL nyct2010
  • add numeric column titled racks racks to the
  • run the following sql
update nyct2010 set racks = (
   SELECT count(*) FROM dot_cityracks_2012 
   WHERE ST_Intersects(the_geom, nyct2010.the_geom)
)
  • map it
  • normalize it
UPDATE nyct2010 SET racks_normalized = racks / shape_area
  • update cartocss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment