 
       d3.json url, (data) ->
         data._items.forEach (d) ->
-          d.breakdown_year = new Date(d.breakdown_year || 1900, 0, 1)
-          d.construction_year = new Date(d.construction_year || 1900, 0, 1)
+          d.breakdown_year = new Date(d.breakdown_year || YEAR_ZERO, 0, 1)
+          d.construction_year = new Date(d.construction_year || YEAR_ZERO, 0, 1)
 
         callback data._items
 

        wards = createDim (d) -> d.ward
        statusPerWard = reduceStatus wards.group()

        sourceTypes = createDim (d) -> d.source_type
        statusPerSourceType = reduceStatus sourceTypes.group()

        constrYears = createDim (d) -> d.construction_year
        constrYearsGroup = reduceStatus constrYears.group()



          setupCharts $scope.region

    # what value to use for year 0
    YEAR_ZERO=1900

    getData = (region, callback) ->
      filter =  region: region

