Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Powering geospatial on the web with CartoDB

Andrew W Hill
September 13, 2012

Powering geospatial on the web with CartoDB

A presentation given to CIESEN in September 2012

Andrew W Hill

September 13, 2012
Tweet

More Decks by Andrew W Hill

Other Decks in Science

Transcript

  1. FILE EXT. SHP CSV KML XLS OSM TIFF GEO. TYPES

    ESRI JSON WKT KML RAST. GPS Wednesday, October 17, 12
  2. The challenges Process and visualize millions or rows. Show changes

    in data over time. Visualize up to 5 layers of information. Wednesday, October 17, 12
  3. We host and process the data with CartoDB. We generate

    a JSON file per tile containing the deforestation data codified in cells (each cell has a value for each time period - 15days). How we did it { time: 0.00576543211, rows: [ { upper_left_x: 16742472, upper_left_y: -2589569, time_series: [ 0, 8, 8, 8, 8, 12, 12, 12, 16, ... Wednesday, October 17, 12
  4. { time: 0.00576543211, rows: [ { upper_left_x: 16742472, upper_left_y: -2589569,

    time_series: [ 0, 8, 8, 8, 8, 12, 12, 12, 16, ... Load all the information of the JSON files in memory using TypedArrays. Render the tiles in the client using the codified information -now in memory-. Each time the user moves the timeline, the tiles are rendered again. How we did it Wednesday, October 17, 12
  5. { time: 0.00576543211, rows: [ { upper_left_x: 16742472, upper_left_y: -2589569,

    time_series: [ 0, 8, 8, 8, 8, 12, 12, 12, 16, ... Load all the information of the JSON files in memory using TypedArrays for better performance. Render the tiles in the client using the codified information. Each time the timeline is moved, the tiles are rendered again. How we did it Wednesday, October 17, 12
  6. { time: 0.00576543211, rows: [ { upper_left_x: 16742472, upper_left_y: -2589569,

    time_series: [ 0, 8, 8, 8, 8, 12, 12, 12, 16, ... Load all the information of the JSON files in memory using TypedArrays for better performance. Render the tiles in the client using the codified information. Each time the timeline is moved, the tiles are rendered again. How we did it Wednesday, October 17, 12
  7. Example from Dan Hammer CartoDB-R library(RCurl) library(RJSONIO) library(CartoDB) library(stats) library(cluster)

    account.name <- "cartodb-acct-name" cartodb(account.name) cartodb.test() data <- cartodb.collection("cartodb_table", columns=c("x", "y")) N <- 5000 subset.data <- apply(as.matrix(data[1:N,]), 2, as.numeric) cid <- cutree(hclust(dist(subset.data), method="single"), h=100) png("~/cluster.png") plot(subset.data[,2], -subset.data[,1], col=cid) dev.off() Wednesday, October 17, 12