Skip to content

aaronpdennis/geo-time-series

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visualize Major Trends in Geographic Time Series

Usage

Include dist/geo-time-series.js:

<script src='https://rawgit.com/aaronpdennis/geo-time-series/master/dist/geo-time-series.js'></script>

API:

timeSeries = new TimeSeries({
  data: geoJsonData,  // GeoJSON object with time series properties and values for each feature
  dateFormat: '%Y',   // A string specifier for how moments of measurement property names are formatted
  clusters: 8         // Number of clusters
});

// Construct an SVG legend in a specific element
timeSeries.constructLegend('legendElementID');

// Get back a GeoJSON object with information about cluster and color assignments included in feature attributes
var geojson = timeSeries.getGeoJSON();

Date format reference: https://github.com/d3/d3-time-format/blob/master/README.md#locale_format

Example

See a live visualization or adopt the source code.

Developing

With Browserify:

$ watchify ./src/index.js -s TimeSeries -o ./dist/geo-time-series.js

About

Visualize trends in your geographic time series with the help of multi-dimensional clustering.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published