Skip to content
Matz13 edited this page Mar 15, 2013 · 4 revisions

d3mapper

What to put in the CSV file?

The file has to contain the list of countries and associated datasets in that format:

countryCode,2009,2010,2011,2012
AFG,        6,   6,   6,   6
ALB,        5,   5,   5,   5

How to customize my map ?

Before inserting the map itself, you have to define the config object which will contain the customization information.

there is a few settings that are necessary for the map: fileToLoad

mapTitle

dataSource (file path)

sets the path to the CSV file that will be used as source for the data.

dataType (quantitative | qualitative)

Defines the type of data to be displayed.

  • Quantitative is for integers, for example population or money amounts.
  • Qualitative is for fractions, for example percentages or rates.

colorScale

legendScaleRange

mapScaleDomain

serie

tickType

var config = {serie:1975,
              tickType : "on", 
              mapTitle : "Duration of mandatory primary school", 
              dataSource : "se_prm_durs.csv", 
              datatype : "quantitative", 
              colorscale : colorbrewer.RdYlGn[7], 
              legendScaleRange : [3,9], 
              mapScaleDomain : [3,4,5,6,7,8]};