Sample input files



Preparing your own files

Geographic shapes

The geography should be defined in the WGS84 projection (Longitude,Latitude) in a geojson file. The id that identifies each geographic shape should be stored as one of the properties of that object (e.g. StateId, CountyId, ...).
Geographic shapes are commonly defined in shapefiles (extension .shp). Several tools exist to convert them into the geojson format, including this one.

Data file

The data should be provided in json format. The easiest thing to do is to produce a CSV file, and then use this Python script to convert the data from the CSV format to the required json format.
The CSV file should have the following columns (even if there is only one time period): PeriodId,GeoShapeId,Var1,Var2,Var3, ...
Here is the CSV file corresponding to the sample json data file provided above.

NOTE: The field "GeoShapeId" (which could be StateId, CountyId, etc.) should be the same as in the geojson file, as the two will be matched using that field.

Color cutoff file

The cutoff values at which there should be a change in color are defined in that file. While there is no "right way" to define them, a good starting point is to use this Python script to define these cutoffs.
The Python script looks at the distribution of values for each variable, and defines the cutoffs by using quantiles.