             state_districts.push(obj)
         #find min top/left, find width/height
         district = $scope.usMap.append("g").attr("class", "districts").attr("clip-path", "url(#clip-land)").selectAll("path").data(state_districts).enter().append("path").attr("d", path).text (d) ->
-          "#{$scope.FIPS_to_state[d.id / 100 | 0]}-#{d.id % 100}"
+          if $scope.FIPS_to_state[d.id / 100 | 0] then "#{$scope.FIPS_to_state[d.id / 100 | 0][0]}-#{d.id % 100}"
         district_boundaries = $scope.usMap.append("path").attr("class", "district-boundaries").attr("clip-path", "url(#clip-land)").datum(topojson.mesh(congress, congress.objects.districts, (a, b) ->
           (a.id / 1000 | 0) is (b.id / 1000 | 0) and (a.id and JSON.stringify(a.id).slice(0, -2) is state_FIPS)
         )).attr "d", path

        scale = 1
        $scope.usMap.attr("transform", "translate(" + 220 / 2 + "," + 220 / 2 + ")scale(" + scale + ")translate(" + -o_x + "," + -o_y + ")").style "stroke-width", 1.5


      #    element = d.node()
      # bbox = element.getBBox()
      # x = bbox.x + bbox.width/2
      # y = bbox.y + bbox.height/2
      # if y < 106 and (bbox.height > 53 or bbox.width > 53) then y += (106 - y)
      # scale = 200/Math.sqrt(Math.pow(bbox.width, 2) + Math.pow(bbox.height,2))
      # $scope.usMap.transition().duration(750).attr("transform", "translate(" + 960 / 2 + "," + 600 / 2 + ")scale(" + scale + ")translate(" + -x + "," + -y + ")").style "stroke-width", 1.5 / scale + "px"

      $scope.map_width = 220
      height = 220
      path = d3.geo.path()

          .attr("stop-color", (d)->  return d.color)

    $scope.zoomIn = (d) ->
      element = d.node()
      bbox = element.getBBox()
      x = bbox.x + bbox.width/2
