Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion content/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ colorbar: orange

---

Here is some helpful information
San Diego's Open Data Portal is an archive containing all of our collected
data sets openly accessible to the public. Managed by the Performance and Analytics Department, the many City of San Diego departments have come together to be transparent about the data they collect, how they use it, and how it impacts their policies and procedures. The goal of this data portal is to use this technology to be open, accessible, efficient, and transparent regarding data, and to allow citizens to be more connected to the government.
22 changes: 22 additions & 0 deletions data/servicesDesc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"City Clerk": "The City Clerk aspires to provide accurate information, maximize equitable access to the government, and to build a transparent connection with their citizens.",
"City Treasurer": "City Treasurer manages funds and tax revenue as well as monitoring financial statistics.",
"Commission for Arts and Culture": "The Commission for Arts and Culture serves as an advisory team who is promoting and encouraging more work and support for San Diego's artistic assets and the importance of including art in our local culture.",
"Commission on Police Practices": "The Commission on Police Practices is an independent body of the Police department who investigates and manages reports regarding the actions of police officers and the department's policies and practices.",
"Development Services": "The Development Services Department helps enforce safe building and land codes, as well as review plans, provide permits and inspections, and retains building records across San Diego.",
"Engineering and Capital Projects": "The Engineering and Capital Projects department works to enhance the safety and the environment of San Diego through quality engineering, program, and construction management.",
"Environmental Services": "Environmental Services helps ensure San Diego has a clean and safe environment for residents, as well as resources regarding managing waste.",
"Finance": "The Department of Finance oversees the budgets for the City, accounts for all financial reports of City funding, manages payroll and vendor payments, and manages the City's debt obligations.",
"Fire and Rescue": "Fire and Rescue provides safety services around San Diego, including fire stations, 911 operation centers, lifeguard towers and training facilities.",
"General Services": "General Services helps the other departments by providing management of the vehicles and facilities owned by the City.",
"Information Technology": "Information Technology (IT) works to improve the technology around San Diego and to continue to find innovative technlogical solutions for various problems.",
"Parks and Recreation": "Parks and Recreation is responsible for managing the parks and open space, recreation facilities and recreation programs for San Diego citizens and visitors alike.",
"Performance and Analytics": "Performance and Analytics manages data and tracks progress for a variety of City projects. They aim to better serve the community by being honest and transparent with data.",
"Police": "The San Diego Police have a mission of maintaining public safety and serving our communities.",
"Public Utilities": "The Public Utilities department serves wastewater customers and maintains water and wastewater treatment plants, water reservoirs, and helps provide clean and safe drinking water for 1.4 million residents.",
"Real Estate and Airport Management": "The Economic Development Department oversees management of airports and real estate around San Diego, and is actively working towards goals such as affordable housing, wayfinding technology, and other programs that develop the communities, businesses and the economy of San Diego.",
"San Diego Geographic Information Source (SanGIS)": "The San Diego Geographic Information Source (SanGIS) is a joint project called a Joint Power Authority (JPA) between the City of San Diego and the County of San Diego to maintain an accurate database of the regional and geographic information of San Diego.",
"Special Events and Filming": "The Special Events & Filming department enhances the economic and arts sides of San Diego by supporting special events and filming around the region.",
"Stormwater": "The Stormwater department works to enhance San Diego's water quality and to protect communities from flooding.",
"Transportation": "The Transportation department helps operate and maintain roads and other related infrastructure to help create a safe traveling environment."
}
13 changes: 11 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">

{{ $style := resources.Get "scss/style.scss" | resources.ToCSS }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{ with resources.Get "scss/style.scss" }}
{{ with . | toCSS }}
{{ if hugo.IsDevelopment }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{ else }}
{{ with . | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
{{ end }}
{{ end }}
{{ end }}

</head>
<html prefix="dct: http://purl.org/dc/terms/
Expand Down
36 changes: 31 additions & 5 deletions layouts/datasets/single.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,42 @@
{{ define "main" }}
{{- $distroRowCounts := getCSV "," $.Site.Params.rowNosCsv }}
{{- $dsViewCounts := getCSV "," $.Site.Params.dsViewsCsv }}


{{- $urlviewcounts := $.Site.Params.dsViewsCsv }}
{{- with resources.GetRemote $urlviewcounts }}
{{- with .Err }}
{{- errorf "%s" . }}
{{- else }}
{{- $.Scratch.Add "dsViewCounts" ( . | transform.Unmarshal ) }}
{{- end }}
{{- else }}
{{- errorf "Unable to get remote resource %q" $urlviewcounts }}
{{- end }}


{{- $urlrowcounts := $.Site.Params.rowNosCsv }}
{{- with resources.GetRemote $urlrowcounts }}
{{- with .Err }}
{{- errorf "%s" . }}
{{- else }}
{{- $.Scratch.Add "distroRowCounts" ( . | transform.Unmarshal ) }}
{{- end }}
{{- else }}
{{- errorf "Unable to get remote resource %q" $urlrowcounts }}
{{- end }}


{{- $thisIdentifier := (path.Base .RelPermalink) }}
{{- $pageCatList := $.Params.categories }}
{{- $selectedPageCat := index $pageCatList 0 }}
{{- $thisViewCount := 0 }}
{{- range $i, $e := $dsViewCounts }}

{{- range $i, $e := $.Scratch.Get "dsViewCounts" }}
{{- $currViewsRow := index $e 0 }}
{{- if eq $currViewsRow $thisIdentifier }}
{{- $thisViewCount = int (index $e 1) }}
{{- end }}
{{- end }}

<div class="container">
<div class="row">
<div class="col pt-5">
Expand All @@ -34,7 +60,7 @@ <h1 class="display-4 mb-5">
<div class="row pb-7">
<div class="col-4">
{{- range first 1 .Params.distributions -}} <!-- loop to get downloads -->
{{ partial "download-card" (dict "distribution" . "dlCardCat" (anchorize $selectedPageCat) "dlRows" $distroRowCounts) }}
{{ partial "download-card" (dict "distribution" . "dlCardCat" (anchorize $selectedPageCat) "dlRows" ($.Scratch.Get "distroRowCounts") ) }}
{{- end -}}
</div>
<div class="col-8">
Expand Down Expand Up @@ -113,7 +139,7 @@ <h1 class="display-6 mb-5" id="dataFilters">
*/}}
{{- $thisURL := printf "%s" .url }}
{{- $thisRowCount := 0 }}
{{- range $i, $e := $distroRowCounts }}
{{- range $i, $e := $.Scratch.Get "distroRowCounts" }}
{{- $currDlRow := index $e 0 }}
{{- if eq $currDlRow $thisURL }}
{{- $thisRowCount = int (index $e 1) }}
Expand Down
18 changes: 14 additions & 4 deletions layouts/partials/data-dictionary.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
<div class="row mt-4">
{{ $url := .Params.described_by }}
{{ $sep := "," }}
{{ $csvRows := getCSV $sep $url}}
{{ $noRows := $csvRows | len }}
{{- with resources.GetRemote $url }}
{{- with .Err }}
{{- errorf "%s" . }}
{{- else }}
{{- $.Scratch.Add "csvRows" ( .Content | transform.Unmarshal ) }}
{{- end }}
{{- else }}
{{- errorf "Unable to get remote resource %q" $url }}
{{- end }}


{{ $noRows := ( $.Scratch.Get "csvRows" ) | len }}
{{ $noDataFields := sub $noRows 1 }}
{{ $dataFields := last $noDataFields $csvRows }}
{{ $dataFields := last $noDataFields ( $.Scratch.Get "csvRows" ) }}
{{ $dataFieldsLen := sub $noDataFields 1 }}

<div class="col-sm">
Expand All @@ -16,6 +25,7 @@
<th></th>
</thead>
<tbody>

{{- range $i, $r := $dataFields }}
<tr class="fs-5 fw-semibold">
<td class="align-middle">{{ index $r 0 }}</td>
Expand Down
11 changes: 6 additions & 5 deletions layouts/partials/datasets-categories-lg.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@ <h1 class="display-6 text-white">Datasets by category</h1>
</div>
</div>
<div class="row">
{{ range $key, $value := .Site.Taxonomies.categories }}
{{ $iconPartial := (printf "%s%s" "icon-" $key) }}
{{- range site.Menus.category }}
{{- $thisCategory := lower (replace .Name " " "-") }}
{{- $iconPartial := (printf "%s%s" "icon-" $thisCategory) }}
<div class="col-sm-3 mb-3">
<a class="card category-card text-decoration-none {{ $iconPartial }}" href="/categories/{{ $key | urlize }}">
<a class="card category-card text-decoration-none {{ $iconPartial }}" href="/categories/{{ $thisCategory | urlize }}">
<div class="row g-0">
<div class="col-sm-4">
<div class="category-svg">
{{ partial $iconPartial . }}
</div>
</div>
<div class="col-sm-8 d-flex align-items-center">
<h5 class="card-title text-white fs-6 lh-1 ms-3">{{ humanize $key }}</h5>
<h5 class="card-title text-white fs-6 lh-1 ms-3">{{ humanize $thisCategory }}</h5>
</div>
</div>
</a>
</div>
{{ end }}
{{- end }}
</div>
<div class="row">
<div class="col d-flex pt-7 align-items-center">
Expand Down
8 changes: 4 additions & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@ publish = "public"
command = "hugo --gc --minify"

[context.production.environment]
HUGO_VERSION = "0.118.2"
HUGO_VERSION = "0.135.0"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"

[context.split1]
command = "hugo --gc --minify --enableGitInfo"

[context.split1.environment]
HUGO_VERSION = "0.118.2"
HUGO_VERSION = "0.135.0"
HUGO_ENV = "production"

[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[context.deploy-preview.environment]
HUGO_VERSION = "0.118.2"
HUGO_VERSION = "0.135.0"

[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"

[context.branch-deploy.environment]
HUGO_VERSION = "0.118.2"
HUGO_VERSION = "0.135.0"

[context.next.environment]
HUGO_ENABLEGITINFO = "true"
Expand Down