COVID-19 SAS Studio Project No.2: Visualising global trends in Johns Hopkins University data

Loading

This is a project to read the daily Johns Hopkins COVID-19 data and visualise the national infection and fatality trends using Base SAS and SAS/STAT:

  1. Download the GitHub Desktop software from https://desktop.github.com/ and install it on your computer where you will be running SAS Studio or SAS University Edition. For instructions on how to install SAS University Edition on your own computer please read my blog post “Are you learning about SAS?”.
  2. Clone the Johns Hopkins COVID-19 data at https://github.com/CSSEGISandData/COVID-19, and then Pull the latest data, using the GitHub Desktop. This will reduce the time need to download all of the latest data each time you run the SAS Studio project, as a simple and quick Pull request in GitHub Desktop is all that is required each time.
  3. Download my SAS Studio CPF project file (John-Hopkins-GitHub-data.cpf), which is a zipped CPF file and will be updated occasionally with accepted submitted updates. Please check for comments here when updates are added.
  4. Open the CPF project file in SAS Studio (requires Base SAS and SAS/STAT) or SAS University Edition (making certain you have created a Shared Folder(s) first that are pointing to where your GitHub files and CPF project file are stored).
  5. Update the “run first” program to include your GitHub file folder in the &_dir macro variable assignment. The CSV files we will be using can be found in the /csse_covid_19_data/csse_covid_19_daily_reports folder.
  6. Submit each program in order given below (or submit all of the programs in the project’s flow together):
    • (1) “run first” assigns the location of the data to the &_dir macro variable.
    • (2) “Read CSV files” creates the SAS data sets in WORK by reading all of the CSV files in the csse_covid_19_daily_reports folder. Summarise the records by Country_Region to remove finer detail in the csse_covid_19_daily_reports.
    • (3) “Calculate regression lines” generates the regression lines for confirmed cases between 100 and 10,000, and deaths between 10 and 1,000, to include on the graphs. The regression lines appear to be straight in the semi-log plots, but are actually exponential to match the initial growth of confirmed cases, so that “flattening” of the curves can be identified more easily.
    • (4) “Semi-log plots of confirmed vs deaths” generates the graphs for countries where COVID-19 has had more than 1,000 confirmed cases or more than 100 deaths.

Some questions for you to answer:

    • (a) Where could my “Read CSV files” program be improved?
    • (b) Why is the US graph split at around 20Mar2020? Is this a problem with the data or my program?
    • (c) Are all of cases being included?

This project is open to SAS programmers and to researchers. Follow the above instructions yourself, and then see if you can improve my SAS code by answering the questions.

Please send your saved SAS Studio flow containing your improved versions of the SAS programs to phil@hollandnumerics.org.uk. Anyone providing improvements that can be incorporated will be added to the credits for this project.

My first COVID-19 SAS project for SAS Studio/SAS University Edition can be found at “Can you help? Supporting Coronavirus Research by searching research papers with SAS“.

If you are still looking for SAS training, then please go to my blog post “SAS training for home-workers: Keeping your mind active and your skills current” for some more training options.

COVID-19 can be defeated, and, working together, we can make a difference!

SAS training for home-workers: Keeping your mind active and your skills current

Loading

I have been working from home on and off since 1996, so it now feels quite normal to start my work day by walking from my kitchen into my office. I know some of my colleagues have struggled with the many distractions that exist at home, so I suppose I’ve been lucky, but I still do not like doing nothing at all. To stop any boredom setting in I will look for ways to do something useful, and, over the years, I have taught myself many programming languages by reading books, running example code, and trying to write applications that will be useful day-to-day, for example:

  • Database applications for calculating hours left to work and printing invoices in Visual Basic.
  • Web applications to send me emails and SMS messages in Perl.
  • Smartphone apps for webOS (remember HP/Palm phones?) in Javascript and HTML5.
  • Smartphone apps for Android in Java.
  • Crossword puzzle word-finder scripts in LibreOffice Basic.
  • SAS Enterprise Guide custom tasks in VB.Net.
  • SAS Studio custom tasks in XML.

Each language presents a different set of problems and solutions, so each new solution will broaden your knowledge of the computer world. Not all language have been central to my day job, but my views on solving computer problems has been moulded by each new programming language I’ve used. In 1996 there was no significant online help, so you couldn’t easily ask anyone for help, but instead you had to rely on hints and tips in computer magazines. Later the online communities have become vital, but you will now have to ask your questions in the correct way, so that it will be understood by each community, as names are not necessarily consistent, otherwise your question is likely to be ignored. I’ve now found ways to improve the chances of my questions being answered, even if my problems are not always resolved:

  • Write a subject line that asks a question that could be answered, otherwise it probably won’t even be read.
  • Set the scene by describing the environment you are working in, such as operating system, and software language and version.
  • Describe in as much detail as you can what you are trying to do, what you have already tried, and any results/messages that you are getting, even if you don’t understand them.
  • Never assume that you’re problem can be solved, but work with anyone who offers you assistance.
  • Be humble and grateful, because there will be programmers out there who know more about this than you, and you might need to call on their skills again.

So what has all this got to do with SAS training? Well, thanks to COVID-19, there are now more home-workers than ever before, and in some cases the work available may not be filling your day, so what can you do to fill your spare time and improve your programming knowledge? I have gathered together some sources of SAS training and information which are either free or inexpensive, which you may find useful, and if you find out about any more, then post a comment and I’ll be happy to check them out:

  • Training courses:
    • My corporate SAS training courses are intended for large groups, but each course has an associated eBook that is much cheaper and available through the Training section on this site.
    • I have a low-cost forum with a monthly subscription called the SAS Programming Forum, which welcomes SAS programming questions, but also includes the SAS course with a growing number of SAS-related topics, such as Data Steps, SAS Macros and PROC SQL, either as individual posts or LMS courses.
    • If you prefer to learn from eBooks or Android apps, then the topics in the SAS course are also available as eBooks and Android apps (on Amazon Appstore and Google Play).
  • Papers and books:
    • The Conferences Paper section on this site is filled with papers covering a wide range of SAS-related topics, which can be downloaded for free.
    • Other SAS-related books can be bought through the Books section on this site.
    • The largest searchable collection of SAS-related conference papers is maintained by Lex Jansen, including papers from SUGI, SeUGI, regional SAS user groups and forums, VIEWS, PhUSE, PharmaSUG and SAS Global Forum.
  • Competitive learning:
    • Sasensei is a SAS-related quiz and learning site where the flashcards, questions and quizzes are contributed by the users, and you earn points and awards from contributions and correct answers, but you will always learn from your incorrect answers too.
  • SAS support:
  • SAS programming platforms for learning:
    • SAS University Edition is free for use as a learning platform, and can either be downloaded and installed on your laptop using VMware or VirtualBox, or accessed through the web on the AWS Cloud.
    • WPS Analytics Community Edition is a free version of WPS Analytics, which can be licensed from World Programming for 6 months at a time and installed on your PC, and can run SAS programs using quite a large subset of SAS programming features, and includes R and Python interfaces.

I think that should at least get you started on your SAS improvement projects!

Blog member Alan Davies is presenting at the Debut SUGUKI meeting in Bristol on Sept 26

Loading

Debut Bristol SAS Meetup

Lloyds Banking Group Harbourside, 10 Canons Way, Bristol

Details

Our debut event in Bristol is sponsored by Lloyds Banking Group – with a fantastic venue, overlooking the harbourside!

• 18:00 – Arrive
• 18:30 – Intro
• 18:40 – SAS® at home, The University Edition – Download & Installation (Alan Davies)
• 18:50 – Sasensei Quiz Break
• 19:00 – Presentation 2
• 19:20 – Wrap up and drinks
• 20:00 – Vacate to a local watering hole

Entrance is free but you must RSVP to confirm attendance for security/capacity reasons.

Newly updated apps about Efficiency and SAS Studio

Loading

Because of the heavy traffic in London the locals complain that “you wait ages for a bus, then 2 arrive at the same time!”. I hope you don’t complain in the same way when I write two blogs posts within days of each other, but I find that this often happens when I get a little spare time to work on my apps.

Unlike in my previous post, these two apps are not in any way related to each other, apart from being named 12 and 13 in my list. Both apps can be installed from Google Play, Amazon Appstore and Chrome Web Store, depending on your preferred platform.

“Efficiency: How Do You Do This in SAS?” looks at how to improve SAS efficiency, whether efficiency means speed of execution, ease of maintenance, or both. This paid-for app has had some of the answer text updated.

“Studio: How Do You Do This in SAS?” looks at the installation, configuration and uses of SAS Studio and SAS University Edition. This paid-for app now includes links about the licensing limits for using SAS University Edition, along with a summary of those restrictions.

The latest versions of all the apps can be found here.