Skip to content
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.

Regional collections #1479

Merged
merged 7 commits into from
Jun 8, 2016
Merged
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
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ all: db
clean:
rm -f $(db)

collections/regional: \
collections/states \
collections/offshore_areas \
collections/offshore_regions

collections/states: data/_input/geo/states.csv
$(tito) -r csv --map 'd => {{id: d.abbr, title: d.name, FIPS: d.FIPS}}' $^ \
| $(node_bin)to-jekyll-collection --format ndjson -i /dev/stdin -o _states

collections/offshore_areas: data/_input/geo/offshore/areas.tsv
$(tito) -r tsv --map 'd => {{id: d.id, title: d.name, region: d.region.toLowerCase(), permalink: ["/offshore", d.region.toLowerCase(), d.id, ""].join("/")}}' $^ \
| $(node_bin)to-jekyll-collection --format ndjson -i /dev/stdin -o _offshore_areas

collections/offshore_regions: data/_input/geo/offshore/regions.tsv
$(tito) -r tsv --map 'd => {{id: d.id, title: d.region}}' $^ \
| $(node_bin)to-jekyll-collection --format ndjson -i /dev/stdin -o _offshore_regions

site-data: \
data/jobs \
data/revenue \
Expand Down
37 changes: 25 additions & 12 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,26 @@ collections:
case-studies:
output: true
permalink: /case-studies/:path/
downloads:
output: true
permalink: /downloads/:path/
explore:
output: true
permalink: /explore/:path/
federal-revenue-by-company:
output: true
permalink: /explore/federal-revenue-by-company/:path/
how-it-works:
output: true
permalink: /how-it-works/:path/
downloads:
offshore_areas:
output: false
offshore_regions:
output: false
permalink: /offshore/:path/
states:
output: true
permalink: /downloads/:path/
federal-revenue-by-company:
output: true
permalink: /explore/federal-revenue-by-company/:path/
permalink: /states/:path/

defaults:
- scope:
Expand All @@ -75,14 +83,19 @@ defaults:
values:
layout: federal-revenue-by-company

page_gen:
- data: 'states'
template: 'state-page'
name: 'id'
dir: 'states'
extension: 'html'
- scope:
path: ''
collection: states
values:
layout: state-page
offshore: false

page_gen_dirs: true
- scope:
path: ''
collection: offshore_regions
values:
layout: state-page
offshore: true

shruggie:
- d8394cf27efbf8ae2f96ee12788eb257f4358a42
Expand Down
4 changes: 2 additions & 2 deletions _layouts/state-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
title: Disbursements
---

{% assign state_name = page.data.name %}
{% assign state_id = page.data.id %}
{% assign state_name = page.title %}
{% assign state_id = page.id %}
{% assign year = '2013' %}
{% assign oilgas = 'Oil & Gas (Non-Royalty)' %}
{% assign commodity_names = site.data.commodity_names %}
Expand Down
6 changes: 6 additions & 0 deletions _offshore_areas/ALA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: ALA
title: Aleutian Arc
region: alaska
permalink: /offshore/alaska/ALA/
---
6 changes: 6 additions & 0 deletions _offshore_areas/ALB.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: ALB
title: Aleutian Basin
region: alaska
permalink: /offshore/alaska/ALB/
---
6 changes: 6 additions & 0 deletions _offshore_areas/BFT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: BFT
title: Beaufort Sea
region: alaska
permalink: /offshore/alaska/BFT/
---
6 changes: 6 additions & 0 deletions _offshore_areas/BOW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: BOW
title: Bowers Basin
region: alaska
permalink: /offshore/alaska/BOW/
---
6 changes: 6 additions & 0 deletions _offshore_areas/CEC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: CEC
title: Central California
region: pacific
permalink: /offshore/pacific/CEC/
---
6 changes: 6 additions & 0 deletions _offshore_areas/CGM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: CGM
title: Central Gulf of Mexico
region: gulf
permalink: /offshore/gulf/CGM/
---
6 changes: 6 additions & 0 deletions _offshore_areas/CHU.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: CHU
title: Chukchi Sea
region: alaska
permalink: /offshore/alaska/CHU/
---
6 changes: 6 additions & 0 deletions _offshore_areas/COK.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: COK
title: Cook Inlet
region: alaska
permalink: /offshore/alaska/COK/
---
6 changes: 6 additions & 0 deletions _offshore_areas/EGM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: EGM
title: Eastern Gulf of Mexico
region: gulf
permalink: /offshore/gulf/EGM/
---
6 changes: 6 additions & 0 deletions _offshore_areas/FLS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: FLS
title: Florida Straits
region: atlantic
permalink: /offshore/atlantic/FLS/
---
6 changes: 6 additions & 0 deletions _offshore_areas/GEO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: GEO
title: St. George Basin
region: alaska
permalink: /offshore/alaska/GEO/
---
6 changes: 6 additions & 0 deletions _offshore_areas/GOA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: GOA
title: Gulf of Alaska
region: alaska
permalink: /offshore/alaska/GOA/
---
6 changes: 6 additions & 0 deletions _offshore_areas/HOP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: HOP
title: Hope Basin
region: alaska
permalink: /offshore/alaska/HOP/
---
6 changes: 6 additions & 0 deletions _offshore_areas/KOD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: KOD
title: Kodiak
region: alaska
permalink: /offshore/alaska/KOD/
---
6 changes: 6 additions & 0 deletions _offshore_areas/MAT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: MAT
title: St. Matthew-Hall
region: alaska
permalink: /offshore/alaska/MAT/
---
6 changes: 6 additions & 0 deletions _offshore_areas/MDA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: MDA
title: Mid Atlantic
region: atlantic
permalink: /offshore/atlantic/MDA/
---
6 changes: 6 additions & 0 deletions _offshore_areas/NAL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: NAL
title: North Aleutian Basin
region: alaska
permalink: /offshore/alaska/NAL/
---
6 changes: 6 additions & 0 deletions _offshore_areas/NAV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: NAV
title: Navarin Basin
region: alaska
permalink: /offshore/alaska/NAV/
---
6 changes: 6 additions & 0 deletions _offshore_areas/NOA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: NOA
title: North Atlantic
region: atlantic
permalink: /offshore/atlantic/NOA/
---
6 changes: 6 additions & 0 deletions _offshore_areas/NOC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: NOC
title: Northern California
region: pacific
permalink: /offshore/pacific/NOC/
---
6 changes: 6 additions & 0 deletions _offshore_areas/NOR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: NOR
title: Norton Basin
region: alaska
permalink: /offshore/alaska/NOR/
---
6 changes: 6 additions & 0 deletions _offshore_areas/SHU.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: SHU
title: Shumagin
region: alaska
permalink: /offshore/alaska/SHU/
---
6 changes: 6 additions & 0 deletions _offshore_areas/SOA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: SOA
title: South Atlantic
region: atlantic
permalink: /offshore/atlantic/SOA/
---
6 changes: 6 additions & 0 deletions _offshore_areas/SOC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: SOC
title: Southern California
region: pacific
permalink: /offshore/pacific/SOC/
---
6 changes: 6 additions & 0 deletions _offshore_areas/WAO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: WAO
title: Washington-Oregon
region: pacific
permalink: /offshore/pacific/WAO/
---
6 changes: 6 additions & 0 deletions _offshore_areas/WGM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: WGM
title: Western Gulf of Mexico
region: gulf
permalink: /offshore/gulf/WGM/
---
4 changes: 4 additions & 0 deletions _offshore_regions/alaska.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
id: alaska
title: Alaska
---
4 changes: 4 additions & 0 deletions _offshore_regions/atlantic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
id: atlantic
title: Atlantic
---
4 changes: 4 additions & 0 deletions _offshore_regions/gulf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
id: gulf
title: Gulf
---
4 changes: 4 additions & 0 deletions _offshore_regions/pacific.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
id: pacific
title: Pacific
---
Loading