Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

I'm opening this only cause I cant open an issue #10

Open
wants to merge 199 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
6a12388
Create README.md
dpetker Jan 30, 2015
c9af88f
Initial commit of Node gear to allow basic development usage.
Jan 30, 2015
2ef84cb
Update README.md
dpetker Jan 30, 2015
77a6415
Cleaned up titles/headers.
dpetker Jan 31, 2015
9bf051a
Cleaned up more of index page
dpetker Jan 31, 2015
5c60ed5
Removing markers for the time being.
dpetker Jan 31, 2015
e869ab5
Caught a reference to markers I missed
dpetker Jan 31, 2015
d381c7f
Removed some unnecessary UI elements.
dpetker Feb 1, 2015
be3c007
Moved third party JS libraries into their own directory in preparatio…
dpetker Feb 2, 2015
0f4e40b
Cleaned out histogram code. We're not using it.
dpetker Feb 2, 2015
49c201c
Removed more unused code.
dpetker Feb 2, 2015
fa8abd8
Removed the import/export toggle buttons.
dpetker Feb 2, 2015
51ba4fb
Removed the bottom timeline.
dpetker Feb 2, 2015
2d7de4c
Removed the remainder of the dependencies on the ui.controls module a…
dpetker Feb 2, 2015
8aaad35
Removed unnecessary CSS and image files.
dpetker Feb 2, 2015
40206ad
Cleaned out unneeded code from util.js
dpetker Feb 2, 2015
3596534
Moved all third party library links together
dpetker Feb 2, 2015
2e7ae4a
Reduced the sample data set to a size that can be managed.
dpetker Feb 2, 2015
34eddd4
Added some whitespace to sample data so it's a bit easier to read/und…
dpetker Feb 2, 2015
2338401
Removed more sample data that wasn't needed.
dpetker Feb 2, 2015
62dc487
Reduced the arc in the line visualization.
dpetker Feb 2, 2015
983094f
Commented out a bunch of unnecessary logging statements.
dpetker Feb 2, 2015
077ac6a
Trajectory lines no longer display - just the particles.
Feb 6, 2015
c4d103d
Increased the particle travel speed.
Feb 6, 2015
2bfcf14
Fixed a bunch of linting errors in main.js
Feb 9, 2015
c8dbb32
Added code to auto-rotate the globe.
Feb 9, 2015
212fcb1
First phase of refactoring code to accept a different data format.
Feb 17, 2015
630b9da
Dataglobe now takes a flat array of sample data
Feb 17, 2015
6c46784
Data is no longer constrained by selected country - all data is displ…
Feb 17, 2015
91ef7a6
Visualization is no longer reloaded based onmouse interaction.
Feb 17, 2015
1d27a6a
Removed unnecessary state information.
Feb 17, 2015
f893c3b
Intermediary checkin for removing lines once the traversal is complet…
Feb 17, 2015
8eb3894
Now there's only one particle per line and they only traverse their p…
Feb 17, 2015
e6a62be
Visualization now staggers data so it doesn't all fire at once.
Feb 17, 2015
d1a6f88
Updated README with new TODOs and notes
Feb 17, 2015
d00b626
Added some memory management to the code - still doesn't solve the me…
Feb 18, 2015
ba9f3b1
First checkin of updated Three.js library. All errors/warnings remove…
Feb 18, 2015
05219ac
Cleared out a bunch of useless code to make it easier to figure out w…
Feb 18, 2015
52cedaa
More code cleanup
Feb 18, 2015
5e76a17
More code cleanup.
Feb 18, 2015
f641e9d
Fixed some of the rendering issues. The shader material for the globe…
Feb 18, 2015
dc354ea
Fixed issue with Globe's shader material.
Feb 18, 2015
538ef08
Fixed particle issue
Feb 18, 2015
810c5dd
First checkin of mesh pooling code
Feb 18, 2015
18d6d5a
Next commit of mesh pooling code
Feb 18, 2015
91a17e0
Finished mesh pooling code. This also appears to fix the memory leak,…
Feb 18, 2015
eded3e8
Update README.md
dpetker Feb 19, 2015
e8e5638
Cleaned up the sample data
Feb 19, 2015
f02ef97
Colours can now be set by the sample data.
Feb 19, 2015
5fe4560
Minor refactoring to eventually support data using arbitrary lat/long.
Feb 19, 2015
28af755
Switched the globe over to using a built-in material that respects th…
Feb 19, 2015
31c78fb
Tweaked the scene lighting
dpetker Feb 20, 2015
b916c41
Tweaked a couple styling things. Need to adjust the particle graphic,…
Feb 20, 2015
56cb4f8
Switched particle to use the built-in point cloud material, rather th…
Feb 20, 2015
654e4d9
Updated particle texture to look/work better.
Feb 20, 2015
2a62e55
Added legend to the visualization
Feb 20, 2015
ed473ec
Cleaned out a bunch of JS that's no longer needed.
Feb 20, 2015
89d0400
Update README.md
dpetker Feb 26, 2015
daf8e79
First checkin of support for Grunt and CoffeeScript
Feb 26, 2015
2567774
Update README.md
dpetker Feb 26, 2015
281f851
Added our CoffeeScript modules and tweaked build a bit. Note that bui…
Feb 27, 2015
0f6829e
Cleared out finished TODOs from README
Feb 27, 2015
7027497
Fixed a lot of the module dependency errors.
Feb 27, 2015
e6b16f1
Globe now displays and mouse events work as expected.
Feb 27, 2015
dd5ac5b
Particles now work properly
Feb 27, 2015
ccbfec0
Removed the now unnecessary JS modules and updated index.html to use …
Feb 27, 2015
2074aaf
Added attribution footer
Mar 2, 2015
510544a
Update LICENSE
dpetker Mar 2, 2015
80dd3da
Updated initial rotation so that we're not looking directly at the eq…
Mar 6, 2015
882b6aa
First checkin of React-based interactive legend
Mar 11, 2015
eb01576
Removed unnecessary comment
Mar 11, 2015
bd7df1b
Legend now gets its list of colours dynamically
Mar 11, 2015
2907e03
Can now toggle types on/off from the legend
Mar 11, 2015
ceed44f
Fixed issue where clicking on the legend would cause the globe to pause
Mar 11, 2015
f3fa3bd
Fixed linting errors
Mar 11, 2015
0199450
Removed some unnecessary HTML/CSS
Mar 13, 2015
0638427
Updated React and cleaned up some component code
Mar 13, 2015
0b1d1ed
Initial progress viz implementation.
Mar 13, 2015
ee59c99
Updated styling for progress viz
Mar 13, 2015
8d62152
Progress bar updates are now tweened for a nicer effect
Mar 13, 2015
7a176a5
More tweaks to progress viz - styling and tweening
Mar 13, 2015
2fb2f7b
Progress size now declared in component, rather than CSS
Mar 13, 2015
69ae529
Updated README with proper tasks
Mar 13, 2015
deb44a0
One solution for a trail using a second particle
Mar 13, 2015
9226031
Slightly nicer trail effect
Mar 16, 2015
b6ee042
Added more particles to the trail
Mar 16, 2015
6c1b9ca
Merge branch 'trail-particle'
Mar 16, 2015
ab02f16
Added a quick comment for something that might look weird
Mar 16, 2015
885e887
Increase transparency of particles so they look slightly less neon
Mar 16, 2015
b1d1994
Switched over to using '@' shorthand.
Mar 16, 2015
837d036
First checkin of new particle trail that uses alpha for coolness
Mar 16, 2015
66dc160
Particles now coloured
Mar 16, 2015
ffdf8ba
Fixed issue where vertex colours wouldn't update when meshes are reused
Mar 16, 2015
8a9d314
Data is now randomized on each load
Mar 16, 2015
f1d6bd7
Fixed bug with data randomization and made trails a bit more pronounced
Mar 16, 2015
880e462
Setup for end-of-path explosion
Mar 16, 2015
a6fa762
Placeholder circles now being placed
Mar 16, 2015
197749c
Explosions now sit flush to the globe
Mar 16, 2015
76e6a97
Explosions are now fixed to globe (albeit rotated incorrectly...)
Mar 16, 2015
1e00685
Switched from circle to sphere geometry for explosion placeholder.
Mar 16, 2015
bfa6908
Explosion is now contained within the particle mesh to help with memo…
Mar 17, 2015
bfce554
Removed unnecessary flag
Mar 17, 2015
01b9cde
Fixed errors when explosions were removed from the globe
Mar 17, 2015
c436953
Fixed issue where meshes weren't being removed from the parent visual…
Mar 17, 2015
5688989
Fixed issue where particle system updates could cause errors
Mar 17, 2015
be075f3
Merge master into point-explosion
Mar 17, 2015
b6ad305
Added a bit of transparency to the explosion placeholders
Mar 17, 2015
6f01a23
Code cleanup and refactor for clarity and performance
Mar 17, 2015
c521855
Removed unnecessary image assets
Mar 17, 2015
60a3c74
More refactoring
Mar 17, 2015
25d31e0
Merge branch 'master' into point-explosion
Mar 17, 2015
a0e76f5
Sped up particles, increased the number of particles in the trail, an…
Mar 17, 2015
9bcd3e2
Reduced particle speed a bit so the trail doesn't pull apart as much
Mar 17, 2015
630f578
Reduced trail size and speed until flicker issues can be sorted out
Mar 17, 2015
2126578
More inteligently use our mesh pool
Mar 17, 2015
33dd7a9
Mesh pool size now defined as a constant.
Mar 18, 2015
651e9c1
Fixed issue where pooled meshes would flicker in the scene when reset
Mar 18, 2015
4e107cc
Groundwork for a more dynamic explosion effect
Mar 18, 2015
981c4f7
Switched sphere geo to ring which is closer to what we're going to do
Mar 18, 2015
53e5a4a
Naive implementation of final effect. Currently a massive memory leak…
Mar 18, 2015
01cc30b
Improve performance by explicitly deallocating geometries on redraws
Mar 18, 2015
3ba0d3b
Explosion now fires more quickly
Mar 18, 2015
fc6e5dc
Updated README
Mar 18, 2015
a625118
Checked-in a fully-built version of the JS library so the visualizati…
Mar 20, 2015
68d2375
Removed misleading wording from README
Mar 20, 2015
b32e3d2
Removed unnecessary jQuery dependency
Mar 20, 2015
a3003ea
First checkin of optimizing thirdparty libraries. Step 1: use bower c…
Mar 20, 2015
00c5002
Thirdparty libraries are now minified and concatenated together
Mar 20, 2015
f54f866
Fixed issue with keyboard events
Mar 20, 2015
b8ab007
grunt watch will no longer build thirdparty components
Mar 20, 2015
25180b2
Updated README to reflect Bower. Also updated Bower package list
Mar 20, 2015
ad15fab
Fixed hack for explosions where the geometry was inside-out. Now we t…
Mar 25, 2015
bb6784a
Globe will now generate random timestamps, and data will be sorted by…
Apr 6, 2015
f819485
We now visualize data according to timestamp
Apr 6, 2015
2fab162
README updates
Apr 6, 2015
a598b23
README updates
Apr 6, 2015
9fd7049
Replaced ring effect with a sphere-based explosion for performance re…
Apr 7, 2015
b775ecf
Updated explosion lerp factors for a nicer looking effect
Apr 7, 2015
8086eb8
Increased opacity lerp factor for a better effect
Apr 7, 2015
5641290
Added texture for explosion. Temporarily disabled opacity fade
Apr 7, 2015
30734a7
Explosions now rotate about a randomly-chosen axis
Apr 7, 2015
5c35f2a
Explosions now fade out again.
Apr 7, 2015
252113e
removed unnecessary material code
Apr 7, 2015
ff6e2e6
partial checkin so I can switch over to master
Apr 7, 2015
60d42b5
Tweaked constants for the rotation effect
Apr 7, 2015
d1c251b
Merge master
Apr 7, 2015
ec4e615
Legend now loads colours from the constants file
Apr 7, 2015
c910466
Merge master
Apr 7, 2015
c045527
Lines now trace, but weird artifacting occurs as meshes are reused
Apr 7, 2015
3f2ce34
Slightly cleaner implementation of non-working code
Apr 8, 2015
94201ea
Smoothed out the line drawing. Still broken, though
Apr 8, 2015
501adde
Fixed trace line flicker issue. Phantom vertex issue still present
Apr 8, 2015
aba2cc8
Removed phantom vertex issue
Apr 9, 2015
555c226
More tweaks to the trace line
Apr 9, 2015
50f55d2
Hopeful fix for issue where trace lines intersect the globe - we now …
Apr 9, 2015
9ee3c8c
Trace line now has a nice fade/retract effect
Apr 9, 2015
709e742
Tweaked opacity values on trace line a bit
Apr 9, 2015
4d73c45
Updated explosion texture
Apr 9, 2015
73a3e0b
Merge branch 'trace-lines'
Apr 9, 2015
e7efebd
Updated README with idea about es6
Apr 9, 2015
7587468
Update .gitignore
Apr 9, 2015
90baa69
Initial checkin of an es6-based Gruntfile
Apr 9, 2015
9ddddbc
Fixed error in gruntfile
Apr 9, 2015
d2bcd5b
Switched React components over
Apr 10, 2015
61f0656
Fixed a couple es6 gotchas
Apr 10, 2015
edc8f0e
React components now use es6 classes
Apr 10, 2015
ec63923
Added note about React es6 status
Apr 10, 2015
ef5b37a
Constants are now es6
Apr 10, 2015
e78c9a1
replace CommonJS requires with module imports
Apr 10, 2015
5c9fbe2
Constants now use exports instead of CommonJS
Apr 10, 2015
d7369fb
Dataloading is now converted
Apr 10, 2015
82f762f
Converted geopins
Apr 10, 2015
1f6d579
Switched anon function to arrow function
Apr 10, 2015
1a5cb98
Converted mousekeyboard
Apr 10, 2015
a421946
Converted util
Apr 10, 2015
ebdf6ef
Converted visualize_lines
Apr 10, 2015
721dd4b
Converted main
Apr 10, 2015
48b4dd6
Converted visualize
Apr 10, 2015
d04f3a0
Tweaks so build will work
Apr 10, 2015
1d2a545
Changes to support proper babel-ification during build
Apr 10, 2015
0933fd4
Switched back to standalone babel in build. Browserify extension didn…
Apr 13, 2015
3a91fd3
Going back to using babelify... Hope I can get this working.
Apr 13, 2015
9a77608
Fixed up bad imports and other es6-specific errors
Apr 13, 2015
4bfa720
Incremental checkin trying to get React working properly.
Apr 13, 2015
0bcdcd6
Fixed up weirdness with React classes
Apr 13, 2015
cb32db5
Updated bundle build.
Apr 13, 2015
83a7f62
Fixed issue with LegendItem click handler
Apr 13, 2015
4d74d16
Switched <a>'s in the Legend out for more semantically-correct markup
Apr 13, 2015
61eb8fc
Merge branch 'es6'
Apr 13, 2015
ed8bdbb
Updated readme
Apr 13, 2015
d286ad3
Update README.md
dpetker Apr 13, 2015
ee32afe
Fix issue where non-JS timestamps wouldn't get converted.
Apr 13, 2015
6aef99e
Merge branch 'master' of https://github.com/dpetker/dataglobe
Apr 13, 2015
532876a
Update README.md
dpetker Apr 14, 2015
e74963e
Added a FIXME tag around improvements we should make to how data is s…
Apr 15, 2015
cfc3df9
Start migration to eslint based off AirBnB style guide
Sep 23, 2015
0ab2396
Finished integrating eslint.
Sep 24, 2015
ad23c5c
Specify compatible version of threejs in bower.json
neon-ninja Jul 5, 2016
fc8e406
Merge pull request #1 from neon-ninja/patch-1
dpetker Jul 5, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"parser": "babel-eslint",
"extends": "eslint-config-airbnb"
}
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.DS_Store
app.yaml
client
.jshintrc

hostery-files
.hostery-config
.hostery-config

node_modules/
bower_components/
build/
117 changes: 117 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// Gruntfile for building the dataglobe project
us = require( 'underscore' );

module.exports = function gruntInit( grunt ) {
grunt.initConfig({
pkg: grunt.file.readJSON( 'package.json' ),

clean: {
all: [ 'build/tmp/components', 'build/tmp', 'build/*.js', 'public/*.js' ],
incr: [ 'build/tmp/components', 'build/tmp', 'build/*.js', 'public/public/<%= pkg.name %>.min.js' ],
},

eslint: {
target: [ 'src/**/*.js', 'src/**/*.jsx' ],
},

bower_concat: {
all: {
dest: 'build/bower.js',
// nice little callback to look for/use minified versions when available
callback: function findMinified( mainFiles ) {
return us.map( mainFiles, function minifiedMap( filepath ) {
min = filepath.replace( /\.js$/, '.min.js' );
if (grunt.file.exists( min )) {
return min;
}
return filepath;
});
},
},
},

concat: {
options: {
separator: ';',
},
dist: {
src: ['<%= bower_concat.all.dest %>', 'thirdparty/*.js'],
dest: 'build/thirdparty.js',
},
},

browserify: {
options: {
debug: true,
destFile: 'build/bundle.js',
src: [ 'src/**/*.js', 'src/**/*.jsx' ],
transform: ['babelify'],
},

dev: {
src: '<%= browserify.options.src %>',
dest: '<%= browserify.options.destFile %>',
},

production: {
options: {
debug: false,
},
src: '<%= browserify.options.src %>',
dest: '<%= browserify.options.destFile %>',
},
},

uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n',
},

all: {
files: {
'public/<%= pkg.name %>.min.js': [ '<%= browserify.options.destFile %>' ],
'public/thirdparty.min.js': [ '<%= concat.dist.dest %>' ],
},
},

incr: {
files: {
'public/<%= pkg.name %>.min.js': [ '<%= browserify.options.destFile %>' ],
},
},
},

watch: {
files: [
'Gruntfile.js',
'src/**/*.js',
'src/**/*.jsx',
],
tasks: 'incremental',
},
});

grunt.loadNpmTasks( 'grunt-browserify' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-bower-concat' );
grunt.loadNpmTasks( 'grunt-contrib-concat' );
grunt.loadNpmTasks( 'grunt-eslint' );

grunt.registerTask( 'default', [
'clean:all',
'eslint',
'bower_concat:all',
'concat:dist',
'browserify:production',
'uglify:all',
]);

grunt.registerTask( 'incremental', [
'clean:incr',
'eslint',
'browserify:production',
'uglify:incr',
]);
};
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright 2015 Google Data Arts Team
Portions Copyright 2015 dpetker

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Data Globe
A more generic version of https://github.com/dataarts/armsglobe for visualizing source/destination data.

This fork attempts to make the globe data-agnostic so that users can simply provide source/destination data and have it graphed.

## Building

To build this application you'll need an up-to-date copy of [Node.js](http://nodejs.org/), [Grunt CLI](http://gruntjs.com/), and [Bower](http://bower.io/). Once all these are installed, simply run the following from within the `dataglobe` directory:

```bash
$ npm install
$ bower install
$ grunt
```
And everything will be built for you.

## Running

To run this application, ensure Node.js has been installed along with all the dataglobe dependencies (see "Building"). Once the application has been built, run:

```bash
$ node app.js
```
And it will start a development server for you to view your work. In addition, you can also run

```bash
$ grunt watch
```
To have it watch for changes and automatically rebuild.

## Data Format

The visualization expects data to be of the following format:

```
[
{
"src": <country name>,
"dest": <country name>,
"colour": ["r"|"o"|"b"|"g"|"p"],
"time": <timestamp>
},
// ... etc.
]
```

Acceptable country names can be found in `country_iso3166.json`. Timestamps can be anything that is convertable to a [JavaScript Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date).

Data does not need to be in any particular order; the visualization takes care of sorting the data by date for you.

## TODOs

* [ ] Allow source/destination data to be specified as lat/long, rather than country names
* [ ] Implement touch/pointer events for use on tablets/phones
* [x] Consider updating repo to use es6 with Babel, rather than CoffeeScript
* [x] Highlight the destination country when the particle "hits" it
* [x] Create subtle trail effect for particles
27 changes: 27 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Index.js - Entry point to serve up the Data Globe
*/

var express = require( 'express' );
var serveStatic = require( 'serve-static' );

var app = express();

// For CORS
app.use( function( req, res, next ) {
res.header( "Access-Control-Allow-Origin", "*" );
res.header( "Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept" );
res.header( "Access-Control-Allow-Methods", "GET" );

if( req.method == 'OPTIONS' ) {
res.json( [] );
} else {
next();
}
});

app.use( serveStatic( __dirname, { 'index': ['index.html', 'index.htm' ] } ) );

app.listen( 8080 );

console.log( 'Listening on port 8080...' );
21 changes: 21 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "dataglobe",
"version": "0.0.0",
"description": "A more generic version of https://github.com/dataarts/armsglobe for visualizing source/destination data, served up via Node.",
"homepage": "https://github.com/dpetker/dataglobe",
"authors": [
"dpetker"
],
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"react": "^0.13.1",
"threejs": "r71"
}
}
90 changes: 89 additions & 1 deletion categories/All.json

Large diffs are not rendered by default.

Binary file removed close.png
Binary file not shown.
2 changes: 1 addition & 1 deletion country_lat_lon.json

Large diffs are not rendered by default.

Binary file removed graphIcon.png
Binary file not shown.
Binary file removed images/ajax-loader.gif
Binary file not shown.
Binary file removed images/closebutton.png
Binary file not shown.
13 changes: 0 additions & 13 deletions images/crosshair.svg

This file was deleted.

Binary file added images/explosion_texture_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/map.png
Binary file not shown.
Binary file removed images/map_bak.png
Binary file not shown.
Binary file removed images/map_indexed.png
Binary file not shown.
Binary file removed images/map_mask.png
Binary file not shown.
Binary file removed images/particleA.png
Binary file not shown.
Binary file added images/particleB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/play-pause.png
Binary file not shown.
Binary file removed images/play-pause_large.png
Binary file not shown.
Loading