This is an archived repository for previous development work on revenuedata.doi.gov. See our current repo for information about the current version of the site.
Content below is for archive purposes and is no longer being updated.
For more detailed process, development, and data information, please see our repository's wiki.
The U.S. earns revenue on natural resources (such as oil, gas, coal and geothermals) extracted from federal lands and waters. This is a major source of revenue for both the federal government, state governments, and local municipalities.
This repository contains the code for revenuedata.doi.gov, which is a website that includes both curated content and raw data to better inform the national and international conversation around extractive industries revenue. It will provide data visualizations and information that’s understandable to members of the public and can be re-used through other media and applications.
For more information about the history of the site, see about this site.
Content and feature suggestions are welcome via GitHub Issues. Code contributions are welcome via pull request, although of course we cannot guarantee your changes will be included in the site. Take a look at the issues we've tagged help wanted!
See CONTRIBUTING for more information about how to pitch in.
This project is in the worldwide public domain. As stated in CONTRIBUTING:
This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.
All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
This project uses the GatsbyJS open source framework. This framework builds static web pages that then are published to our production environment. You can read more about Gatsby on their website.
Data and content is read into a graphql schema. This graphql schema is then used to create queries to get the data and content needed to create the pages in the site. Pages are generated either by a template or a React component in the pages directory. Once the page is built it is copied to the public directory into the appropriate subdirectory. All javascript, css and data are embedded into the page. At runtime the react components are initialzed and the page is rendered.
Prerequisites:
- node
- npm
Once you have cloned the repository run:
npm install
Local dev commands:
npm run develop
- This will start a local server running on port 8000 by defaultnpm run build
- This will create the static html pages that are used in the production environmentnpm run server
- If you have run the local build command this wil start a web server so you can view the static html files on port 9000 by defaultnpm run clean
- This wil clean the cache created by the gatsby build process. Use this when you need a refresh the data the site uses.npm run format
- This site uses eslint for fomratting and syntax checkingnpm run test
- We current use Jest to create unit tests. This command will run all the tests locally.