Welcome to blockr – blockr
R
altdoc
Package Development – Data Science
Data Table Back-End for dplyr
Provides a data.table backend for dplyr. The goal of dtplyr is to allow you to write dplyr code that is automatically translated to the equivalent, but usually much faster, data.table code.
Wrappers for GDAL Utilities Executables
Rs sf package ships with self-contained GDAL
executables, including a bare bones interface to several
GDAL-related utility programs collectively known as the GDAL
utilities. For each of those utilities, this package provides an
R wrapper whose formal arguments closely mirror those of the
GDAL command line interface. The utilities operate on data
stored in files and typically write their output to other
files. Therefore, to process data stored in any of Rs more common
spatial formats (i.e. those supported by the sf and terra
packages), first write them to disk, then process them with the
package's wrapper functions before reading the outputted results
back into R. GDAL function arguments introduced in GDAL version
3.5.2 or earlier are supported.
elipousson/sfext: ✂️🌐 A R package with extra options for simple features and spatial data
✂️🌐 A R package with extra options for simple features and spatial data - elipousson/sfext
Chapter 9 Making maps with R | Geocomputation with R
Prerequisites This chapter requires the following packages that we have already been using: library(sf) library(terra) library(dplyr) library(spData) library(spDataLarge) The main package used in...
Understanding Your Topographic Map Maker
The first-ever topographic maps were said to have been formed by the British in the late 18th century, and soon after, the US followed suit. Back then, the US had a department called the “Topographical Bureau of the Army,” which used these maps to plan tactical strategies during the War of 1812. However, even when the war ended, our interest in topography remained.
The term “topography” comes from a combination of two Greek words: “topo,” which means place, and “graphia,” which means writing. It is used to describe the study of a region’s forms and features, primarily to show their relative positions and elevations. Topography could refer to the forms and features themselves or a depiction of them (such as a map).
Unlike traditional maps which only represent the land horizontally, one made with a topographic map maker will represent the land vertically as well. These maps, also referred to as topo maps, show the form and elevation of an area, including the location and shape of hills, valleys, mountains, streams, and other natural or human-made features.
Contour Lines
Contour lines are the primary way in which topographic maps depict elevation. These imaginary lines connect points of equal elevation in order to present three-dimensional information on a two-dimensional map. This allows the viewer to visualize the height and shape of mountains, the depth of canyons, and the location of flat plains.
To determine the exact elevation of a location, you’ll need to know the contour interval – the difference in elevation between two contour lines. This will vary depending on the map, but regardless, you can calculate them yourself fairly easily. First, find the bolded contour lines that contain a number. These are the index contours, and the number is the elevation at the line.
Then, count the number of contour lines between each index contour, and divide the difference in elevation by that number. For instance, if you had one index contour with an elevation of 7,800 five contour lines apart from another index with an elevation of 8,000, the contour interval would be 40 ( (8,000 - 7,800) / 5 = 40 ).
The contour lines produced by your topographic map maker are often used to determine the slope or steepness of an area. The lines will be spaced farther apart when the slope is gentle, and closer together when the slope is steep. This is because, in steep areas, the elevation will increase at a greater frequency, so the lines will appear closer together. A completely flat meadow will have no contour lines, while a vertical cliff will have contour lines that are stacked on top of one another.
Features
You can also use contour lines to identify features of the land.
Peaks and Depressions: The innermost ring at the center of several other rings will typically represent a peak, but in some cases, it could represent a depression.
Valleys: A valley is a type of depression in which water could flow down (if water is present), and they can be identified by their V or U shaped contour lines that point towards higher elevation (the peak).
Cliffs: When two or more lines join together to form a single line, they represent a cliff. However, if the change in elevation isn’t great enough to call for another contour line, the cliff may not appear on the map.
Ridges: A ridge is a chain of mountains or hills that create a continuous summit for an extended distance. These can be identified by V or U shaped contours that point towards lower elevation.
Saddles: A saddle is a low spot between two higher points of elevation, and on a topographic map, they appear as hourglass shaped contour lines.
USEPA/elevatr: An R package for accessing elevation data
An R package for accessing elevation data
Spatial data with terra — R Spatial
401 Unauthorized vs 403 Forbidden
Find the key differences between HTTP status codes 401 Unauthorized and 403 Forbidden with tabular comparison including when to use each in API development, with practical examples.
401 Unauthorized vs 403 Forbidden
In web development, ensuring access control is essential in safely and efficiently managing APIs. The meanings of 401 Unauthorized and 403 Forbidden are sometimes confused. Nonetheless, both codes have to do with restricted resources, but they serve different purposes. In this article, we will explain the codes and instruct you on which one to use.
401 Unauthorized?
The response is an HTTP error code for a request lacking valid authentication credentials from a client is referred to as the 401 Unauthorized status code. That being said, it means that before accessing the requested resource, it’s necessary for the server to authenticate itself to the client. If no credentials are provided or if wrong ones are given by the client, then what follows is a 401 status code.
When to Use 401 Unauthorized
Use 401 Unauthorized when:
No authentication details have been received yet from the client.
The authentication information supplied – username and password/token – is not valid/has expired.
There is no authorization header present in your requests like “Authorization.”
For instance, if an API demands Bearer token for access but this token has not been included in any request or is incorrect it will issue back a response having HTTP status code 401 Unauthorized (the most common case).
403 Forbidden?
The reason for using a 403 Forbidden status code is when the server recognizes the request, the client has been authenticated, but the client does not have permission to access the requested resource. It means that in this case, a client is known while a server intentionally turns down fulfilling the request because of inadequate privileges.
When to Use 403 Forbidden
Use 403 Forbidden when:
Authenticated clientele lack sufficient permissions to reach given resources.
Server denies resource access irrespective of client’s authentication state.
Client’s access to resources is prohibited by any form of an access control system.
For instance, an authorized user may try accessing an admin only page without having adequate role. Even if one gets logged in, the response will indicate 403 Forbidden if they do not have sufficient rights.
blockr/inst/shinylive/tools.R at main · BristolMyersSquibb/blockr
Composable, extensible no-code UI
How to Easily Capture and Test Code Output in R
Learn methods to capture and test code output in R, including snapshot testing, dput, and constructive package.
Databot is not a flotation device - Posit
Databot is an exciting new LLM tool for exploratory data analysis, but to use it safely and effectively, you still need the critical skills of a data scientist.
Lightweight Object-Relational Mapper for R
oRm is a lightweight Object-Relational Mapper (ORM) for R. It simplifies database interactions by allowing users to define table models, insert and query records, and establish relationships between models without writing raw SQL. oRm uses a combination of DBI, dbplyr, and R6 to provide compatibility with most database dialects.
34 🏗 R6 – Shiny App-Packages
Getting your app into an R package
Distributing Extensions – Quarto
Lua API Reference – Quarto
Lua Development – Quarto
Creating Shortcodes – Quarto
Shortcodes – Quarto
Guide – Quarto
Comprehensive guide to using Quarto. If you are just starting out, you may want to explore the tutorials to learn the basics.
Client for 'toxiproxy'
Create chaotic proxies for services to test behaviour of
your clients and servers in the face of unreliable network
connections. Provides a client to the 'toxiproxy' API.
A personal history of the tidyverse
httr2 1.2.0 - Tidyverse
httr2 1.2.0 improves security for redacted headers, improves URL parsing and building, enhances debugging, and includes a bunch of other quality of life improvements.
Chapter 9 Use httptest2 | HTTP testing in R
In this chapter we aim at adding HTTP testing infrastructure to exemplighratia2 using httptest2. For this, we start from the initial state of exemplighratia2 again. Back to square one!...
Welcome | R for Geographic Data Science
Introduction to Spatial Data Programming with R
Intro to GIS and Spatial Analysis
This is a compilation of lecture notes that accompany my Intro to GIS and Spatial Analysis course.
Welcome | Geocomputation with R
Welcome | Geocomputation with R is for people who want to analyze, visualize and model geographic data with open source software. It is based on R, a statistical programming language that has powerful data processing, visualization, and geospatial capabilities. The book equips you with the knowledge and skills to tackle a wide range of issues manifested in geographic data, including those with scientific, societal, and environmental implications. This book will interest people from many backgrounds, especially Geographic Information Systems (GIS) users interested in applying their domain-specific knowledge in a powerful open source language for data science, and R users interested in extending their skills to handle spatial data.