MBAC 611.  Within your private mbac611 folder create a lab5 folder.  Copy the Moodle file lab3_vars to your lab5 folder.  Start Mathematica  Enter.

Slides:



Advertisements
Similar presentations
Stored procedures and views You can see definitions for stored procedures and views in the demo databases but you can’t change them. For views, expand.
Advertisements

 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
CPIT 102 CPIT 102 CHAPTER 1 COLLABORATING on DOCUMENTS.
Tutorial 8: Developing an Excel Application
 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
Microsoft Word 2010 Lesson 1: Introduction to Word.
Customizing Reports. Custom Reports A report is a formatted hardcopy of the contents of one or more tables from a database. Although you can format and.
Introduction to Excel 2007 Part 2: Bar Graphs and Histograms February 5, 2008.
Section 2.3 Gauss-Jordan Method for General Systems of Equations
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
Creating And Maintaining A Database. 2 Learn the guidelines for designing databases When designing a database, first try to think of all the fields of.
Creating Web Page Forms
Introduction to Excel 2007 Part 3: Bar Graphs and Histograms Psych 209.
NU Data Excel Orientation Graphing of Screening Data and Basic Graphing Functions.
MBAC 611.  We have been using MS Access to query and modify our databases.  MS Access provides a GUI (Graphical User Interface) that hides much of the.
Adobe Forms THE FORM ELEMENT PANEL. Creating a form using the Adobe FormsCentral is a quick and easy way to distribute a variety of forms including surveys.
Animated Charting Using the Alice Bar Chart Template World By Elizabeth Liang under the direction of Professor Susan Rodger Duke University December 2010.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Lab 8 – C# Programming Adding two numbers CSCI 6303 – Principles of I.T. Dr. Abraham Fall 2012.
JQuery Page Slider. Our goal is to get to the functionality of the Panic Coda web site.Panic Coda web site.
MBAC 611.  Click on the My Computer Icon  Open your private network directory  Create a new folder named lab7  Copy your lab6 Access file to the lab7.
Microsoft Office 2003 Illustrated Introductory with Programs, Files, and Folders Working.
by Chris Brown under Prof. Susan Rodger Duke University June 2012
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Lab 9 – User Forms Design. User Forms What are user forms? –Known as dialog boxes –Major ways for getting user input An example of using user forms: Monthly.
PowerPoint. Basic Vocabulary Slide - Presentation - Slide layout – ► ► ► ► a single page in PowerPoint all the slides for a speech all the slides for.
Chapter Seven: Presentation Software (MS PowerPoint 2007) Author(s): Ahmed Dalalah, Ahmed Abusalameh, Mohammad AlZoubi & Khaled Dajani (Prepared By: Ahmed.
Microsoft PowerPoint Getting Started Guide Prepared for Towson University Dr. Jeff M. Kenton Amy Chase Martin 2007.
PowerPoint 1 The Basics 1. Save this file to your Apps Folder as YourLastName_PP1 2. Read each slide. 3. Complete each set of numbered directions.
When you start Photo Story the title screen gives you three options. The following slides will illustrate the directions when “Begin a new story” has been.
PowerPoint Tutorial. Basic Vocabulary ► Slide - Presentation - Slide layout – ► ► ► a single page in PowerPoint all the slides for a speech all the slides.
Adding User Interactivity – Lesson 51 Adding User Interactivity Lesson 5.
To make a graph in Excel, first you have to highlight the data you want to graph. To do this, click and drag over the “blocks” you need. Be sure to include.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
Windows Tutorial Common Objects ACOS: 1, 4. Using the Taskbar 1. Using the taskbar, you can switch between open programs and between open documents within.
XP New Perspectives on Microsoft Access 2002 Tutorial 21 Microsoft Access Tutorial 2 – Creating And Maintaining A Database.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
Photo Story 3 Importing Pictures. When you create a new Photo Story, the first thing that you will do is import pictures. You can import pictures from.
1 Advanced Topics in Access How to create forms and reports Andrew Yu 03/04/2002.
Name : Tatiana “Tania” Harrison Office : 216 Phone number: CWU page: Syllabus Name :
Downloading and Installing Autodesk Revit 2016
COMPREHENSIVE Access Tutorial 6 Using Form Tools and Creating Custom Forms.
1 NORMA Lab. 7 Generating Reports More Display Options File: NORMA_Lab6.ppt. Author: T. Halpin. Last updated: 2009 June 9.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
Basic Editing Lesson 2.
Basic Computer and Word Functions, part 1 Read the information and use to answer the questions in the Basic Computer and Word Functions Study Guide.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Downloading and Installing Autodesk Inventor Professional 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the.
Microsoft Access 4 Database Creation and Management.
How to Create a PowerPoint Presentation Mrs. Leah Craft University of Mississippi NMGK-8.
JDS5 Training Guide. On Start Up you will see this screen click the OK button Click OK.
Intermacs Form Download Excel Tutorial Pivot Tables, Graphic Tools, Macros By: Devin Koehl.
Windows 2000 Unit A A1 – A24 and Ap1 – Ap3 (Formatting a Disk)
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 4 Designing the Inventory Application Introducing TextBox es and Button s.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 3 Building an Application in the Visual Basic.NET Environment.
1 Project 2: Using Variables and Expressions. 222 Project 2 Overview For this project you will work with three programs Circle Paint Ideal_Weight What.
Access Module Implementing a Database with Microsoft Access A Great Module on Your CD.
VB.NET and Databases. ADO.NET VB.Net allows you many ways to connect to a database. The technology used to interact with a database or data source is.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 6 Looping and Multiple Forms.
 You won’t write a single line of program code.  Instead, you’ll use visual programming techniques.  Visual Studio processes your actions (such as mouse.
PowerPoint Tutorial.
Tutorial for using Case It for bioinformatics analyses
© Paradigm Publishing, Inc.
MODULE 7 Microsoft Access 2010
Using Layers in Photoshop Elements 8
Microsoft Office Access 2003
Introduction to Excel 2007 Part 3: Bar Graphs and Histograms
Presentation transcript:

MBAC 611

 Within your private mbac611 folder create a lab5 folder.  Copy the Moodle file lab3_vars to your lab5 folder.  Start Mathematica  Enter SetDirectory[“h:mbac611/lab5”] into the Mathematica notebook and press the evaluation key.

 In an earlier lab we saved the fares, header and fieldTotal variables values to disk so that they could be used in this lab.  To restore these values enter the following expression into the Notebook: <<lab3_vars

 It would be nice to visualize some of the data.  One of the most basic forms of visualization is the bar chart. It is created using the BarChart function.  Enter the following expression: BarChart[fieldTotal]

The following output should appear: Note that, in the Notebook, you can move your mouse over each bar to discover the number the bar represents. This is not a particularly useful bar chart. In fact, we have attempted to graph too much data. We included the first two fields of fieldTotal which were intentionally left zero. Also we included the last field (26 th ) of fieldTotal which includes the total of all metrocard use. Also we don’t know what have any labels on the x-axis so it is not possible to easily identify what stations the bars correspond to.

In our next bar chart we will only graph elements 3 through 25 of the fieldTotal list. This way we will only be graphing unique metrocard totals. Enter the following expression into the Notebook: BarChart[fieldTotal[[3;;25]],ChartLabels->header[[3;;25]]] You should see the following output: This graph is only slightly better – it graphs the correct data but the axis is unreadable because the metrocard type names are running into eachother.

Select elements 3 through 25 of the fieldTotal list. ChartLabels is an option of the BarChart function that allows you to label the elements of the chart. This symbol is the Mathematica transformation symbol. It is formed by typing the characters -> without an intervening space. It essentially used to temporarily make an assignment. In this case we are temporarily assigning to ChartLabels. We are assigning the 3 rd through 25 th header list elements to ChartLabels.

 We can fix the readability of the bar graph by adding the BarOrigin option.  Enter the following expression: BarChart[fieldTotal[[3;;25]],ChartLabels->header[[3;;25]], BarOrigin->Left] The BarOrigin option allows you to specify the origin of the bars. Other possible BarOrigin assignments include Right, Top and Bottom.

The following output should appear: This looks better. We can even improve on it by enlarging the graph. To enlarge the graph simply click once on the graph and then click and hold the mouse button down on one of the resize boxes. Then move the mouse. Try enlarging the graph using the bottom resize box on the right-hand side.

This graph is much clearer. We can see that Full Fare (FF) metrocards are the most popular, with 30-Day-Unlimited (30-D UNL) and 7-Day- Unlimited (7-D UNL) coming in second and third.

 Mathematica has many additional options that can be added to the BarChart function.  From the Lab5 Moodle folder download the metrocard.jpg image and place a copy in your private mbac611/lab5 folder.  Enter the following expression: metroCardImage=Import["metrocard.jpg"]

Enter the following expression: BarChart[fieldTotal[[3;;25]],ChartLabels->header[[3;;25]], BarOrigin->Left, ChartElements->metroCardImage] Note the additional option (ChartElements). You should see the following output:

 Create a bar chart based on the first (1 st ) station (record) in the fares list. Remember that the station metrocard data is in fields 3-25 (Hint: fares[[1,3;;25]])  The labels for the bar chart are the same as our previous chart  Set the BarOrigin option should to Left.  Add a chart title by adding the PlotLabel option. PlotLabel should be assigned the second (2 nd ) element in the first (1 st )record – the station name is stored there.  It is not necessary to use the metrocard image for the bars, but are free to use it if you wish.

The output should appear as follows (note the station name):

 We can view the bar charts for each station by executing the BarChart function on every member of the fares list.  However, a much better way of viewing the charts is to use the Manipulate function.  The Manipulate function allows us to change arguments to functions graphically, using a sliding bar.

Enter the following expression: Manipulate[BarChart[fares[[n,3;;25]], ChartLabels->header[[3;;25]], BarOrigin->Left, PlotLabel->fares[[n,2]]], {n,1,Length[fares]}] The following output should appear: Note the slider. Click and hold the mouse button on the slider. Then move the slider to the right. The station bar charts will change. Note that you can still resize the chart if it is too small.

Click on the expand box at the end of the slider.

Click once on the button. Notice that the value in the textbox jumps from 1 to 20. It appears that Mathematica is jumping to the next multiple of 20 every time we click the button. A similar action happens when we click the button, but the number decreases in multiples of 20.

Manipulate[ BarChart[ fares[[n,3;;25]], ChartLabels->header[[3;;25]], BarOrigin->Left, PlotLabel->fares[[n,2]] ], {n,1,Length[fares]} ] Lets take a closer look at the function code. Note that spaces between arguments, options or functions are ignored by Mathematica so it is fine to add space for clarity. The first argument of the Manipulate function is the function we are going to visualize. In this case it is the BarChart function. Note that value we are going to be changing with the slider is replaced with the variable n. The second argument is the iterator. This is very similar to the iterator that appeared in the Do function. The variable n should, depending on the slider, take on values between 1 and the length of the fares list – which is the number of stations (465).

 We can fix the button increment and decrement problem by telling the Manipulate function to change the value of n by 1. This is done by adding an increment value (one in this case) as the fourth member of the iterator - {n,1,Length[fares],1}  Notice that our variable (n) appears next to the slider. This indicates that the user is controlling this variable with the slider. However, n is not particularly meaningful. Change the variable from n to station. Remember, if you change it in the iterator you also need to change it in the BarChart function call.  Make the two changes described above and execute the Manipulate function call again.

Your output should look similar to the following: Note the variable name n has been replaced by the variable name station. When you press the and buttons the increment and decrement step should now be 1.

 Save a copy of your notebook in your lab5 folder.  Submit the notebook file to Moodle.