17:02, 10th May 2021
Free SAS Training
SAS offers a range of free online training courses, trials and resources designed to develop data analytics and AI skills, with options tailored for different roles and career paths. These include courses on responsible innovation, generative AI, data science and statistical concepts, alongside subscriptions providing access to over 200 courses. Additional resources such as practice exams, e-books and documentation are available, along with academic discounts for students and educators. The organisation also hosts events like SAS Innovate 2026, where attendees can explore advancements in data and AI technologies.
09:43, 5th May 2021
Groovy : tokenize() vs split()
In Groovy, two methods are used to split strings into tokens: tokenise() and split(), each with distinct characteristics. The tokenise() method returns a list and ignores empty tokens created by consecutive delimiters, while split() returns a string array and retains such empty entries. Also, tokenise treats each character in a specified delimiter string individually, whereas split uses the entire string as a delimiter. Additionally, split supports regular expressions for delimiters, a feature absent in tokenise. These differences influence how each method handles various splitting scenarios, making the choice between them dependent on specific requirements, such as the need for regex patterns or the handling of empty strings.
10:49, 9th April 2021
Top 10 Python Libraries Data Scientists should know in 2021
For data scientists working with Python, there are ten libraries that stand out as particularly valuable and widely used. Pandas serves as the foundation for data exploration and cleaning, while NumPy provides robust support for multidimensional arrays and numerical computation. Scikit-learn is the go-to library for building both supervised and unsupervised machine learning models, and Gradio enables rapid deployment of those models as interactive web applications. TensorFlow and Keras are the primary tools for developing neural networks, with TensorFlow excelling in scalability and Keras offering a more straightforward approach to building deep learning models. SciPy extends NumPy with scientific and mathematical functions, and Statsmodels draws from multiple libraries to support rigorous statistical modelling and testing. Rounding out the list are two visualisation libraries, Plotly and Seaborn, which offer powerful and visually appealing ways to explore and present data, with Plotly also supporting interactive dashboards through its companion tool, Dash.
09:14, 2nd April 2021
Advanced Bash-Scripting Guide
The collection of scripts and examples presented spans a wide range of topics, from fundamental shell scripting techniques to complex data manipulation and algorithmic challenges. It includes demonstrations of array operations, recursive functions and process management, alongside practical utilities for file handling, text processing and system interaction.
Many entries focus on problem-solving through scripting, such as implementing mathematical sequences, sorting algorithms and game logic, while others explore the integration of shell commands with higher-level languages like Perl and Python. The material also addresses common pitfalls in scripting, such as handling subshells and managing variable scope, and provides insights into creating interactive tools, progress bars and user interfaces with colourised output.
Educational examples, including games like Nim and the Knight's Tour, illustrate how scripting can be applied to both functional and recreational purposes. The collection serves as a comprehensive resource for understanding the versatility of shell scripting, its role in automation and its potential for tackling diverse computational tasks.
14:00, 9th March 2021
The %SYSEVALF macro function in SAS programming evaluates arithmetic and logical expressions using floating-point arithmetic, returning results formatted as text. It supports conversion types such as BOOLEAN, CEIL, FLOOR and INTEGER, which modify the output format for use in other expressions.
While it handles floating-point values and missing data, it does not support the IN logical operator directly, requiring the %EVAL function for such cases. Examples demonstrate its application in calculations involving numerical operations and conditional logic, such as determining discounts based on product categories. The function is particularly useful for scenarios requiring precise numerical evaluations within macro code, ensuring compatibility with subsequent operations that depend on specific data types.
13:59, 9th March 2021
The %DATATYP autocall macro in SAS is used to determine whether a given value is numeric or character in nature. When the argument consists of digits, a leading plus or minus sign, a decimal point or a scientific or floating-point exponent, the macro returns the value NUMERIC; otherwise, it returns CHAR. It does not recognise hexadecimal numbers.
The macro requires the MAUTOSOURCE system option to function and is drawn from a library supplied by SAS, which may not be available at all sites or may exist in a site-specific version, in which case on-site SAS support personnel should be consulted. A practical use of the macro is to validate inputs before performing arithmetic operations, as demonstrated by an example in which an addition macro checks that both of its arguments are numeric before attempting a calculation, logging an error message if either argument fails that check.
10:52, 3rd March 2021
Leaflet
An open-source JavaScript library designed for creating mobile-friendly interactive maps, Leaflet offers a lightweight solution with minimal file size and a focus on simplicity, performance and usability. It supports a wide range of mapping features including tile layers, markers, vector shapes and image overlays, along with interactive elements such as drag panning, zooming and keyboard navigation. The library provides smooth animations, customisable visual components and compatibility with various map projections, while its modular structure allows for efficient feature inclusion. Leaflet is supported across major desktop and mobile browsers and its development is driven by a community of contributors, with widespread adoption by organisations in both public and private sectors.
18:43, 2nd March 2021
Formatting Numeric Print Output in Java
Java's printf and format methods, part of the PrintStream class in the java.io package, offer developers far greater control over numeric output than the basic print and println methods. Both methods function identically and accept a format string alongside a variable number of arguments, using special format specifiers that begin with a percent sign and end with a converter character to define how each value should be displayed. These specifiers can handle decimal integers, floating-point numbers, newline characters and date or time values, with optional flags allowing for controls such as width, decimal precision, left justification, leading zeroes and locale-specific formatting. For scenarios requiring even finer control, the DecimalFormat class provides a pattern-based approach to managing grouping separators, decimal separators, prefixes, suffixes and leading or trailing zeroes, though at the cost of added code complexity.
18:42, 2nd March 2021
Excel VBA – Read Data from a Closed Excel File or Workbook without Opening it
A practical method exists in VBA for automatically pulling data from a closed Excel file into a destination workbook without manually opening the source file. By writing a procedure within the Workbook\_Open() event of the destination file, the process triggers automatically each time that file is opened. The approach involves briefly opening the source workbook in read-only mode behind the scenes, counting its rows, iterating through the data and copying it across to the destination file, before closing the source again without saving.
Setting the Application.ScreenUpdating property to false during this process helps improve speed and prevents any visual disruption on screen. The result is a reliable, largely automated solution that reduces manual effort, minimises errors and ensures that anyone opening the destination file will always see the most current figures drawn from the source.
18:41, 2nd March 2021
How to create stunning visualisations from scratch using Python
Visualisation is a core skill for data scientists, as it helps communicate analytical insights clearly and allows the human brain to identify patterns and trends far more readily than through other means. Using Python's Matplotlib and Seaborn libraries, it is possible to build a wide range of charts, from basic trend lines and scatter plots to bar charts, pie charts, donut charts and heatmaps.
Matplotlib offers extensive customisation and underpins many other Python visualisation libraries, though it requires more lines of code to produce polished results. Seaborn, which is built on top of Matplotlib, addresses this by enabling attractive, ready-to-use charts with minimal coding, making it particularly well suited to exploratory data analysis. One of its most useful features is the pair plot, which compares every attribute in a dataset against every other attribute in a single line of code.
Beyond static images, Python also supports the creation of interactive charts that can be exported as HTML files and opened in a browser, giving audiences the ability to zoom and explore data in greater detail. Data transformation using the Pandas library is an important preparatory step throughout, ensuring datasets are structured appropriately before any chart is produced.