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 #4653 from ONRR/dev
Browse files Browse the repository at this point in the history
Dev—>Master
  • Loading branch information
jennmalcolm authored Oct 3, 2019
2 parents 4418c1b + de44c0a commit 7a4b4db
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 34 deletions.
2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let config = {
siteMetadata: {
title: 'Natural Resources Revenue Data',
description: 'This site provides open data about natural resource management on federal lands and waters in the United States, including oil, gas, coal, and other extractive industries.',
version: 'v5.4.4',
version: 'v5.4.5',
googleAnalyticsId: GOOGLE_ANALYTICS_ID,
},
plugins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,10 @@ const createRevenueNode = (revenueData, type) => {
: (revenueNode.RevenueDate.getYear() + 1900).toString()
}

let landCat = revenueNode.LandCategory && revenueNode.LandCategory.toLowerCase()

if (landCat === 'not tied to a lease' ||
revenueNode.RevenueType === 'Civil Penalities' ||
revenueNode.RevenueType === 'Other Revenues') {
if (revenueNode.LandClass !== CONSTANTS.NATIVE_AMERICAN &&
!revenueNode.OffshoreRegion) {
revenueNode.State = revenueNode.State || 'Not tied to a location'
}
if (revenueNode.LandClass === CONSTANTS.FEDERAL &&
!revenueNode.OffshoreRegion &&
!revenueNode.State) {
revenueNode.State = 'Not tied to a location'
}

return revenueNode
Expand Down Expand Up @@ -165,7 +160,5 @@ function getFipsCode (offshorePlanningArea) {
return 'CHU'
}


return undefined
}

11 changes: 8 additions & 3 deletions src/components/sections/DisbursmentTrends/DisbursementTrends.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,13 @@ const getPreviousYear = (data) => {
}

const getMaxMonth = (data) => {
let r=data.reduce((max, p) => p.date > max ? p.date : max, data[0].date );
let r=data.reduce((max, p) => p.date > max ? p.date : max, data[0].date );

//let dates=data.map((row,i) => row.date.getTime());
//let max_epoch=Math.max.apply(null,dates)
//let r=new Date(max_epoch)


return r;
}
const monthLookup= (month) => {
Expand Down Expand Up @@ -250,9 +255,9 @@ const sumMonthlyData= (item,r,index,currentYear) => {
const monthlyDate = (obj) => {

let month=monthLookup(obj.Month);
if(month < 10) { month='0'+month};
let year=Math.floor(obj.DisplayYear.substring(1))+2000;

let date=new Date(year+'-'+month+'-01')
let date=new Date(year+'-'+month+'-02')
return date;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ class TotalProductionDeprecated extends React.Component {
<div className={styles.dropdown}>
Period:
<DropDown
key={'ProductionPeriod'}
key={'ProductionPeriod'}
label={'Period'}
action={this.productionPeriodSelected.bind(this)}
options={[
{ key: DROPDOWN_VALUES.Recent,
Expand All @@ -371,7 +372,8 @@ class TotalProductionDeprecated extends React.Component {
:
<div className={styles.dropdown}>
Period:
<DropDown
<DropDown
label={'Period'}
key={'ProductionYearlyPeriod'}
action={this.productionYearlyPeriodSelected.bind(this)}
options={[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ class TotalRevenueDeprecated extends React.Component {
{(this.state.revenueToggle === TOGGLE_VALUES.Month) ?
<div className={styles.dropdown}>
Period:
<DropDown
<DropDown
label={'Period'}
key={'RevenuePeriod'}
action={this.revenuePeriodSelected.bind(this)}
options={[
Expand All @@ -372,9 +373,10 @@ class TotalRevenueDeprecated extends React.Component {
</div>
:
<div className={styles.dropdown}>
Period:
Period:
<DropDown
key={'RevenueYearlyPeriod'}
key={'RevenueYearlyPeriod'}
label={'Period'}
action={this.revenueYearlyPeriodSelected.bind(this)}
options={[
{ key: YEARLY_DROPDOWN_VALUES.Fiscal,
Expand Down
6 changes: 5 additions & 1 deletion src/components/sections/WhatsNew/WhatsNew.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ const WhatsNew = props => (
<section className={styles.root + ' slab-delta'}>
<div className="container-page-wrapper">
<h2>What's new</h2>
<p>In our latest release on September 30, 2019, we made the following changes:</p>
<p>In our latest release on October 3, 2019, we made the following changes:</p>
<ul className="list-bullet ribbon-card-top-list">
<li>Fixed a bug with disbursements trends on the homepage</li>
</ul>
<p>In our release on September 30, 2019, we made the following changes:</p>
<ul className="list-bullet ribbon-card-top-list">
<li>Improved accessibility of homepage charts and navigation</li>
<li>Added <Link to="/blog">blog post about building technical capacity with team members</Link></li>
Expand Down
4 changes: 2 additions & 2 deletions src/components/selectors/DropDown/DropDown.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ class DropDown extends React.Component {
let { options, selectedKey, defaultKey } = this.state
let styles = (this.props.theme === 'year') ? yearTheme : standardTheme
defaultKey = (selectedKey !== undefined) ? undefined : defaultKey

let label=this.props.label || this.props.aria-label;
return (
<div className={styles.root}>
<select onChange={this.onChangeHandler.bind(this)} defaultValue={defaultKey} value={selectedKey}>
<select onChange={this.onChangeHandler.bind(this)} defaultValue={defaultKey} value={selectedKey} aria-label={label}>
{options &&
options.map((option, index) => {
let name, value
Expand Down
2 changes: 1 addition & 1 deletion src/img/icons/how-works.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/img/icons/icon-circled-minus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/img/icons/icon-circled-plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/img/svg/icon-download-buttonup.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Beta extends React.Component {
console.debug(mapJson);
return(
<DefaultLayout>
<main>
<main id="main-content">
<Helmet
title="Home | Natural Resources Revenue Data"
meta={[
Expand All @@ -121,7 +121,7 @@ class Beta extends React.Component {
{ name: 'twitter:title', content: 'Home | Natural Resources Revenue Data' },
]} >
</Helmet>
<section id="main-content" className="container-page-wrapper" >
<section className="container-page-wrapper" >
<h3 className="h3-bar"></h3>
<p> When companies extract energy and mineral resources on property leased from the federal government and Native Americans, they pay <GlossaryTerm termKey="Bonus">bonuses</GlossaryTerm>, <GlossaryTerm>rent</GlossaryTerm>, and <GlossaryTerm termKey="Royalty">royalties</GlossaryTerm>. The Office of Natural Resources Revenue (ONRR) collects and <GlossaryTerm termKey="disbursement">disburses</GlossaryTerm> revenue from federal lands and waters to different agencies, funds, and local governments for public use. All revenue collected from extraction on Native American lands is disbursed to Native American tribes, nations, or individuals.</p>
</section>
Expand Down

0 comments on commit 7a4b4db

Please sign in to comment.