Date spine for cumulative counts

Reply
New Contributor
Posts: 3

Date spine for cumulative counts

hello,

my aim is avg cumulative daily counts of cow births over 5 years. I know how, but my problem is that I want to graph these counts over time and my data set only contains records of cow births/ dates, not all possible dates in the time period. Eg no birth on 2 jan in any of those 5 years =no record for 2 jan. I need a date spine. Is there any way to include all possible dates in a year without typing them all?

THanks

Super User
Posts: 1,117

Re: Date spine for cumulative counts

Hi

Could you please provide a sample data and the expected output

Thanks,

Jag

Thanks,
Jag
Grand Advisor
Posts: 10,223

Re: Date spine for cumulative counts

To create dates is easy:

data dates2012;

     do date='01Jan2012'd to '31DEC2012'd by 1;

          output;

     end;

run;

What type of graph are you attempting to create? Generally any time axis for an entire year would have too many entries for readability. Scatter plots don't care much about missing x axis values and you can generally use a "from date to date by interval" type of description. Series plots may or may not have breaks depending on the procedure and what you want things to look like.

Having done some similar types of cumulative to day of year, you might find looking at Julian Dates are also helpful.

Ask a Question
Discussion stats
  • 2 replies
  • 193 views
  • 0 likes
  • 3 in conversation