-
Notifications
You must be signed in to change notification settings - Fork 53
QexEdit
The Q-Expander is a bot that will explain what each letter of a GSA organization code is. By iterating over each letter and looking up what it represents, it can tell you what department and office any employee of GSA is located in.
(Why the Q? Codes within TTS all start with Q, and the bot started with that. Eventually a list was found with every organization within the GSA and it was added.)
The list of org codes that GSA has is published on GSA's D2D, a "a data analytics portal that is used to share business insights, including visualizations, reports and datasets." Every month they upload a new copy of the GSA org codes as an Excel spreadsheet on the same page. Presently there seems to be no way to easily automate taking data from this page into Charlie.
(@geekygirlsarah has reached out to the person that publishes it but has not heard back yet.)
- Head to https://d2d.gsa.gov/dataset/gsa-organization
- If you haven't made an account, do that. Otherwise, login.
- Download the spreadsheet at the bottom of the page.
- Upload the spreadsheet to your Google Drive (or open Excel if you happen to have it).
- Don't forget to branch off of
main
to start your work! - Highlight the two relevant columns of the spreadsheet, which should be labeled like
Department ID
andDepartment Description
. Press Cmd+C/Ctrl+C, and paste into Visual Studio Code. - In VS Code, press Cmd+F/Ctrl+F to bring up the find box. Click on the
.*
icon to enable RegEx search mode, and click the arrow that's pointing right to expand the box to include the Replace box. - Search for
\t
and replace with,"
, then click the Replace All button. (This replaces all tabs with a comma and quote.) - Search for
$
and replace with"
, then click the Replace All button. (This finds the end of every line and adds in a quote.) - Remove the header line (if you pasted it in).
- Go into
/config/q-expand.csv
and remove all lines that exist (aside from the header on line 1) and paste your modified org code lines. - A git diff should show you any changes you've made.
- This is where some self-descretion comes in. GSA tends to label a lot of units numerically (i.e. "Unit 1", "Unit 2", etc.) where TTS might label groups with specific names, products, cohorts, etc. If the code starts with a Q, you may wish to update it to reflect our internal descriptions of the group.
- Save, commit, push, PR!
Charlie developer documentation