Automated import of data from Google Sheets to CSV files for Pteridophyte Phylogeny Group (PPG).
This repository automatically imports data from a public Google Spreadsheet and stores it as CSV files. The import runs daily and can also be triggered manually.
You can find the data files here:
curators.csv: List of curator names and ORCID iDsgenera.csv: List of fern and lycophyte genera and their curators
For more information about Curators in PPG, see the Curator's Guide
- Google Spreadsheet: View Spreadsheet
- Import Frequency: Daily at 2 AM UTC (automatic)
- Manual Trigger: Available via GitHub Actions
.
├── data/ # CSV files exported from Google Sheets
├── scripts/ # R scripts for data import
│ └── import_sheets.R # Main import script
└── .github/
└── workflows/
└── import-sheets.yml # GitHub Actions workflow
To manually trigger an import:
- Go to the Actions tab
- Select "Import Google Sheets Data" workflow
- Click "Run workflow"
- Click the green "Run workflow" button
- R (version 4.0 or higher)
- R packages:
googlesheets4,readr
# Install required packages (first time only)
Rscript -e 'install.packages(c("googlesheets4", "readr"))'
# Run the import script
Rscript scripts/import_sheets.RThe script will:
- Connect to the Google Spreadsheet (no authentication needed for public sheets)
- Read all sheets
- Export each sheet as a CSV file in the
data/directory
- GitHub Actions workflow runs on a schedule (daily) or manual trigger
- R script uses
googlesheets4package to read the public spreadsheet - Each sheet is exported as a separate CSV file
- Changes are automatically committed to the repository
- If no changes are detected, no commit is made
- The spreadsheet is public, so no authentication credentials are needed
- CSV files are tracked in git and will show in commit history
- The workflow only commits when data actually changes
- Created with help from Claude Sonnet 4.5 in VSCode