loadConfig

loads elements of the config file and parses, then runs all major functions

loadConfig(error: object, config: object, data: object)
Parameters
error (object) returned from queue
config (object) json data loaded from the config file
data (object) csv data loaded from the csv file

choosen_scatter

Set up config information

choosen_scatter

accessToken

Initatite Map simply

accessToken

mapdrop

Create droppdown menus for choices

mapdrop

scatterData

convert CSV data to geojson for Scatter Data convert any positive longitudes to negative

scatterData

area_info

create SET of Areas used by data

area_info

setZoneHist

based onthe choice in the zone dropdwon , calculates the aggregation choosen and associated the color for the zone

setZoneHist(choosen_scatter: string, drop_down_hist: any, area_set: Set, quantileScaleHist: object, zoneLegend: object, drop_down_hit: string): object
Parameters
choosen_scatter (string) the variable that is being plotted as scatter
drop_down_hist (any)
area_set (Set) a Set object that has all the zones which have data
quantileScaleHist (object) d3.scaleQuantile object
zoneLegend (object) object that points to the legend for zones
drop_down_hit (string) the value in the drop down menu choosen
Returns
object: the object with colors for each zone based on a histogram of data

setScatterColor

setScatterColor(data: object, numeric_vars: object, id_vars: object, choosen_scatter: string, scatterLegend: object, uniqueID: string): object
Parameters
data (object) columner data from csv file
numeric_vars (object) array of strings of the variables names that are numeric variables in the dataset
id_vars (object) array of strings of the variables names that are categorical variables in the dataset
choosen_scatter (string) the variable that is being plotted as scatter
scatterLegend (object) pointer to the legend for the scatter plot
uniqueID (string) the variable name pointing to the row id
Returns
object: the object with colors for each line of the scatter plot

resetzones

sets the colors of the zonal histograms and the associated barchart and legend

resetzones(maplayer: string, choosen_scatter: string, choosen_grid_hist: string, area_set: Set, quantileScaleHist: object, zoneLegend: object, svgInfo: object, area_variable_map: any)
Parameters
maplayer (string) the name of the Grid map choosen
choosen_scatter (string) the variable that is being plotted as scatter
choosen_grid_hist (string) the value in the drop down menu choosen
area_set (Set) a Set object that has all the zones whih have data
quantileScaleHist (object) d3.scaleQuantile object
zoneLegend (object) object that points to the legend for zones
svgInfo (object) svg that pojnts to the bar chart
area_variable_map (any)

createDropDownGridInit

creates a listener for the choices in the dropdown for area as it is reset consitatnly

createDropDownGridInit(choosen_scatter: string, numeric_vars: any, area_set: Set, quantileScaleHist: object, zoneLegend: object, svgInfo: object)
Parameters
choosen_scatter (string) the variable that is being plotted as scatter
numeric_vars (any)
area_set (Set) a Set object that has all the zones whih have data
quantileScaleHist (object) d3.scaleQuantile object
zoneLegend (object) object that points to the legend for zones
svgInfo (object) svg that pojnts to the bar chart

*

makeTheMap

set up the map with inital data, use basic colors for faster loading

makeTheMap(multi_grid: any, allScatterData: object, grid_file: string)
Parameters
multi_grid (any)
allScatterData (object) -
grid_file (string) the filename that contains the geojson grid file

afterMapLoadsInit

creates inital map view state after styles load from mapbox

afterMapLoadsInit(data: object, choosen_scatter: string, uniqueID: string, numeric_vars: object, id_vars: object, quantileScaleHist: object, scatterLegend: object, area_set: Set, zoneLegend: object, svgInfo: object, svgInfoScatter: object, multi_grid: object, zoneObjectAll: any, null-null: zoneObjectAll)
Parameters
data (object)
choosen_scatter (string) the variable that is being plotted as scatter
uniqueID (string) the string name of the variable representing the row ID for csv data
numeric_vars (object)
id_vars (object)
quantileScaleHist (object) d3.scaleQuantile object
scatterLegend (object) object that points to the legend for scatter dropdown
area_set (Set) a Set object that has all the zones whih have data
zoneLegend (object) object that points to the legend for zones
svgInfo (object) svg that pojnts to the bar chart
svgInfoScatter (object) svg that points to the scatter plot
multi_grid (object) the dictionary of maps avaialable to plot
zoneObjectAll (any)
null-null (zoneObjectAll) object contianing all the ID's to maps

createLowerBarChart

update lower bar chart with new histogram choices based on dropdowns

createLowerBarChart(colorsScale: object, svgInfo: any, scgInfo: object)
Parameters
colorsScale (object)
svgInfo (any)
scgInfo (object)

createLegend

updates the legend with the correct scale and colors

createLegend(scale: object, svgVar: object)
Parameters
scale (object) the d3 scale to update the colors
svgVar (object) svg onject that is the legend

legendInit

inititilize the svg for the legend

legendInit(whichLegend: string): object
Parameters
whichLegend (string) the class for the legend
Returns
object: the svg object of the legend

initLowerBarChart

initate the svg for the lower charts

initLowerBarChart(whichViz: any, whcichViz: object)
Parameters
whichViz (any)
whcichViz (object) the svg info that points to the necessary graph

scatterPlot

Createa a scatter plot of data

scatterPlot(whichViz: any, scatterArrayIDs: any, scatterColor: any, null: any, null: any, null: any)
Parameters
whichViz (any)
scatterArrayIDs (any)
scatterColor (any)
null (any) (whichViz) - svg info of the chart initated
null (any) (scatterArrayIds) - includes UniquesIDs as Keys and value for data
null (any) (scatterColor) - includes UniquesIDs as Keys and color for data

longConvert

Convert any Longitudes that are poisitve to MOD -360

longConvert(x: any)
Parameters
x (any)

gridLayerOff

Toggle color layer of zonal histogram

gridLayerOff()