The Planets in Our Solar System

  Average Distance from Sun (km)
Planetary Group   1.359E+08
Inner
-
Outer
- 3.099E+09

 


 
  Average Rotation and Revolution (Earth days)
Planetary Group   3.412E+02
Inner
Orbital Period
Rotational Period 2.021E+01
Outer
Orbital Period 3.935E+04
Rotational Period -1.116E+00

 


 
  Average Radius (km) and Mass (kg)
Planetary Group   4.567E+03
Inner
Radius
Mass 2.953E+24
Outer
Radius 3.664E+04
Mass 5.314E+26

Inner Planets include Mercury, Venus, Earth and Mars
Outer Planets include Jupiter, Saturn, Uranus, Neptune and Pluto

 


 
Statistical Data for Planets

Planet Group Number of Observations Statistics Distance from
Sun
Mass Orbital Period Radius Rotational Period
All Planets 9 Minimum Value 5.8E+07 1.3E+22 87.97 1,137.00 -6.39
All Planets 9 Maximum Value 5.9E+09 1.9E+27 90,800.00 71,492.00 58.60
All Planets 9 Average Value 1.8E+09 3.0E+26 22,014.68 22,387.67 6.88
Inner Planets 4 Minimum Value 5.8E+07 3.3E+23 87.97 2,440.00 0.99
Inner Planets 4 Maximum Value 2.3E+08 6.0E+24 686.98 6,378.00 58.60
Inner Planets 4 Average Value 1.4E+08 3.0E+24 341.23 4,566.75 20.21
Outer Planets 5 Minimum Value 7.8E+08 1.3E+22 4,332.71 1,137.00 -6.39
Outer Planets 5 Maximum Value 5.9E+09 1.9E+27 90,800.00 71,492.00 0.67
Outer Planets 5 Average Value 3.1E+09 5.3E+26 39,353.44 36,644.40 -1.12

Inner Planets include Mercury, Venus, Earth and Mars
Outer Planets include Jupiter, Saturn, Uranus, Neptune and Pluto

/*****************************************************/
/*****************************************************/
/**                                                 **/
/** A Program to Demonstrate SAS HTML Capabilitites **/
/**           Using the Planets Data Set            **/
/**                                                 **/
/**             II.  Summary Reports                **/
/**                                                 **/
/**        Created by Christine R. Riddiough        **/
/**                     May 2000                    **/
/**                                                 **/
/*****************************************************/
/*****************************************************/

/*****************************************************/
/*                                                   */
/* Part 1. Create a new style named                  */
/* STYlES.NEWDOC by making changes to                */
/* the StatDoc style. What follows                   */
/* is the StatDoc template modified                  */
/*                                                   */
/*****************************************************/

proc template;
    define style Styles.NEWDOC;
      parent = styles.StatDoc;
   replace fonts /
      'SASTitleFont' = ("Verdana, Helvetica, Helv",2,Bold Italic)
      'TitleFont2' = ("Verdana, Helvetica, Helv",2,Bold Italic)
      'TitleFont' = ("Verdana, Helvetica, Helv",2,Bold Italic)
      'StrongFont' = ("Verdana, Helvetica, Helv",2,Bold Italic)
      'EmphasisFont' = ("Verdana, Helvetica, Helv",2,Italic)
      'FixedEmphasisFont' = ("Courier New, Courier",2,Italic)
      'FixedStrongFont' = ("Courier New, Courier",2,Bold)
      'FixedHeadingFont' = ("Courier New, Courier",2,Bold)
      'FixedFont' = ("Courier New, Courier",2)
      'headingEmphasisFont' = ("Verdana, Helvetica, Helv",2,Bold Italic)
      'headingFont' = ("Verdana, Helvetica, Helv",2,Bold)
      'docFont' = ("Verdana, Helvetica, Helv",2);
   replace colors /
      'contentbg' = cxB0B0B0
      'contentfg' = cx0033AA
      'link2' = cx0066AA
      'link1' = cx004488
      'bg5' = cxE0E0E0
      'bg4' = cx004488
      'fg4' = cx0066AA
      'bg3' = cxDEDDED
      'fg3' = cx151219
      'bg2' = cxEBDDED 
      'fg2' = cx151219
      'fg' = cx191719;
   replace Container;
   replace Index from Container /
      foreground = colors('fg');
   replace Contents from Document /
      bullet = "decimal"
      pagebreakhtml = html('break')
      background = colors('bg2')
      leftmargin = 8;
   replace Pages from Document /
      bullet = "decimal"
      pagebreakhtml = html('break')
      background = colors('bg2')
      leftmargin = 8;
   replace Date from Container /
      outputwidth = 100%
      foreground = colors('fg3');
   replace BodyDate from Date;
   replace IndexItem from Container /
      prehtml = html('fake bullet')
      listentryanchor = on
      bullet = NONE;
   replace ContentFolder from IndexItem /
      posthtml = html('posthtml flyover')
      prehtml = html('prehtml flyover bullet')
      listentryanchor = off;
   replace IndexProcName from Index /
      listentryanchor = off
      bullet = "decimal"
      posthtml = html('posthtml flyover')
      prehtml = html('prehtml flyover')
      posttext = text('suffix1')
      pretext = text('prefix1');
   replace IndexTitle from Index /
      posthtml = html('posthtml flyover line')
      prehtml = html('expandAll');
   replace SysTitleAndFooterContainer from Container /
      posthtml = ""
      prehtml = ""
      font = Fonts('TitleFont2')
      rules = NONE
      frame = VOID
      outputwidth = 100%
      cellpadding = 1
      cellspacing = 1
      borderwidth = 0;
   replace TitleAndNoteContainer from Container /
      posthtml = ""
      prehtml = ""
      rules = NONE
      frame = VOID
      outputwidth = 100%
      cellpadding = 1
      cellspacing = 1
      borderwidth = 0;
   replace TitlesAndFooters from Container /
      font = Fonts('TitleFont2')
      foreground = colors('fg');
   replace BylineContainer from Container /
      rules = NONE
      frame = VOID
      outputwidth = 100%
      cellpadding = 1
      cellspacing = 1
      borderwidth = 0;
   replace SystemTitle from TitlesAndFooters /
      font = Fonts('TitleFont');
   replace SystemFooter from TitlesAndFooters /
      font = Fonts('TitleFont');
   replace Byline from TitlesAndFooters /
      font = fonts('TitleFont')
      foreground = colors('fg2');
   replace ProcTitle from TitlesAndFooters /
      font = fonts('TitleFont2');
   replace Output from Container /
      rules = GROUPS
      frame = BOX
      cellpadding = 7
      cellspacing = 1
      borderwidth = 1;
   replace Table from Output /
      posthtml = ""
      prehtml = "";
   replace Batch from Output
      "Batch (capture) Output style." /
      font = fonts('FixedFont')
      foreground = colors('fg');
   replace Graph from Output;
   replace Note from Container /
      posthtml = ""
      prehtml = "";
   replace NoteBanner from Note /
      font = fonts('StrongFont')
      pretext = text('Note Banner');
   replace NoteContent from Note
      "Controls the contents for NOTE:s." /
      just = L;
   replace NoteContentFixed from NoteContent
      "Controls the contents for NOTE:s. Fixed font." /
      just = L
      font = fonts('FixedFont');
   replace WarnBanner from Note
      "Controls the banner for WARNING:s." /
      pretext = text('Warn Banner');
   replace WarnContent from Note
      "Controls the contents of WARNING:s." /
      just = L;
   replace WarnContentFixed from WarnContent
      "Controls the contents for WARNING:s. Fixed font." /
      font = fonts('FixedFont');
   replace ErrorBanner from Note
      "Controls the banner for ERROR:s." /
      pretext = text('Error Banner');
   replace ErrorContent from Note
      "Controls the contents of ERROR:s." /
      just = L;
   replace ErrorContentFixed from ErrorContent
      "Controls the contents for ERROR:s. Fixed font." /
      font = fonts('FixedFont');
   replace FatalBanner from Note
      "Controls the banner for FATAL:s." /
      pretext = text('Fatal Banner');
   replace FatalContent from Note
      "Controls the contents of FATAL:s." /
      just = L;
   replace FatalContentFixed from FatalContent
      "Controls the contents for FATAL:s. Fixed font." /
      font = fonts('FixedFont');
   replace Data from Cell /
      font = Fonts('DocFont')
      foreground = colors('fg3')
      background = colors('bg3');
   replace DataEmphasis from Data /
      font = fonts('EmphasisFont');
   replace DataEmphasisFixed from DataEmphasis /
      font = fonts('FixedEmphasisFont');
   replace DataStrong from Data /
      font = fonts('StrongFont');
   replace HeadersAndFooters from Cell /
      font = fonts('HeadingFont')
      foreground = colors('fg2')
      background = colors('bg2');
   replace Caption from HeadersAndFooters;
   replace HeaderEmphasis from Header /
      font = fonts('EmphasisFont');
   replace HeaderStrong from Header /
      font = fonts('StrongFont');
   end;
run;

/*****************************************************/
/*                                                   */
/* Part 2. Create new formats to be used in          */
/* creating proc tabluate output                     */
/*                                                   */
/*****************************************************/

proc format;
   value $colpl 'Inner'='vpak'
                 'Outer'='vpab';
   value $catgif 'Inner'='
Inner
' 'Outer'='
Outer
'; value plname 1='Mercury' 2='Venus' 3='Earth' 4='Mars' 5='Jupiter' 6='Saturn' 7='Uranus' 8='Neptune' 9='Pluto'; run; /*****************************************************/ /* */ /* Part 3. Close the listing output open the html */ /* output and define the web pages/frames/body */ /* and use the style */ /* */ /*****************************************************/ ods listing close; ods html body='plsum.htm' frame='plsfr.htm' page='plspg.htm' (nobot) rs=none style=styles.newdoc; /*****************************************************/ /* */ /* Part 4. Run the procedures using STYlES.NEWDOC */ /* and the formats as appropriate */ /* */ /*****************************************************/ ods proclabel 'Inner and Outer Planets: Distance from Sun'; proc tabulate data=crr.planets format=e8.2; class cat / style={background=lip}; var soldist / style=; classlev cat /style={background=$colpl.}; table cat*soldist*{style={font_weight=bold foreground=black}},mean / box={style={background=lip}}; keyword mean / style={background=lip}; format cat $catgif.; label cat='Planetary Group' soldist=' - '; keylabel mean='Average Distance from Sun (km)'; title ''; title2 ' '; title3 'The Planets in Our Solar System'; footnote; run; ods proclabel 'Inner and Outer Planets: Rotation and Revolution'; proc tabulate data=crr.planets format=e8.2; class cat / style={background=lip}; var rotper orbper / style=; classlev cat /style={background=$colpl.}; table cat*(orbper rotper)*{style={font_weight=bold foreground=black}},mean / box={style={background=lip}}; keyword mean / style={background=lip}; format cat $catgif.; label cat='Planetary Group' rotper='Rotational Period' orbper='Orbital Period'; keylabel mean='Average Rotation and Revolution (Earth days)'; title; run; ods proclabel 'Inner and Outer Planets: Size and Mass'; proc tabulate data=crr.planets format=e8.2; class cat / style={background=lip}; var radius mass / style=; classlev cat /style={background=$colpl.}; table cat*(radius mass)*{style={font_weight=bold foreground=black}},mean / box={style={background=lip}}; keyword mean / style={background=lip}; format cat $catgif.; label cat='Planetary Group' radius='Radius' mass='Mass'; keylabel mean='Average Radius (km) and Mass (kg)'; footnote1 'Inner Planets include Mercury, Venus, Earth and Mars'; footnote2 'Outer Planets include Jupiter, Saturn, Uranus, Neptune and Pluto'; run; /*****************************************************/ /* */ /* Part 5. Use proc template to create a template */ /* for tables of statistics from the output of */ /* proc means */ /* */ /*****************************************************/ proc template; define table mplan; column cat freqs stats soldist mass orbper radius rotper; define freqs; header='Number of Observations' underline justify just=c; end; define stats; header='Statistics' underline justify just=c; end; define cat; header='Planet Group' underline justify just=c; end; define soldist; header='Distance from Sun' underline justify just=c; end; define mass; header='Mass' underline justify just=c; end; define orbper; header='Orbital Period' underline justify just=c; end; define radius; header='Radius' underline justify just=c; end; define rotper; header='Rotational Period' underline justify just=c; end; end; run; /*****************************************************/ /* */ /* Part 6. Get an output data set from proc means to */ /* use in a data step */ /* */ /*****************************************************/ proc means data=crr.planets maxdec=2 mean median max min noprint; class cat; var soldist orbper radius mass rotper; output out=work.stats; run; /*****************************************************/ /* */ /* Part 7. Create formats to use in the */ /* output data set */ /* */ /*****************************************************/ proc format; value $mst 'N'='Number of Observations' 'MAX'='Maximum Value' 'MIN'='Minimum Value' 'MEAN'='Average Value' 'STD'='Standard Deviation'; value $pgrp ' '='All Planets' 'Inner'='Inner Planets' 'Outer'='Outer Planets'; run; /*****************************************************/ /* */ /* Part 8. Run a data step on the means output */ /* using the table template and the */ /* formats to set up the table */ /* */ /*****************************************************/ ods proclabel 'Data Step Planet Statistics'; data work.stats(drop=_type_); title 'Statistical Data for Planets'; title2 ' '; set work.stats(rename=(_freq_=freqs _stat_=stats)); if stats ne 'N' and stats ne 'STD'; format cat $pgrp. stats $mst. orbper radius rotper comma12.2 soldist mass E7.; file print ods=(template='mplan'); put _ods_; run; ods html close; /*****************************************************/ /* */ /* Part 9. Run a data step to output the source code */ /* */ /*****************************************************/ data _null_; infile 'plspg2.htm' end=no_more; file 'plspg.htm' mod; input; put _infile_; if no_more then put ''; run; /* List the program with the pages */ data _null_; infile 'plsum.sas' end=no_more; file 'plsum.htm' mod; input; if _n_=1 then do; put '
';
       put '';
    end;
    put _infile_;
    if no_more then put '
'; run; ods listing;