BookmarkSubscribeRSS Feed
NPashaP
Calcite | Level 5

There are many JavaScript libraries a SAS user can use to create beautiful interactive charts quickly. I wrote a paper a while back in doing this using D3. Now I have created a GitHub repository with various SAS macros I have for creating charts in HTML if anyone wants to use them. Currently, this has only macros for Google Charts but I will be adding various D3 and other JS visualization macros.

 

Have fun visualizing at will!

 

 

 

 

 

 

3 REPLIES 3
Reeza
Super User

That looks awesome! Well done. Is there a way to add multiple graphs to the same HTML file and/or adding text in between? 

 

EDIT: some don't work, like the timeline one. Also, just a heads up, you can read your code directly from GitHub, you don't need to have the code locally as well in myfolders. It'll make your GitHub code, copy/paste/run rather than having to worry about downloading the macro files. This way, we can ensure we're using the latest version of your code without manually maintaining links 😉

%let source_path = https://gist.githubusercontent.com/statgeek/bcc55940dd825a13b9c8ca40a904cba9/raw/865d2cf18f5150b8e887218dde0fc3951d0ff15b/data2datastep.sas;

filename reprex url "&source_path";
%include reprex;
filename reprex;
NPashaP
Calcite | Level 5

You can use HTML iframes to combine multiple charts into a single view or a set of slides after having created each one. I will be creating an example showing how to do it.

 

Good tip on directly reading the macro from GitHub. For anyone who wants to take that route, the code is

filename hzggmacr url "https://raw.githubusercontent.com/haziris/haziris-sas/master/macros/haziris_google.sas";
%include hzggmacr;

Which timeline example isn't working? I had typos on a few of the example links and had fixed them.

 

Thanks!

 

Reeza
Super User
They're all working now 🙂

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 582 views
  • 3 likes
  • 2 in conversation