Digital.gov Site Scanning program - Google Sheet Highlights
This Node.js script downloads a CSV file from a specified URL (weekly-snapshot.csv), renames it with the current date, and uploads its contents to a Google Sheets document. The Google Sheets API is used to handle authentication and data operations.
By presenting the CSV data as a Google Sheet, it is:
- Easier to see the data aggregated here than it is in a CSV file. Making it more consumable for everyone.
- A check against changes to the data. Errors may show up if there are changes in the data structure.
- Useful to highlight those agencies which are falling behind. Making this more visible may encourage improvements. If it isn't monitored it doesn't matter.
- Downloads a CSV file from the Site Scanning page.
- Renames the file with the current date.
- Authenticates with Google Sheets using provided credentials.
- Uploads the CSV data to a new sheet in the specified Google Sheets document.
- Updates an “Introduction” sheet in the Google Sheets document with the title of the newly created sheet.
- Data Aggregation: The data is easier to consume in a Google Sheets format than in a CSV file.
- Data Integrity: Changes in the data structure can be detected, allowing for error checking. digital.gov-scan-upload.js.mdAccountability: Highlighting agencies that are falling behind can encourage improvements. Monitoring and visibility are key.
The processed data is uploaded to the following Google Sheets document: Google Sheets Link
- Node.js (v16 or later recommended)
- npm (Node Package Manager)
- Google Cloud project with Google Sheets API enabled
- Credentials JSON file for Google Sheets API
- Download the digital.gov-scan-upload.js file
- Setup a Google Cloud project
- Enable the Google Sheets API
- Save your OAuth Config
- Ensure you have a recent version of node running
- Run
node digital.gov-scan-upload.js.md
The maintainer of this script is Mike Gifford. Bugs, features and comments can be left in the issue queue.
- Incorporate history for: CMS, Web Metrics
- Remove older CSV file sheets
- Create Summary history for all sheets
This project is licensed under the GNU General Public License v3.0. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
This README file includes installation instructions, a brief overview of the script, the advantages of using the script, and the necessary setup and scheduling details.