-<% include( 'elements/search.html',
- 'html_init' => $html_init,
- 'html_foot' => sub { if (scalar(keys %state_hash) > 1) {
- '<BR><B>'.
- 'WARNING: multiple states found'.
- '</B><BR>';
- } else {
- '';
- }
- },
- 'name' => 'regions',
- 'query' => [ @sql_query ],
- 'count_query' => $count_query,
- 'order_by' => 'ORDER BY censustract',
- 'avoid_quote' => 1,
- 'no_csv_header' => 1,
- 'nohtmlheader' => 1,
- 'header' => [
- 'County code',
- 'Census tract code',
- 'Upload rate',
- 'Download rate',
- 'Technology code',
- 'Technology code other',
- 'Quantity',
- 'Percentage residential',
- ],
- 'xml_elements' => [
- 'county_fips',
- 'census_tract',
- 'upload_rate_code',
- 'download_rate_code',
- 'technology_code',
- 'technology_code_other',
- 'value',
- 'percentage',
- ],
- 'fields' => [
- sub { my $row = shift;
- $state_hash{substr($row->censustract, 0, 2)} = 1;
- substr($row->censustract, 2, 3)
- },
- sub { my $row = shift; substr($row->censustract, 5) },
- 'upload',
- 'download',
- 'technology_code',
- sub { $cgi->param('_type') eq 'xml' ? '0' : '' }, # doesn't really work
- 'quantity',
- sub { my $row = shift; sprintf "%.2f", $row->residential },
- ],
- 'links' => [
- [ $link, $link_suffix ],
- [ $link, $link_suffix ],
- [ $link, $link_suffix ],
- [ $link, $link_suffix ],
- [ $link, $link_suffix ],
- [ $link, $link_suffix ],
- [ $link, $link_suffix ],
- [ $link, $link_suffix ],
- ],
- 'url' => $opt{url} || '',
+<& elements/search.html,
+ 'html_init' => '<H2>Part VI</H2>',
+ 'html_foot' => $html_foot,
+ 'name' => 'regions',
+ 'query' => [ @sql_query ],
+ 'count_query' => $count_query,
+ 'order_by' => 'ORDER BY censustract',
+ 'avoid_quote' => 1,
+ 'no_csv_header' => 1,
+ 'nohtmlheader' => 1,
+ 'header' => \@header,
+ 'xml_elements' => [
+ 'county_fips',
+ 'census_tract',
+ 'upload_rate_code',
+ 'download_rate_code',
+ 'technology_code',
+ 'technology_code_other',
+ 'value',
+ 'percentage',
+ ],
+ 'fields' => \@fields,
+ 'links' => \@links,
+ 'url' => $opt{url} || '',