Skip to content

Instantly share code, notes, and snippets.

@SergeStinckwich
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SergeStinckwich/58f917741ee4e77992ec to your computer and use it in GitHub Desktop.
Save SergeStinckwich/58f917741ee4e77992ec to your computer and use it in GitHub Desktop.
Visualization of last 30 days of earthquakes
| b tab |
tab := RTTabTable new input: (ZnEasy get: 'http://earthquake.usgs.gov/earthquakes/feed/v0.1/summary/2.5_month.csv') entity string usingDelimiter: $,.
tab removeFirstRow.
tab replaceEmptyValuesWith: '0' inColumns: #(2 3 4 5).
tab convertColumnsAsFloat: #(2 3 4 5).
b := RTMapLocationBuilder new.
b shape circle
size: [ :v| (2 raisedTo: v) / 2 ];
color: (Color red alpha: 0.3).
tab values do: [ :row | b addPoint: row second @ row third value: row fifth ].
b open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment