R and Python Programing

Checkout my Github Repositories:

Java Application User Interface

The Dictation Tutor application was a group project for a software engineering class. Our team’s goal was to create and deliver a java application to enable English language learners to practice writing from oral prompts in preparation for the written portion of the citizenship test.

My Role

My contribution as a team member was to code the user interface using Java Swing and NetBeans. The following image is the startup screen, which illustrates the three ways students can use the software to practice: Guided Practice, Practice Test, and Simulated Test.

The Written Citizenship Test

The written citizenship writing test is comprised of three sections: writing vocabulary words after hearing the word spoken, writing the words in a scrambled sentence in the correct order after hearing the correct order of the words, and writing the answer to a written question after hearing the answer spoken.

The Guided Practice section allows students to hear and practice typing vocabulary words and sentences where they can see the correct answer if they need to. The Practice Test section allows students to practice one portion of the test at a time with no limit on the number of words/questions. The Simulated Test section simulates the actual test by choosing a preselected number of random words/sentences from each section. This section also uses an edit distance algorithm to provide instant feedback on the screen and documented feedback in the form of a downloadable spreadsheet.

VBA with Excel

This Visual Basic subroutine in Excel extracts data, computes new variables, and creates and formats summary files. The subroutine accesses the Source file displayed on the right, performs calculations across specific columns and rows, and generates two new files: Calculated Values and Formatted Summary.

Source File
Source Data

The Calculated Values file shown to the right contains the new calculated values that were performed on each data column or row in the source file. The image  illustrates the column-level results after performing calculations on individual column data in the source file.

Calculated Values File
Calculated Data

The Formatted Summary file shown to the right contains summary calculations by item and subgroup. The image illustrates the resulting summary file after performing the calculations across columns in the source file and after formatting the data.

Formatted Summary File
Report Summary Data using VBA in Excel

This Visual Basic subroutine in Excel extracts data, reorganizes and sorts the data, and creates and formats bar graphs. The subroutine accesses six Source files, each with several tabs of formatted subgroup data. One tab of formatted subgroup data is displayed on the right.

Source File
Report Summary Data using VBA in Excel

The subroutine extracts and reorganizes the source data by item and sorts the data in ascending order by metric, as shown in the Data Tab to the right. The image illustrates two of the five calculations on one of the data tabs.

Data Tab
Data Organized for Charts

The subroutine then creates and formats several bar graphs to illustrate how the subgroups compare for each item, as shown in Bar Graph to the right. The subroutine extracts all data and creates and formats the bar graphs, which makes data preparation and presentation of 126 graphs more efficient and less prone to errors.

Bar Graph
Graph of Data using VBA in Excel
SAS Stack Macro

During an internship, I created a generalized SAS macro that automatically converts a longitudinal dataset into a vertical dataset. I created two versions of the stack macro, one for a dataset with a single key and one for a dataset with a two-component key. The macros are completely generalized and require three parameters: the name of the dataset to be converted, the key(s) for that dataset, and the name of the new key for the transformed dataset. The macros also accept a list of variables to copy to the new dataset that would be lost in the transformation.

Vertical Data

The following process describes the version that handles a two-component key.

The image to the right is the longitudinal dataset with two-component key: Brand and Store. The main metric variable is price, which is represented by hyphens in the week columns. This dataset also contains three variables that will need to be carried over from the original dataset to the vertical dataset: State, selected, and category.

Horizontal Data

Step 1: The first step in converting to a vertical format is to create new key variables.

When the dataset is transposed on the two fields that make up the key, the values contained in those fields will be concatentated to create a new variable. However, these fields may not contain SAS-compliant names. Though there are ways to handle non-SAS-compliant variable names that result from a transpose, I did not find a way to do this within a general program that needed to work with any dataset. Therefore, I created a dataset (right) to hold each new key component. The macro creates the new keys as numbered pairs to identify variable and row combinations as shown. The underscore allows for splitting the variable name later to incorporate the original component key values back into the dataset.

Step 2: Once the new keys are created, the macro creates a lookup table (right) to hold the original key components and any variables that would be lost in the transpose.

Lookup Table

Step 3: With SAS-compliant keys in place, the macro transposes the dataset on the new keys.

The macro then combines the date with each new variable to create multiple datasets to stack on top of each other. The lookup table is combined with the final vertical data and the temporary keys are deleted. The final dataset is displayed to the right.

Vertical Data