<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic My first Valentine’s Day Data Viz Challenge in Valentine's Day Data Viz Challenge</title>
    <link>https://communities.sas.com/t5/Valentine-s-Day-Data-Viz/My-first-Valentine-s-Day-Data-Viz-Challenge/m-p/918092#M22</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am discovering the Valentine's Day DataViz Challenge, which seems to take place every year and ends in 1 day. I am not an expert in SAS Graph and its new features, so I have created this first version, which I will strive to improve for future challenges.&lt;/P&gt;
&lt;P&gt;I have been inspired by various tips and tricks, including those presented in the programs by Michelle Homes, Rick Wincling, and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc&lt;/a&gt;'s, to quickly create this visualization.&lt;/P&gt;
&lt;P&gt;This SAS program generates a series of heart-shaped curves and animates them with different colors. It also includes additional text annotations. The resulting graph is my first Valentine's Day-themed visualization.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let pink = cxFF3333; /* Define the color variable for pink */&lt;/P&gt;
&lt;P&gt;%let textcolor = &amp;amp;pink.; /* Allow to Define a different color for text if needed */&lt;/P&gt;
&lt;P&gt;%let pas = 2; /* Step size */&lt;BR /&gt;%let lower = 20; /* Lower limit */&lt;BR /&gt;%let upper = 98; /* Upper limit */&lt;/P&gt;
&lt;P&gt;data heart_data1;&lt;BR /&gt;do x = -2 to 2 by .005;&lt;BR /&gt;y = sqrt(1 - (abs(x) - 1) ** 2);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;do x = 2 to -2 by -.005;&lt;BR /&gt;y = arcos(1 - abs(x)) - 3.14;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data textOnly;&lt;BR /&gt;retain tx 0 ty -0.2 msg "HAPPY/VALENTINE'S/DAY/2024"; /* Define the text and its position !! "By hand" at the moment */&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%macro echelle(i = &amp;amp;lower., j = &amp;amp;upper., tick = &amp;amp;pas.);&lt;BR /&gt;%do k = &amp;amp;i. %to &amp;amp;j. %by &amp;amp;tick.;&lt;BR /&gt;data heart_data&amp;amp;k.;&lt;BR /&gt;set heart_data1;&lt;BR /&gt;x&amp;amp;k. = x * %sysevalf(&amp;amp;k./100.);&lt;BR /&gt;y&amp;amp;k. = y * %sysevalf(&amp;amp;k./100.);&lt;BR /&gt;drop x y;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;%echelle /* Generate multiple datasets with scaled data */&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;%macro fustout(i = &amp;amp;lower., j = &amp;amp;upper., tick = &amp;amp;pas.);&lt;BR /&gt;%global var;&lt;BR /&gt;%let var = heart_data&amp;amp;i.;&lt;BR /&gt;%do k = %eval(&amp;amp;i. + &amp;amp;tick.) %to &amp;amp;j. %by &amp;amp;tick.;&lt;BR /&gt;%let var = &amp;amp;var heart_data&amp;amp;k.;&lt;BR /&gt;%end;&lt;BR /&gt;%put &amp;amp;var.=;&lt;BR /&gt;%mend fustout;&lt;/P&gt;
&lt;P&gt;%fustout /* Concatenate dataset names into a global macro variable */&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;*%put &amp;amp;var =; /* Display the concatenated dataset names */&lt;/P&gt;
&lt;P&gt;*run;&lt;/P&gt;
&lt;P&gt;data heart_datafin;&lt;BR /&gt;merge heart_data1 &amp;amp;var. textonly; /* Merge the scaled datasets, original dataset, and text dataset */&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%macro plotplusieurs(i = &amp;amp;lower., j = &amp;amp;upper., tick = -&amp;amp;pas.);&lt;BR /&gt;%do k = &amp;amp;j. %to &amp;amp;i. %by &amp;amp;tick;&lt;BR /&gt;series x = x&amp;amp;k. y = y&amp;amp;k. / lineattrs = (color = cxFF%eval(3333 + &amp;amp;k.) thickness = 2); /* Plot multiple series with different colors */&lt;BR /&gt;%end;&lt;BR /&gt;%mend plotplusieurs;&lt;/P&gt;
&lt;P&gt;Title "Valentine’s Day Data Viz Challenge"; /* Set the title of the graph */&lt;/P&gt;
&lt;P&gt;footnote "stephen version 1 on &amp;amp;sysdate."; /* Set the footnote */&lt;/P&gt;
&lt;P&gt;footnote2 "to be continued"; /* Set another footnote */&lt;/P&gt;
&lt;P&gt;proc sgplot data = heart_datafin noautolegend; /* Start the SGPLOT procedure with the merged dataset */&lt;BR /&gt;series x = x y = y / lineattrs = (color = &amp;amp;pink thickness = 2); /* Plot the main series */&lt;BR /&gt;%plotplusieurs /* Plot additional series */&lt;BR /&gt;text x = tx y = ty text = msg / textattrs = (color = &amp;amp;textcolor size = 5pt) splitchar = '/' splitpolicy = splitalways contributeoffsets = none; /* Add text with specified attributes */&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2024 18:37:48 GMT</pubDate>
    <dc:creator>stephenB</dc:creator>
    <dc:date>2024-02-27T18:37:48Z</dc:date>
    <item>
      <title>My first Valentine’s Day Data Viz Challenge</title>
      <link>https://communities.sas.com/t5/Valentine-s-Day-Data-Viz/My-first-Valentine-s-Day-Data-Viz-Challenge/m-p/918092#M22</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am discovering the Valentine's Day DataViz Challenge, which seems to take place every year and ends in 1 day. I am not an expert in SAS Graph and its new features, so I have created this first version, which I will strive to improve for future challenges.&lt;/P&gt;
&lt;P&gt;I have been inspired by various tips and tricks, including those presented in the programs by Michelle Homes, Rick Wincling, and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc&lt;/a&gt;'s, to quickly create this visualization.&lt;/P&gt;
&lt;P&gt;This SAS program generates a series of heart-shaped curves and animates them with different colors. It also includes additional text annotations. The resulting graph is my first Valentine's Day-themed visualization.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let pink = cxFF3333; /* Define the color variable for pink */&lt;/P&gt;
&lt;P&gt;%let textcolor = &amp;amp;pink.; /* Allow to Define a different color for text if needed */&lt;/P&gt;
&lt;P&gt;%let pas = 2; /* Step size */&lt;BR /&gt;%let lower = 20; /* Lower limit */&lt;BR /&gt;%let upper = 98; /* Upper limit */&lt;/P&gt;
&lt;P&gt;data heart_data1;&lt;BR /&gt;do x = -2 to 2 by .005;&lt;BR /&gt;y = sqrt(1 - (abs(x) - 1) ** 2);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;do x = 2 to -2 by -.005;&lt;BR /&gt;y = arcos(1 - abs(x)) - 3.14;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data textOnly;&lt;BR /&gt;retain tx 0 ty -0.2 msg "HAPPY/VALENTINE'S/DAY/2024"; /* Define the text and its position !! "By hand" at the moment */&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%macro echelle(i = &amp;amp;lower., j = &amp;amp;upper., tick = &amp;amp;pas.);&lt;BR /&gt;%do k = &amp;amp;i. %to &amp;amp;j. %by &amp;amp;tick.;&lt;BR /&gt;data heart_data&amp;amp;k.;&lt;BR /&gt;set heart_data1;&lt;BR /&gt;x&amp;amp;k. = x * %sysevalf(&amp;amp;k./100.);&lt;BR /&gt;y&amp;amp;k. = y * %sysevalf(&amp;amp;k./100.);&lt;BR /&gt;drop x y;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;%echelle /* Generate multiple datasets with scaled data */&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;%macro fustout(i = &amp;amp;lower., j = &amp;amp;upper., tick = &amp;amp;pas.);&lt;BR /&gt;%global var;&lt;BR /&gt;%let var = heart_data&amp;amp;i.;&lt;BR /&gt;%do k = %eval(&amp;amp;i. + &amp;amp;tick.) %to &amp;amp;j. %by &amp;amp;tick.;&lt;BR /&gt;%let var = &amp;amp;var heart_data&amp;amp;k.;&lt;BR /&gt;%end;&lt;BR /&gt;%put &amp;amp;var.=;&lt;BR /&gt;%mend fustout;&lt;/P&gt;
&lt;P&gt;%fustout /* Concatenate dataset names into a global macro variable */&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;*%put &amp;amp;var =; /* Display the concatenated dataset names */&lt;/P&gt;
&lt;P&gt;*run;&lt;/P&gt;
&lt;P&gt;data heart_datafin;&lt;BR /&gt;merge heart_data1 &amp;amp;var. textonly; /* Merge the scaled datasets, original dataset, and text dataset */&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;%macro plotplusieurs(i = &amp;amp;lower., j = &amp;amp;upper., tick = -&amp;amp;pas.);&lt;BR /&gt;%do k = &amp;amp;j. %to &amp;amp;i. %by &amp;amp;tick;&lt;BR /&gt;series x = x&amp;amp;k. y = y&amp;amp;k. / lineattrs = (color = cxFF%eval(3333 + &amp;amp;k.) thickness = 2); /* Plot multiple series with different colors */&lt;BR /&gt;%end;&lt;BR /&gt;%mend plotplusieurs;&lt;/P&gt;
&lt;P&gt;Title "Valentine’s Day Data Viz Challenge"; /* Set the title of the graph */&lt;/P&gt;
&lt;P&gt;footnote "stephen version 1 on &amp;amp;sysdate."; /* Set the footnote */&lt;/P&gt;
&lt;P&gt;footnote2 "to be continued"; /* Set another footnote */&lt;/P&gt;
&lt;P&gt;proc sgplot data = heart_datafin noautolegend; /* Start the SGPLOT procedure with the merged dataset */&lt;BR /&gt;series x = x y = y / lineattrs = (color = &amp;amp;pink thickness = 2); /* Plot the main series */&lt;BR /&gt;%plotplusieurs /* Plot additional series */&lt;BR /&gt;text x = tx y = ty text = msg / textattrs = (color = &amp;amp;textcolor size = 5pt) splitchar = '/' splitpolicy = splitalways contributeoffsets = none; /* Add text with specified attributes */&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 18:37:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Valentine-s-Day-Data-Viz/My-first-Valentine-s-Day-Data-Viz-Challenge/m-p/918092#M22</guid>
      <dc:creator>stephenB</dc:creator>
      <dc:date>2024-02-27T18:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: My first Valentine’s Day Data Viz Challenge</title>
      <link>https://communities.sas.com/t5/Valentine-s-Day-Data-Viz/My-first-Valentine-s-Day-Data-Viz-Challenge/m-p/918144#M24</link>
      <description>&lt;P&gt;Excellent work &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/161998"&gt;@stephenB&lt;/a&gt;! &lt;span class="lia-unicode-emoji" title=":smiling_face_with_heart_eyes:"&gt;😍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 02:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Valentine-s-Day-Data-Viz/My-first-Valentine-s-Day-Data-Viz-Challenge/m-p/918144#M24</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2024-02-28T02:24:11Z</dc:date>
    </item>
  </channel>
</rss>

