Getting Started With the Prior Learning Data
This combination worksheet and mentor session activity is to
help everyone get started with the Prior Learning Data.
What are the prior learning survey questions?
- The prior learning survey can be found here.
- You should open this file and peruse it. Think about what questions
are interesting to you.
- Write down the question numbers that you want to access. Write down
the way the answers are recorded. In all cases except major, the answer is
a small integer. For example question 110 is gender, the answers
will be either 1=male or 2=female, other answers are possible (usually 99=other and 101=left it blank). For each question of interest make a record of what
legitimate answers could be.
What to download
Down load each of the following into your code directory on your H drive or
on your lap top.
- Down load the prior leaning stub program to get started.
- Be sure you have downloaded the newest versions of Excell.hs and the CSV.hs libraries into the same directory.
(Download them and just overwrite the old versions).
- You will also need to download the PriorLearn.hs library
Getting started in Hugs
- Open the stub program in your editor.
- Load the stub program into Hugs.
- It should look like this
Proccessing Prior Learning Data in Hugs
- The prior learning data is stored in a named declaration in the PriorLearn.hs
library named priorLearnData.
- Look at the first two elements of the list by typing: take 2 priorLearnData.
- It should look like this.
- Run an experiment. Use then length function to find out how many people
took the survey.
- In general we will access data by using comprehensions. Get the gender of all
students by typing:
[ gender110 x | x <- priorLearnData ] .
- There are lots of answers. So many that the results run off the screen.
Here is part of what appears on my screen.
Finding question labels
Writing a program in the stub file
- I have started to write a program in a stub file. Down load it
and load it into Hugs.
- What questions does this program deal with?
- What are the possible legal answers for each of the selector functions?
- Load it into hugs, and explore. What value does temp1 have?
- type temp2, what do you get? How can you interpret this data?
- temp3 illustrates a very important function mapGroup.
- mapGroup id when applied to a list of pairs, and groups all elements together
with the same first pair. Each group has the common first element, and a list of all the second elements.
Try it by inspecting temp3.
- Now try inspecting temp4, which is similar to temp3, except
it uses length on all the second elements. How can we interpret temp4?
- What is temp5?
- Can you use the function highschool to get an interesting answer?
- Can you write your own function to use with mapgroup?
-
Back to the Daily Record.
Back to the class web-page.