The Planets in Our Solar System

Name Planet Group Distance from
Sun (km)
Orbital Period
(days)
Rotational
Period (days)
Radius (km) Mass (kg)
Mercury Inner 5.8E+07 88 58.60 2,440 3.3E+23
Venus Inner 1.1E+08 225 . 6,052 4.9E+24
Earth Inner 1.5E+08 365 0.99 6,378 6.0E+24
Mars Inner 2.3E+08 687 1.03 3,397 6.4E+23
Jupiter Outer 7.8E+08 4,333 0.41 71,492 1.9E+27
Saturn Outer 1.4E+09 10,760 0.45 60,268 5.7E+26
Uranus Outer 2.9E+09 30,685 -0.72 25,559 8.7E+25
Neptune Outer 4.5E+09 60,190 0.67 24,766 1.0E+26
Pluto Outer 5.9E+09 90,800 -6.39 1,137 1.3E+22

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 

 


 
Data for the Inner Planets

ID Name Distance from
Sun (km)
Orbital Period
(days)
Rotational
Period (days)
Radius (km) Mass (kg)
I Mercury 5.8E+07 88 58.60 2,440 3.3E+23
II Venus 1.1E+08 225 . 6,052 4.9E+24
III Earth 1.5E+08 365 0.99 6,378 6.0E+24
IV Mars 2.3E+08 687 1.03 3,397 6.4E+23

 


 
Data for the Outer Planets

ID Name Distance from
Sun (km)
Orbital Period
(days)
Rotational
Period (days)
Radius (km) Mass (kg) Discoverer Date of Discovery
V Jupiter 7.8E+08 4,333 0.41 71,492 1.9E+27   .
VI Saturn 1.4E+09 10,760 0.45 60,268 5.7E+26   .
VII Uranus 2.9E+09 30,685 -0.72 25,559 8.7E+25 Herschel 1781
VIII Neptune 4.5E+09 60,190 0.67 24,766 1.0E+26 Adams 1846
IX Pluto 5.9E+09 90,800 -6.39 1,137 1.3E+22 Tombaugh 1930

/*****************************************************/
/*****************************************************/
/**                                                 **/
/** A Program to Demonstrate SAS HTML Capabilitites **/
/**           Using the Planets Data Set            **/
/**                                                 **/
/**             III.  Graphic 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. 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='plgra.htm' frame='plgfr.htm' page='plgpg.htm'
         (nobot) rs=none style=styles.newdoc;
ods proclabel 'List of Planets';
proc print data=crr.planets noobs label;
     var name cat soldist orbper rotper radius mass;
     label name='Name' soldist='Distance from Sun (km)'
	       orbper='Orbital Period (days)' radius='Radius (km)'
           mass='Mass (kg)' rotper='Rotational Period (days)' cat='Planet Group';
	 format soldist mass e8. orbper radius comma6.;
	 title '';
      title2 ' ';
      title3 'The Planets in Our Solar System';
	 footnote;
run;
ods proclabel 'Charts of the Planets';
goptions hsize=6in vsize=4in;
pattern color=vip;
   title f=brush c=green 'The Planets in Our Solar System';
proc gchart data=crr.planets;
     vbar3d id / sumvar=soldist type=mean discrete
                 cframe=lip shape=star;
     hbar3d id / sumvar=orbper type=mean discrete
                 cframe=palg shape=cylinder;
     vbar3d id / sumvar=radius type=mean discrete
                 cframe=vpag shape=star;
     pie3d id / sumvar=mass type=sum discrete fill=palg;
	label ID='Planet' soldist='Distance from Sun (km)'
	      orbper='Orbital Period (days)' radius='Radius (km)'
           mass='Mass (kg)' rotper='Rotational Period (days)';
	 format id plname.;
run;
ods proclabel 'Plot of Planetary Distance vs Orbital Period';
goptions hsize=6in vsize=4in;
pattern color=vip;
   title f=brush c=green 'Distance from Sun vs Orbital Period';

proc gplot data=crr.planets;
     plot orbper*soldist;
     label soldist='Distance from Sun (km)'
	       orbper='Orbital Period (days)';
	 symbol v= c=g h=3 i=spline;
run;
proc sort data=crr.planets out=mssrt;
     by radius;
run;
ods proclabel 'Plot of Planetary Radius vs Mass';
goptions hsize=6in vsize=4in;
pattern color=vip;
   title f=brush c=green 'Planetary Radius vs Mass';

proc gplot data=mssrt;
     plot radius*mass;
     label radius='Radius (km)'mass='Mass (kg)';
     symbol v= c=g h=3 i=spline;
run;
quit;

data drpl;
     set crr.planets;
	length drill $ 40;
	if cat='Inner' then drill='HREF=plgra.htm#IDX10';
	else drill='HREF=plgra.htm#IDX11';
run;
ods proclabel 'Drilldown Charts of the Planets';
goptions hsize=6in vsize=4in;
pattern color=vip;
   title f=brush c=green 'Inner and Outer Planets';

proc gchart data=drpl;
     vbar3d cat / sumvar=soldist type=mean discrete
                 cframe=lip shape=star html=drill;
     hbar3d cat / sumvar=orbper type=mean discrete
                 cframe=palg shape=cylinder html=drill;
     vbar3d cat / sumvar=radius type=mean discrete
                 cframe=vpag shape=star html=drill;
	label ID='Planet' soldist='Average Distance from Sun (km)'
	      orbper='Average Orbital Period (days)' radius='Average Radius (km)'
           mass='Average Mass (kg)' rotper='Average Rotational Period (days)';
	 format id plname.;
run;
quit;
ods proclabel 'Drilldown Report on Inner Planets';
title 'Inner Planets - Drilldown Report';

proc print data=crr.planets noobs label;
     where cat='Inner';
	title 'Data for the Inner Planets';
	     var id name soldist orbper rotper radius mass;
     label ID='ID' name='Name' discov='Discoverer' soldist='Distance from Sun (km)'
	       orbper='Orbital Period (days)' datedisc='Date of Discovery' radius='Radius (km)'
           mass='Mass (kg)' rotper='Rotational Period (days)' cat='Planet Group';
	 format soldist mass e8. orbper radius comma6.;
run;
ods proclabel 'Drilldown Report on Outer Planets';
title 'Outer Planets - Drilldown Report';

proc print data=crr.planets noobs label;
     where cat='Outer';
	title 'Data for the Outer Planets';
	     var id name soldist orbper rotper radius mass discov datedisc;
     label ID='ID' name='Name' discov='Discoverer' soldist='Distance from Sun (km)'
	       orbper='Orbital Period (days)' datedisc='Date of Discovery' radius='Radius (km)'
           mass='Mass (kg)' rotper='Rotational Period (days)' cat='Planet Group';
	 format soldist mass e8. orbper radius comma6.;
run;

ods html close;
/* Modify the table of contents */
data _null_;
    infile 'plgpg2.htm' end=no_more;
    file 'plgpg.htm' mod;
    input;
    put _infile_;
    if no_more then put '';
run;
/* List the program with the pages */
data _null_;
    infile 'plgra.sas' end=no_more;
    file 'plgra.htm' mod;
    input;
    if _n_=1 then do;
       put '
';
       put '';
    end;
    put _infile_;
    if no_more then put '
'; run; ods listing;