How To Edit and Create New Data Files
⚠️ Important: Do not open or edit CSV files using Excel before adding them to this repository. Excel can modify the file encoding and add extra characters that break Jekyll’s ability to process the data. Always use a text editor or the GitHub web interface to work with these files.
Contents
Data File Basics
All data files for the KPI dashboards are CSV (Comma-Separated Values) files located in the /kpidata/
directory. Each file should follow these conventions:
- First row contains column headers
- First column can be the date/time period or it can be blank
- Each metric should be in its own row
- Missing data should be left blank (not 0)
Example data structure:
,Spring 2020,Summer 2020,Fall 2020
Total Interactions,1183,291,978
In Person,324,0,7
IM,636,153,808
Email,109,124,140
Preparing Data from Excel
This is assuming your using the copy of record to replace data in the dashboard site.
Note: You can also use Google Sheets to create and edit data, and then just download the sheet as a CSV using the options via the File menu. If you’re having issues with the file breaking the repo (i.e. not allowing it to update or build), try using Google Sheets to get cleaner data.
Desktop Excel
- Open your Excel file
- Go to File → Save As
- Choose “CSV UTF-8 (Comma delimited) (*.csv)” as the file type
- Save the file
- Do not open the exported CSV file with Excel
- Rename the file to match the name of the file you’re replacing in the repository
- Follow the instructions below to replace the file in GitHub
Online Excel/SharePoint
- Open your Excel file in the browser
- Click File → Export → Download as CSV
- Do not open the downloaded CSV file with Excel
- Rename the downloaded file to match the name of the file you’re replacing in the repository
Note: The file name in the repository is case-sensitive. Make sure your new file’s name matches exactly.
Note: The file name in the repository is case-sensitive. Make sure your new file’s name matches exactly.
Working with GitHub
Replacing Files
- Navigate to the file you want to replace
- Click the three dots (…) menu
- Select “Delete file”
- Commit the deletion
- Return to the
/kpidata
folder - Ensure your new file is named the same as the previous file!!!
- Click “Add file” → “Upload files”
- Drag your new CSV file or choose it from your computer
- Add a commit message explaining the replacement
- Click “Commit changes”
Editing Existing Files
- Navigate to the
/kpidata
folder in the repository - Click on the CSV file you want to edit
- Click the pencil icon (Edit this file)
- Make your changes:
- Add new rows at the bottom
- Update existing values
- Ensure commas separate each value
- Add a commit message describing your changes
- Click “Commit changes”
Adding New Files
- Navigate to the
/kpidata
folder - Click “Add file” → “Create new file”
- Name your file with
.csv
extension (e.g.,new-metrics.csv
) - Add your CSV content:
,2023,2024 Gate Counts,1234,5678
- If you open a downloaded file, open it with a text editor
- Be sure not to have opened this CSV in Excel prior to adding it
- Copy the CSV text and paste it into the new file content
- Add a commit message describing the new file
- Click “Commit new file”
Working with Local Files
For more extensive updates or creating new files, you can use a text editor like VS Code:
- Clone the repository using GitHub Desktop or VS Code
- Create or edit CSV files in the
kpidata
folder - Commit and push your changes up to the GitHub repository
Remember to always pull the latest changes before editing and push your changes after updating files.