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

Commit

Permalink
Merge pull request #3449 from ONRR/dev
Browse files Browse the repository at this point in the history
Dev-->Master
  • Loading branch information
brentryanjohnson authored Dec 6, 2018
2 parents 4163493 + 388239b commit a779061
Show file tree
Hide file tree
Showing 73 changed files with 19,610 additions and 1,183 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ styleguide
.npmrc
/.project
gatsby-public
blog
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ url: https://revenuedata.doi.gov

# app version number

version: v4.2.2
version: v4.3.0

exclude:
# top-level log
Expand Down Expand Up @@ -72,6 +72,7 @@ exclude:
- vendor
# Gatsby Dev
- gatsby-site
- blog-site

include:
- /build.log
Expand Down
10 changes: 10 additions & 0 deletions _downloads/federal-production-by-month.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ nav_items:
title: Scope
- name: data-publication
title: Data publication
- name: monthly-totals-and-annual-totals
title: Monthly totals and annual totals
- name: data-dictionary
title: Data dictionary
subnav_items:
Expand Down Expand Up @@ -53,6 +55,14 @@ This dataset includes natural resource production for U.S. federal lands and off

We update this production data every month, but final production numbers aren't available for 3-4 months. For example, the most recent production data for a file updated in November will be from July or August.

## Monthly totals and annual totals

The sum of 12-month production totals for a given calendar or fiscal year may not add up to the annual total found in the [production by year data]({{site.baseurl}}//downloads/federal-production/). While the production volume (amount of a commodity coming out of the ground) doesn't change, the way it is accounted for might. There are two main reasons why:

- Operators may not report on time, meaning production for a past month might increase when the operator submits the report and ONRR updates the data.

- The Bureau of Land Management may choose to change agreements and units after production. These changes may affect the allocation of the production volume, changing the data. <br><br>For example, changing an agreement retroactively may change the allocation of production among states, the federal government, and Native American tribes and individuals. As a result, the apportioned totals in the data would change.

## Data dictionary

### Fields and definitions
Expand Down
1 change: 0 additions & 1 deletion _sass/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ time, mark, audio, video {
font-size: 100%;
font: inherit;
vertical-align: baseline;
scroll-behavior: smooth;
}

/* HTML5 display-role reset for older browsers */
Expand Down
19 changes: 19 additions & 0 deletions blog-site/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
},
"plugins": [
"react",
],
"globals": {
"graphql": false,
},
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true,
},
}
}
7 changes: 7 additions & 0 deletions blog-site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
public
.gatsby-context.js
.DS_Store
.intermediate-representation/
.cache/
yarn.lock
5 changes: 5 additions & 0 deletions blog-site/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"trailingComma": "es5",
"semi": false,
"singleQuote": true
}
15 changes: 15 additions & 0 deletions blog-site/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: node_js

os:
- linux
- osx

node_js:
- "node"
- "lts/*"
- "7"
- "8"

script:
- npm install
- npm run lint
21 changes: 21 additions & 0 deletions blog-site/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Gatsbyjs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 8 additions & 0 deletions blog-site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# A blog from the Innovation Design Team at the Department of the Interior

Our team works on [Natural Resources Revenue Data](https://revenuedata.doi.gov/), an [open data](https://github.com/ONRR/doi-extractives-data) site about how the government manages federal energy and mineral resources, revenue, and disbursements.

We built this blog with [GatsbyJS](https://gatsbyjs.org/) using the [`gatsby-starter-blog`](https://github.com/gatsbyjs/gatsby-starter-blog).

We use this blog to share our user-centered design and development process.

73 changes: 73 additions & 0 deletions blog-site/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Federalist provides the BASEURL env variable for preview builds.
// https://github.com/18F/federalist-garden-build#variables-exposed-during-builds
const BASEURL = process.env.BASEURL || '';


module.exports = {
siteMetadata: {
title: 'Open data design at the Department of the Interior',
author: 'Ryan Johnson',
description: 'Our blog about data, design, and innovation at the Department of the Interior.',
siteUrl: 'https://revenuedata.doi.gov/',
},
pathPrefix: `${BASEURL}/blog`,
mapping: {
"MarkdownRemark.frontmatter.authors": `AuthorYaml`,
},
plugins: [
`gatsby-transformer-yaml`,
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/pages`,
name: 'pages',
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/data`,
name: 'data',
},
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 590,
quality: 80,
},
},
{
resolve: `gatsby-remark-responsive-iframe`,
options: {
wrapperStyle: `margin-bottom: 1.0725rem`,
},
},
'gatsby-remark-prismjs',
'gatsby-remark-copy-linked-files',
'gatsby-remark-smartypants',
],
},
},
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-plugin-google-analytics`,
options: {
//trackingId: `ADD YOUR TRACKING ID HERE`,
},
},
`gatsby-plugin-offline`,
`gatsby-plugin-react-helmet`,
{
resolve: 'gatsby-plugin-typography',
options: {
pathToConfigModule: 'src/utils/typography',
},
},
],
}
78 changes: 78 additions & 0 deletions blog-site/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
const _ = require('lodash')
const Promise = require('bluebird')
const path = require('path')
const { createFilePath } = require('gatsby-source-filesystem')

exports.createPages = ({ graphql, actions }) => {
const { createPage } = actions

return new Promise((resolve, reject) => {
const blogPost = path.resolve('./src/templates/blog-post.js')
resolve(
graphql(
`
{
allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }, limit: 1000) {
edges {
node {
fields {
slug
}
frontmatter {
title
}
}
}
}
}
`
).then(result => {
if (result.errors) {
console.log(result.errors)
reject(result.errors)
}

// Create blog posts pages.
const posts = result.data.allMarkdownRemark.edges;

_.each(posts, (post, index) => {
const previous = index === posts.length - 1 ? null : posts[index + 1].node;
const next = index === 0 ? null : posts[index - 1].node;

createPage({
path: post.node.fields.slug,
component: blogPost,
context: {
slug: post.node.fields.slug,
previous,
next,
},
})
})
})
)
})
}

exports.onCreateNode = ({ node, actions, getNode }) => {
const { createNodeField } = actions

if (node.internal.type === `MarkdownRemark`) {
const value = createFilePath({ node, getNode })
createNodeField({
name: `slug`,
node,
value,
})
}
}

var copydir = require('copy-dir');

exports.onPostBuild = () => {

console.log("Copying Files from public to blog...");
copydir.sync(__dirname+'/public', '../blog');
console.log("Finished Copying Files to blog.");

}
Loading

0 comments on commit a779061

Please sign in to comment.