Skip to content

Commit

Permalink
Merge pull request #3702 from DOI-ONRR/dev
Browse files Browse the repository at this point in the history
dev --> master PR December 18, 2024 v7.11.0
  • Loading branch information
lpgoldstein authored Dec 18, 2024
2 parents 709a320 + 2c0d89f commit 93e8c51
Show file tree
Hide file tree
Showing 18 changed files with 13,081 additions and 6,919 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ commands:
steps:
- run:
name: "Install gnumeric"
command: sudo apt-get install gnumeric
command: |
sudo apt-get install --no-install-recommends gnumeric
- run:
name: "Generate downloads"
command: |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
databaseChangeLog:
- changeSet:
id: fix-mn-st-louis-location
author: Jeff Schwartz
changes:
- sql:
dbms: 'postgresql'
sql: |
UPDATE LOCATION
SET location_name = 'Minnesota, St. Louis',
county = 'St. Louis'
WHERE fips_code = '27137';
2 changes: 1 addition & 1 deletion database/changelog/changelog-data/disbursement.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
databaseChangeLog:
- changeSet:
id: disbursement-monthly-25-October
id: disbursement-monthly-25-November
author: Lindsay Goldstein
changes:
- sql:
Expand Down
2 changes: 1 addition & 1 deletion database/changelog/changelog-data/production-monthly.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
databaseChangeLog:
- changeSet:
id: production-monthly-24-july
id: production-monthly-24-august
author: Christine Thomas
changes:
- sql:
Expand Down
4 changes: 2 additions & 2 deletions database/changelog/changelog-data/revenue.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
databaseChangeLog:
- changeSet:
id: revenue-24-october
id: revenue-24-november
author: Christine Thomas
changes:
- sql:
Expand All @@ -9,7 +9,7 @@ databaseChangeLog:
TRUNCATE TABLE monthly_revenue_elt
- loadData:
tableName: monthly_revenue_elt
file: '../static/csv/revenue/October 2024 Revenue for Portal_csv.csv'
file: '../static/csv/revenue/November 2024 Revenue for Portal_csv.csv'
quotchar: '""'
columns:
- column:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ databaseChangeLog:
- sqlFile:
path: src/functions/insert_period_revenue.sql
splitStatements: false
- sqlFile:
path: src/functions/insert_location_revenue.sql
splitStatements: false
- sqlFile:
path: src/functions/populate_locations_revenue.sql
splitStatements: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ databaseChangeLog:
- sqlFile:
path: src/triggers/monthly_revenue_elt_transform_revenue_type_bri.sql
- sqlFile:
path: src/triggers/monthly_revenue_etl_insert_period_ari.sql
path: src/triggers/monthly_revenue_etl_insert_period_ari.sql
- sqlFile:
path: src/triggers/monthly_revenue_etl_insert_location_ari.sql
24 changes: 24 additions & 0 deletions database/changelog/src/functions/insert_location_revenue.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CREATE OR REPLACE FUNCTION insert_location_revenue()
RETURNS TRIGGER
AS $$
BEGIN
INSERT INTO location(
land_class,
land_category,
state,
county,
fips_code,
offshore_region
)
VALUES(
COALESCE(NEW.land_class_code, ''),
COALESCE(NEW.land_category_code_desc, ''),
COALESCE(NEW.state, ''),
COALESCE(NEW.county_code_desc, ''),
COALESCE(NEW.fips_code, ''),
COALESCE(NEW.agency_state_region_code_desc, '')
)
ON CONFLICT DO NOTHING;

RETURN NULL;
END $$ LANGUAGE PLPGSQL;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DROP TRIGGER IF EXISTS monthly_revenue_etl_insert_location_ari ON monthly_revenue_elt;

CREATE TRIGGER monthly_revenue_etl_insert_location_ari
AFTER INSERT
ON monthly_revenue_elt
FOR EACH ROW
EXECUTE FUNCTION insert_location_revenue();
747 changes: 360 additions & 387 deletions database/static/csv/disbursements/monthly_disbursements.csv

Large diffs are not rendered by default.

824 changes: 416 additions & 408 deletions database/static/csv/production/monthly_production.csv

Large diffs are not rendered by default.

1,880 changes: 1,880 additions & 0 deletions database/static/csv/revenue/November 2024 Revenue for Portal_csv.csv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const config = {
// eslint-disable-next-line max-len
'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.',
keywords: 'Oil and gas, Coal, Renewable energy, Nonenergy minerals, Natural resource policy, Natural resource data, Extractives industries, Federal revenues, Production, 8(g) offshore revenue, offshore production, abanonded mine lands fund, mining reclamation tax, onrr state disbursement data, Native American land ownership, coal extraction, Department of the Interior, DOI, BLM coal leases, gomesa, gomesa funding, energy resource revenue, ONRR, state royalty, us eiti, solar industry, geothermal',
version: 'v7.10.1',
version: 'v7.11.0',
author: '',
dataRetrieval: {
name: 'Data Specialists',
Expand Down
2 changes: 1 addition & 1 deletion src/components/content-partials/WhatsNew.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### What's new

November 21, 2024 changes:
December 18, 2024 changes:

- Added <Link href="/downloads/disbursements-by-month/" linkType="default">monthly disbursements data</Link>
- Added <Link href="/downloads/revenue/" linkType="default">monthly revenue data</Link>
Expand Down
Loading

0 comments on commit 93e8c51

Please sign in to comment.