Wednesday, December 24, 2008

Adding up prices on a web page.

Task: total prices of a web page list.
Goal: to price the cost of owning every O'Reilly pocket reference and guide.
Software needed:
A web browser
A spreadsheet
R software
a text editor.

Find a well formated web price list such as
http://oreilly.com/store/series/pocketrefs.csp

Step 1: Web browser
Highlight the beginning of the price list (i.e. highlight the beginning of the first item/record on the web page). Scroll to the end of the list or web page. Hold your shift key down and click just after the last item/record. Now copy this highlighted list. You should have all the items highlighted

Step 2 Spreadsheet
Paste this in to an empty spreadsheet. Examine this and see if prices are on one row alone. It does not matter if there are dollar signs with the prices in the cells or also in this case a currency symbol USD. But here we find in the spreadsheet a price such as "$9.99 USD" occurring in every eighth row. The Prices should be in cells by themselves. But there is all the other stuff like the title and the blurb which here we want to parse out.

Step 3 Spreadsheet
Save the spreadsheet as a CSV file comma separated file. Remember the name and directory for the first line of R code below in the next step.

Step 4: R software ( www.r-project.org), text editor
Copy and paste the code below into a text editor
Change the directory and file name to your file and directory name from step 3 in the first and and the directory in the last line of this code. On the last line chose a file name.
Change the line jump <-(seq(x,y,z)
so that x is the first row a price occurs and y the last row a price occurs and
z is the number of rows between each price.

You can also change jump(x,y,z) to parse out all the titles or all the blurbs or all the dates published.


After editing copy the code into the R command line a line at a time
the # lines are comments


Use R software and run this code on the R command line after editing it in the text editor. Stop after each line that begins with # to check the results. good luck and use R help if needed.

###################Code Starts here##################
OPocket <-read.csv(file="/Users/ptimusk/documents/school/books/OReillyPocket08-12-24.csv", header= FALSE)
# read into R and the variable OPocket the csv file created by Excel save as csv.
#change "Users/ptimusk/documents/school/books/...to your directory
# and file name OReillyPocket08-12-24.csv

OPocket
#check variable for rows that contain prices. Every foth row starting at 4 ending at 394
#
jump <- seq(4, 394, 5)
# create an index of rows where prices occur. Start with row 4. End with row 394
#Count by 5 rows

OPocket.Prices <- as.vector (OPocket[jump,1])
#take only the rows(indexed by "jump") with prices out of the variable OPocket

OPocket.Prices
# check to see above variable contains quoted prices in 79 rows

write.csv(OPocket.Prices,file="/Users/ptimusk/documents/school/books/OPocketPrices08-12-24.csv")
#write the prices to a csv text file

###############Code ends here######################

Step 5 text editor
Open with the text editor the file you just wrote on the last line of R code
Save as txt

Step 6 Spreadsheet

With the spreadsheet and a new empty spreadsheet open the txt file you just saved. That should be the text file with the Prices. This file should have the variable OPocket.Prices as an R format variable.

The spreadsheet should take you through some import steps where
you can adjust the separator characters to parse out the prices only without the $
and without the currency symbol. You also parse out the first line and the quotes.

Sum the prices column
Your done!
Answer: all the O'Reilly pocket references and guides will cost 851.69 $ for the 79 books.

Our term project passed and it looks like I passed simulations and modeling.

Our term project got a great mark. I did not do so well on the exam. But it looks like I have passed the simulations and modeling course.

Saturday, December 20, 2008

Studying Internet topics and SAS this weekend.

I am studying SAS and Internet policy material this weekend. I also hope to study some code from my new O'Reilly pocket guides.

Its official Dr. Iluju Kiringa to supervise my masters of science thesis

When I was young and a Fortran programmer I looked up to the graduate students I worked with. They were studying for their masters of science. I aimed to get this degree for many years. Now my chance to study for this is upon me. Dr. Iluju Kiringa has agreed to supervise my thesis. I think I will be studying in the data discovery field.

Wednesday, December 17, 2008

I am coauthor of a paper on retirement education.

I have completed at work some research on retirement education in Canada. I used the Internet to search for courses and other support information for persons to plan for their retirement. A paper summarizing the amount of this education available was then written. The paper's purpose was to suggest a survey to find out more accurately and with more confidence the amount, accessibility and availability of retirement education. The paper was presented at the Policy Research Initiative conference last week. This is a government agency conference. Their web site is here http://www.policyresearch.gc.ca/.

I am studying Perl but with full time work I do not study as much as in the past.

I no longer find a lot of time to study outside of work. At work I read many studies. I am involved in writing research papers at work. I am thinking of starting some research projects on my own again. I might try to write two papers this year. I should try to search out some calls for papers but often I find these coming in in my email subscriptions to email lists.

Tuesday, December 16, 2008

I am checking to make sure I have a supervisor for my thesis now.

My chance of being supervised by John Nash at the university of Ottawa fell through. I am checking with Professor Iluju Kiringa to see if he can still supervise at this point. He had me reading a book on knowledge representation this fall in preparation for my thesis. Here is Iluju Kiringa's web page http://www.site.uottawa.ca/~kiringa/.

Saturday, December 13, 2008

Our term project was submitted yesterday.

I submitted our term project yesterday. It was interesting to see some of the other term project members learning statistics. One member did a lot of work. I did not manage to learn much Java programming but I did learn some.

Tuesday, December 09, 2008

Completion of course requirements for Graduate Certificate in Systems Sciences.

After today's exam I will have completed the course requirements for a graduate certificate in systems sciences. Next term, I may be allowed to start a thesis in systems sciences for completion of a masters of science an M.Sc..

I have my notes organized and I am just printing the last lectures slides.

It is down to crunch time but I have made steady progress studying. I will review a few calculations and my hand written lecture notes this morning before the exam.

I am excited to be starting some new work at work on Wednesday.

Monday, December 08, 2008

I am reviewing chapter 2 now in the text book.

I started to review chapter 2 in my course textbook. This chapter outlines the basic in this simulations and modeling approach.

I have found out my mistake that our instructor is not actually a full professor. He is still studying for his PhD.

Wednesday, December 03, 2008

I am now babtised in the use of Excel for statistical analysis.

I never do like to use Excel for statistics because I can use much more powerful tools like SAS and R. Also I have been taught to prefer R and SAS because apparently they are more professional. In fact, I have also been taught to do analysis by hand because that gives the least black box approach. At any rate my present professor uses Excel to do the analysis of simulations so I used Excel.

I have two versions of the experiment and I had our programmers run it 10,000 times thus simulating a restaurant being open 10,000 days. I used Excel formulas to calculate averages, standard deviations and confidence intervals. I divided the confidence interval by 2 to give a half interval. I then did this for the first ten runs, the first 100 runs, the first 1000 runs and finally the whole 10,000 runs.

Then using Excel I made some tables to hold the results and copied and pasted these into Word. I used two fonts the standard Excel Mac X version default font for most of the work and then tried American Typewriter for the headings. I am learning typesetting for tables and charts at work in my development assignment. My development assignment is ending this week. It actually ends next Tuesday but I took Monday and Tuesday off work to write my final exam.

So I have now used Excel to do a simple statistical analysis for our term project. I should now move on to writing this up and getting ready to submit the final step of the project. The good thing now is the professor was very positive about our step three submission and step four is statistics which is what I have studied the most courses in so this step has a lot going in my favour.

Monday, December 01, 2008

We had our exam review class tonight. It was relaxing and intellectually stimulating

I attend the exam review meaning I have attended all classes this term. I should do alright on the exam. I know the material now.

I am starting work in the Internet Society section of Statistics Canada on December 10th.

I was able to land a clerical job with the Internet Society section at my workplace Statistics Canada. I will be part of a research team researching Internet use both by households and by business. So there are the Household Internet Use survey and the E-commerce survey. I will be working in technical support and as a research assistant.

Sunday, November 30, 2008

Exam study begins: Reading chapter 3 in course textbook. Progress report.

I have carefully read sections 3.1 and 3.2 in our course textbook. In section 3.3 I have read up to section 3.3.2.2. There are still the remaining sections of section 3.3 to read. Then section 3.4 and then I need to read and look up the references in section 3.5. I hope to do this tonight and early Monday morning read chapter 4. This is all to prepare for our exam review class tomorrow on Monday afternoon. I have studied for one hour of the eight hours planned

Our term project is good at the third step. I am planning eight hours study over night now.

I am getting ready for eight hours study over night now for my SYS5110 exam. Tomorrow is our exam review class.

Our project has been marked for the third phase. We did good work on it.

Wednesday, November 26, 2008

I finished reading The Making of Second Life by James Wagner Au.

I finished reading The Making of Second Life by James Wagner Au. His writing is entertaining but laden with American military culture and military buzz words. This amounts to a light reading business behind the scenes look at Linden Labs and some briefly sketched Second Life events. We find out in the book that the usual Internet capitalists like Bezos and libertarian capitalists like Kapour are investors in Second Life. I think it awful that computer science which was once upon a time for me a school subject related to math and language is so money oriented. I really need to sit back and think more about all this reading about the net and whether I really want to continue to expose myself to this set of libertarian values again and again.

Our term project is coming along on time.

We submitted our project step 3 on time. The two programmers did almost all the work on this phase of the project. I did some minor documentation and did the submission from my eMac. Our next submission deadline for the full and final project is in two weeks. We have one more class and then we have an exam the week after. I am taking time off work that day to write the exam. The day after the exam I start work in the Internet Society section of my workplace Statistics Canada.

I am installing a one year one time install version of ESRI's ArcGIS 9.2 student version on the new PC crystal 89.

I was surfing the school's web pages for computer services for students. I was trying to find a copy of Symantic anti virus software. I did download the school provided Windows version of Symantic anti virus software but it is 32 bit and will not work on the new PC. But while exploring software available for students I noticed that the license for ArcView has changed at school and we are now allowed to use the software at home. I was taking a break from work and decided that in my travels on the buses yesterday to go to school and get a copy of ArcView which is now in version 9.2. I had trained in version 3.2 in 2000 at Carleton at the geography department there where I have done many years of part time studies. I have also done an analysis of a conference paper about GIS last winter 2008 as a school term project. I have also read an introduction to ESRI GIS database use this past summer by borrowing a book from my workplace library. I was studying for a job competition but did not get very far with that application so stopped reading the book. So at the moment I am installing ArcView 9.2 with the intent of continuing a project from 2000.

At the moment I have installed the software and plan to open my old term project from the course I took in 2000. Then, by accessing recent census data I will update the ArcView project. I had used spreadsheets containing census 1996 data, entered into Excel from Zypher at the Ottawa Carleton Social Planning Council. There I had been paid to enter the data. I am a proud supporter of the Ottawa Carleton Social Planning Council and give them money every pay cheque through charitable donations. This is my present and first project for ArcView 9.2. I then may also attempt to open GIS files provided by Statistics Canada and Elections Canada, two of the workplaces I have worked.

I did not succeed right away with the new software. I was able too import my project file but could not get a map to appear. I am up over night and do not want to spend my time on a desktop computer working out this problem as I had planned to read books. So I am stopping now with the software successfully installed and registered.

Wednesday, November 19, 2008

I submitted an assignment but did not run the code.

This is a very worrisome course this term with both ODE's and JAVA programming. I hope I manage to do well with this course.