Skip to content

Lesson 22: Changing Orientation

Lesson 22: Changing Format

Objective:

Students will learn how to convert XML files to the more familiar data table format and vice versa.

Materials:

  1. There and Back Again: From XML to Data Tables handout (LMR_3.21_From XML to Data Tables)

  2. There and Back Again: From Data Tables to XML handout (LMR_3.22_From Data Tables to XML)

Essential Concepts:

Essential Concepts:

Converting XML to spreadsheet format helps us better understand and view our data.

Lesson:

  1. Take a few minutes to compare the structure of XML code to HTML data tables (refer to Step 7 from Lesson 21).

  2. Inform students that in today’s lesson, they will learn how to translate information from XML code into a data table.

  3. Distribute the There and Back Again: From XML to Data Tables handout (LMR_3.21) to students.

  4. Inform the students that XML code is provided on page 1 of the handout, and their goal is to transfer all the information to the empty data table.

  5. As a guide, ask a volunteer to find and name one of the variables in the XML code and then have all the students write the name of the variable in the first column of the top row in the data table.

  6. Next, ask another student to find the first value of the variable named in Step 5. This value should be placed in the correct column and row of the data table.

  7. Provide time for students to complete the handout individually.

  8. Using the Anonymous Author strategy, share a couple of the completed data tables. Ask teams to discuss how they are alike and how they are different.

    Note: Most tables will probably be the same, but could vary slightly based on which columns each variable name was placed in, and in what order the observations were listed in the rows. Ultimately, the information contained in the data tables is the same.

  9. Then, conduct a whole class discussion regarding student responses to the questions on page 2 of the handout.

  10. Distribute the There and Back Again: From Data Tables to XML (LMR_3.22) to student teams and allow them time to complete it.

  11. Once teams have finished, teams will guide you to write the correct XML code.

  12. Using a Whip Around, teams will tell you the first line of the XML code you need to write. Teams waiting their turn will check if the team is guiding you correctly. If not, they need to stop you and propose their line of code. You may not continue writing the lines of code until all teams are in agreement.

Class Scribes:

One team of students will give a brief talk to discuss what they think the 3 most important topics of the day were.

Homework & Next Day

Students will continue to collect data using the class’s Participatory Sensing campaign (see Lessons 17- 19). They will analyze the data the next day during the practicum.