R
Ray K
I have a set of data representing the average price of houses for sale
in the San Francisco area on each day from early 2006 to the present.
(That's 1800+ dates.) The format of the data is as follows:
YYYY*MM*DD*PPPPPP*YYYY*MM*DD*PPPPPP*YYYY*MM*DD*PPPPPP* and so on.
YYYY is the year, MM is the month, DD is the day, and PPPPPPP is the
price. For clarity, the * above is actually just an ordinary space that
follows the year, month, day, and price. The only Enter symbol is at the
end of the data set.
My ultimate goal is to compute and plot a moving average (or trendline)
over a 1-, 2-, or 3-month period. The data is presently saved as a .txt
file.
There seems to be two ways for organizing the data in Excel: In column 1
have the complete date and in column 2 have the price; or in column 1
have the year, in column 2 the month, in column 3 the day, and in column
4 the price.
Questions:
1. Which is the better way to organize the imported data? If with just
two columns, how do I format the date column, since the
Format/Cells/Number/Category Date doesn't have a Type with the year
first. Perhaps a better approach is just to assign the number 1 to the
first date, the number 2 to the next date, the number 3 to the next
date, etc., so I'm working with relative, not absolute, dates.
2. How do I do the importing, especially so each new date starts in
column 1 of a new row? (The problem is that there is just a single space
following the price, same as follows the year, month and day; there is
no special delimiter or pairs of spaces to indicate the start of a new
date and thus a new row.)
Adding trendlines or moving averages seems pretty straight forward,
using the Help screen and typing Averages in the Index search box.
Thanks for you suggestions.
Ray
in the San Francisco area on each day from early 2006 to the present.
(That's 1800+ dates.) The format of the data is as follows:
YYYY*MM*DD*PPPPPP*YYYY*MM*DD*PPPPPP*YYYY*MM*DD*PPPPPP* and so on.
YYYY is the year, MM is the month, DD is the day, and PPPPPPP is the
price. For clarity, the * above is actually just an ordinary space that
follows the year, month, day, and price. The only Enter symbol is at the
end of the data set.
My ultimate goal is to compute and plot a moving average (or trendline)
over a 1-, 2-, or 3-month period. The data is presently saved as a .txt
file.
There seems to be two ways for organizing the data in Excel: In column 1
have the complete date and in column 2 have the price; or in column 1
have the year, in column 2 the month, in column 3 the day, and in column
4 the price.
Questions:
1. Which is the better way to organize the imported data? If with just
two columns, how do I format the date column, since the
Format/Cells/Number/Category Date doesn't have a Type with the year
first. Perhaps a better approach is just to assign the number 1 to the
first date, the number 2 to the next date, the number 3 to the next
date, etc., so I'm working with relative, not absolute, dates.
2. How do I do the importing, especially so each new date starts in
column 1 of a new row? (The problem is that there is just a single space
following the price, same as follows the year, month and day; there is
no special delimiter or pairs of spaces to indicate the start of a new
date and thus a new row.)
Adding trendlines or moving averages seems pretty straight forward,
using the Help screen and typing Averages in the Index search box.
Thanks for you suggestions.
Ray