And here is the data set for the assignment (Groceries.csv).
This assignment is due by Wednesday, December 13, 2017 at 11:59 pm!
For this assignment, you’ll need to modify the R script you used in ICA #12.2 (aRules.r). To do this, you should finish the related in-class activity first (ICA #12.2- Association Rule Mining Using R).
Here is the data file you’ll need: Jeans.csv. (Right click to download the file. Make sure that the name doesn’t change)
This assignment is due Wednesday, December 6, 2017 at 11:59 pm.
For this assignment you’ll need to modify the R script you used in In-Class Exercise #11 (Clustering.R). To do this, you should finish the related in-class exercise first (ICA #11 – Clustering Using R).
Here is the data file you’ll need BankLoan.csv. (Right click to download the file. Make sure that the name doesn’t change)
This assignment is due Monday, November 27, 2017 at 11:59 pm.
For this assignment, you’ll need to modify the R script you used in ICA #10 (dTree.r). To do this, you should finish the related in-class exercise first (ICA #10 – Decision Trees in R).
Dear R experts,
While working on Assignment #5, you may experience errors. In order to at least run the script without error messages, you often have to “debug” to fix the errors.
Here is a list of things you can check:
1. Error Message. If you get an error message like this:
Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file 'OnTimeAirport-Jan14.csv': No such file or directory
ask yourself the following questions:
- Did you have all the files (both Descriptives.r file and OnTimeAirport-Jan14.csv file) in the same directory/folder?
- Are the file names correct? Sometimes when you download the file to your disk multiple times, the system automatically rename the files (like OnTimeAirport-Jan14(1).csv). If this is the case, you have to change the name back.
- Did you set the working directory to source file location? (How to do that? Read instructions on ICA #9)
2. Changing Variable Values. Under the VARIABLES section, did you change the following variable values accordingly for the new dataset?
3. Package Installation. Were you able to install the “psych” package?
If not, check the solutions here: Problems Installing Packages?
4. Modifying R Script. In the original Descriptives.r file, our analysis was based on the NBA data. Specifically, we looked at two columns, dataSet$Salary and dataSet$Position. For the assignment, because we are using a different dataset called OnTimeAirport-Jan14.csv, you need to make the following changes accordingly:
- Do a thorough search of your r script and make sure that you changed all places with dataSet$Salary and dataSet$Position to the new columns we are interested in in the new dataset.
- Make sure that you changed line 87:
subset <- dataSet[ which(dataSet$Position=='PG' | dataSet$Position=='SF'), ];
subset <- dataSet[ which(dataSet$Origin=='PHL' | dataSet$Originn=='PIT'), ];
The reason is that now we are interested in looking at Philadelphia and Pittsburgh as origin airports (as asked in Question 5 of the answer sheet).
- Make sure that “dataSet” has the right cases (i.e., the letter “S” should be in upper case). This is because R is case-sensitive.
If you have everything listed above checked, you should be able to at least complete the first six steps on the assignment.
5. Adding More Commands. To complete Steps 7-9, you should add a few more lines in between the t.test() and the sink() functions. More specifically, I recommend you to add lines right before the following line (line 95 of the original Descriptives.r file).
# This stops R from writing any more to the text output file.
That’s all I can think of so far. Good luck!
Assignment #5 – Introduction to Working with R and RStudio (Due Monday, November 13, 2017 at 11:59 pm)
Here is the data file you’ll need OnTimeAirport-Jan14.csv. (Right click to download the file. Make sure that the name doesn’t change.)
This assignment is due Monday, November 13, 2017 at 11:59 pm.
For this assignment, you’ll need to modify the R script you used in ICA #9 (Descriptives.r). To do this, you should finish the related in-class exercise first.
I got quite some questions related to Part 4, Question (b) of Assignment #4, which asks you to create a pivot table first, and then use the excel AVERAGE function in a separate cell outside the pivot table.
Here is an example of what I mean by “use the Excel AVERAGE function to average those values … in a separate cell outside the Pivot Table.”
Link: Hint for HW4 – Part4Qb
Let me know if you have any questions.
Here is the assignment: Assignment #4 – ETL and Pivot Tables in Excel
And here is the Excel workbook you’ll need to complete the assignment: ETL Workbook.xlsx
This assignment is due by Wednesday, 10/25, 11:59 pm.
- To complete the assignment, you need to review the Excel basics (supplementary material for Module #7 – ETL) on your own if you are not familiar with Excel functions such as CONCATENATE and VLOOKUP.
- We will cover Pivot Tables through an ICA on Friday (10/20).
Here are the assignment instructions: Group Project – Data Visualization [f17].
The group project (for the course) is due October 31, at 11:59 pm.
- You can work in teams of up to four people.
- For each group, please email me the names and AccessNet IDs (i.e., tuz12345) of all group members by October 20 before noon. (This way I can enter the groups in Blackboard in advance.)
The group project is based on the Temple Analytics Challenge, a University-wide data analysis and visualization competition.
- You should enter the challenge as well – to get the extra credit, professional achievement points and a chance to win up to $2500.
- To enter the challenge, you must submit your entry, also by October 31, at 11:59 PM.
1. To start Assignment 3, you need to complete ICA #6 first. Want to check if you did ICA #6 correctly? Take a look at the solution key that I posted under Course Materials. If you had any mistake in your solution, follow these steps:
- In MySQL Workbench, delete your Company table;
- Copy and paste the statements from the file “ICA #6 SQL statements” to your MySQL Workbench;
- Replace the schema names “mxxws” with your schema name (mxx should be your MySQL username);
- Run all the statements. Make sure you did not get any error message;
- If everything works, you can start Assignment 3 now.
2. BOOLEAN data type. In the Contact table, the field IsMain has a BOOLEAN data type. If you do not know how to handle BOOLEAN data type, here is short tutorial that might help: More on MySQL BOOLEAN Data Type