22:06, 29th January 2022
The dm package in R provides a framework for managing and organising multiple data frames or database tables, enabling users to construct, manipulate and deploy relational data models efficiently. It offers a consistent set of tools for working with datasets, supporting dplyr-style operations alongside features such as visualisation of table relationships, automated join simplification and checks for data consistency and constraints.
Designed for both individual analysis and organisational use, dm facilitates the transition from in-memory datasets to large-scale relational databases, with deployment options to RDBMS systems. It can be installed from CRAN or GitHub and integrates seamlessly into existing workflows, allowing users to explore and refine complex data structures while ensuring accuracy through rigorous validation processes.
22:05, 29th January 2022
The connections package enhances database interaction in R by integrating DBI-compliant packages with the RStudio IDE’s Connection Pane, enabling users to manage database connections through a dedicated interface. It introduces functions such as connection_open and connection_close to establish and terminate connections, while also supporting dplyr operations like tbl and copy_to for working with database tables. Additionally, it extends compatibility with the pins package, allowing users to pin database connections and dplyr queries for reuse, with functions like connection_pin_write and connection_pin_read to save and retrieve these objects. Examples demonstrate its use with databases such as BigQuery and PostgreSQL, and it provides tools to refresh or view existing DBI connections outside its own opening functions.
22:05, 29th January 2022
The DBI package in R provides a standardised interface for connecting to database management systems, separating the connection process into front-end and back-end components. It supports operations such as establishing connections, executing queries, retrieving results, handling errors, managing transactions and accessing metadata, with implementations available through various backends like RPostgres, RSQLite and odbc.
Installation is typically automatic when using specific database packages, though it can be manually installed from CRAN or GitHub. An example demonstrates creating an in-memory SQLite database, writing and reading data and fetching query results in chunks. The package defines core classes including DBIDriver, DBIConnection and DBIResult, which are extended by individual backends to facilitate interaction with different databases.
22:03, 29th January 2022
Tidyverts
The tidyverts project offers a suite of R packages designed to bring tidy data principles to time series analysis. The core package, tsibble, provides temporal data frames and associated tools, while fable handles tidy forecasting and feasts focuses on feature extraction and statistics. Supporting these are tsibbledata, which supplies diverse datasets formatted for use with tsibble, along with additional packages including fable.prophet, which interfaces with the prophet forecaster, fable.binary for forecasting binary time series and tsibbletalk for producing interactive crosstalk graphics.
22:03, 29th January 2022
Pillow is a Python Imaging Library fork designed to extend image processing capabilities within Python, offering support for multiple file formats, efficient data handling and tools for image manipulation.
22:02, 29th January 2022
Plumber
The plumber package in R enables the creation of web APIs by adding roxygen2-like comments to existing R code, allowing functions to be exposed as endpoints through HTTP methods such as GET and POST. Parameters from query strings or JSON payloads are passed to functions as character strings, with examples demonstrating echo, histogram generation and arithmetic operations.
21:54, 29th January 2022
Working with GitHub in VS Code
Visual Studio Code offers extensive integration with GitHub, enabling users to manage repositories, create and review pull requests and work on issues directly within the editor. Key features include setting up authentication through the GitHub Pull Requests and Issues extension, cloning repositories and using the GitHub Repositories extension to browse and edit remote files without local cloning.
Editor enhancements such as hover previews and context-based suggestions streamline workflows, while the ability to switch branches and manage changes across development environments ensures flexibility. Users can also create pull requests, collaborate on issues and leverage tools like the Remote Explorer for accessing previously opened repositories. Additional support includes options to transition to local development or cloud-based environments, ensuring seamless continuation of work across different setups.
21:54, 29th January 2022
Documentation for Visual Studio Code
Visual Studio Code is a versatile code editor offering extensive documentation, tutorials and AI-assisted coding through GitHub Copilot, supporting multiple programming languages such as Python, JavaScript and Java. It integrates features like debugging, testing, version control and remote development environments, while a vast marketplace of extensions enhances functionality. The editor automatically updates and collects usage data by default, with options to disable these features and provides community support, forums and resources for troubleshooting and feature requests.
21:20, 29th January 2022
How the Bootstrap 4 Grid Works
The Bootstrap 4 grid system is a layout tool built around a structure of containers, rows and columns, powered by Flexbox. It follows three core rules: columns must be direct children of rows, rows exist solely to contain columns and rows should be placed inside a container.
Bootstrap 4 offers two container types, a fixed-width version and a full-width version, both of which serve to align content and counteract the negative margins applied to rows. The grid is based on a 12-column unit system, allowing for a wide variety of layout combinations, and also supports auto-layout columns that automatically size themselves without needing unit values.
Responsive behaviour is managed through five breakpoints tied to screen widths, ranging from the default extra-small tier up through small, medium, large and extra-large, with larger breakpoints overriding smaller ones. Columns can stack vertically, wrap when their combined units exceed 12, be reordered relative to sibling columns and be nested within one another. Because rows use Flexbox display, columns within the same row share equal height, and alignment can be controlled using Flexbox utility classes.
21:04, 29th January 2022
How to Open Link in New Tab with Hugo's new Goldmark Markdown Renderer
From version 0.62.0 onwards, Hugo replaced its previous Blackfriday Markdown renderer with Goldmark, which is CommonMark compliant. One consequence of this change is that the previous method of configuring links to open in a new browser tab, via a setting in the config.toml file, no longer works.
Goldmark instead supports Markdown Render Hooks, which allow developers to create custom HTML template files within the layouts/_default/_markup directory to modify default Markdown behaviour. To replicate the previous link behaviour and force external links to open in a new tab, a render-link.html file must be created in that directory containing a template that conditionally adds a target="_blank" attribute to any link beginning with http, whilst internal links using relative paths will continue to open in the same tab.