A toolkit for developing and deploying Python applications for the UC Athena project.
An environment which includes Python (version 2.6 recommended). Git is recommended for development.
git clone http://github.com/gittaylor/athenapy.git
cd athenapy
athenapy-run.py <function> <data dictionary file> <survey data file> <output file>
example:
athenapy-run.py convert conversion_HQS_SFMR.csv AthenaDataExport.csv AthenaDataExportSFMR.csv
Depending on your environment, you may have to explicitly call the Python executable
Windows
/c/Python26/python.exe athenapy-run.py convert conversion_HQS_SFMR.csv AthenaDataExport.csv AthenaDataExportSFMR.csv
Linux
python2.6 athenapy-run.py convert conversion_HQS_SFMR.csv AthenaDataExport.csv AthenaDataExportSFMR.csv
or (if your Linux system only has Python 2.6 installed)
python athenapy-run.py convert conversion_HQS_SFMR.csv AthenaDataExport.csv AthenaDataExportSFMR.csv
This call method will be used for the rest of the examples here.
Linux
python tests.py
If this returns
$ python tests.py
.
----------------------------------------------------------------------
Ran 1 test in 0.0XXs
OK
Then the unit test was successful.
python athenapy-run.py convert conversion_HQS_SFMR.csv testdata/AthenaDataExportTest.csv testdata/AthenaDataExportSFMR.csv
If you end up with a file in testdata called AthenaDataExportSFMR.csv
and it's in SFMR format, then this test was successful.
Log into your Athena Salesforce instance, and go to the Questionnaire Data Export page.
Choose Export Options: All Participant Data and Questionnaire Responses
Choose starting and ending dates (exports are limited to a certain number of surveys, so this may have to be a short period)
Leave all other defaults as they are (Local file name, Delimiter)
Click Export
You will be asked to save a file called AthenaDataExport.csv. Save it in the same location as you installed athenapy above.
Now try the following commands to convert the survey data
To SFMR format:
python athenapy-run.py convert conversion_HQS_SFMR.csv AthenaDataExport.csv AthenaDataExportSFMR.csv
To CDCG format:
python athenapy-run.py convert conversion_HQS_CDCG.csv AthenaDataExport.csv AthenaDataExportCDCG.csv