Sha256: 6b82e1cf09dc35a0b7f4de948749f2dcec791bcb49888d14c51eab887f5348cb

Contents?: true

Size: 1.83 KB

Versions: 7

Compression:

Stored size: 1.83 KB

Contents

<%
  urban_area ||= nil
  zcta ||= nil
  overlap = (urban_area || zcta)
%>

<table class="table table-striped sortable">
  <thead>
    <tr>
      <th>GEOID</th>
      <th>Name</th>
      <% unless defined?(state) && state %>
        <th>State</th>
      <% end %>
      <% unless defined?(core_based_statistical_area) && core_based_statistical_area %>
        <th>Core Based Statistical Area</th>
      <% else %>
        <th>CBSA Position</th>
      <% end %>
      <th>FIPS Class Code</th>

      <%= demographics_headers %>

      <% if overlap %>
        <th class="text-end">Overlap</th>
      <% end %>
    </th>
  </thead>
  <tbody>
    <% counties.each do |county| %>
      <tr>
        <td><%= county.geoid %></td>
        <td><%= link_to county.name, county_path(county, breadcrumb_params) %></td>
        <% unless defined?(state) && state %>
          <td><%= county.state.name %></td>
        <% end %>
        <% if defined?(core_based_statistical_area) && core_based_statistical_area %>
          <td><%= county.central? ? "Central" : "Outlying" %></td>
        <% else %>
          <td>
            <% if county.core_based_statistical_area %>
              <%= link_to county.core_based_statistical_area.name, core_based_statistical_area_path(county.core_based_statistical_area) %>
            <% else %>
              -
            <% end %>
          </td>
        <% end %>
        <td><%= county.fips_class_code %></td>

        <%= demographics_cells(county, round_area: 0) %>

        <% if overlap %>
          <td class="text-end">
            <% if urban_area %>
              <%= overlap_percentage(urban_area, county, :urban_area_counties) %>
            <% elsif zcta %>
              <%= overlap_percentage(zcta, county, :zcta_counties) %>
            <% end %>
          </td>
        <% end %>
      </tr>
    <% end %>
  </tbody>
</table>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
us_geo-2.1.1 explorer_app/app/views/counties/_table.html.erb
us_geo-2.1.0 explorer_app/app/views/counties/_table.html.erb
us_geo-2.0.4 explorer_app/app/views/counties/_table.html.erb
us_geo-2.0.3 explorer_app/app/views/counties/_table.html.erb
us_geo-2.0.2 explorer_app/app/views/counties/_table.html.erb
us_geo-2.0.1 explorer_app/app/views/counties/_table.html.erb
us_geo-2.0.0 explorer_app/app/views/counties/_table.html.erb