josiahparry / youtube-tutorials Goto Github PK
View Code? Open in Web Editor NEWCode and slides used for youtube videos
Home Page: https://josiahparry.github.io/youtube-tutorials/
Code and slides used for youtube videos
Home Page: https://josiahparry.github.io/youtube-tutorials/
rlang::inject() lets you inject parameters using !!!
partially. Rather than having a list of arguments that you need to pass in using do.call
use case bringing this up:
item_res <- rlang::inject(
add_item(
x,
title,
user = user,
host = host,
token = token,
!!!adtl_args
)
)
Focus on simple feature standard then how they are implemented in R
Most analyses that use aerial geometries utilize row standardized weights because there is not good theoretical reason to apply diifferent weights.
If, however, we have a good reason to use polygon centroids or, probably more approrpiately, using point data, we can use kernel weights. Kernel weights are used to introduce a decay function ito our weighting.
Say we have a point with 8 neighbors which are not at a uniform distance away. How much weight should we give each location in our subsequent calculations? Should we really be allocating equal weight? Or, should we recognize that things that are closer likely have more impact than those that are further away
A good use case of say gaussian kernel weights is if we have a hexagonal grid of incidents that are fairly small. First order neighbors may be limiting and we want to include 2nd or third order neighbors, but those should have less weight.
example for diffusing code:
dplyr_but_later <- rlang::expr(library(dplyr))
rlang::eval_tidy(dplyr_but_later)
taking named arguments via dots, and collecting them into a list
make_new_list <- function(...) {
my_list <- rlang::list2(...)
my_list
}
splicing named list into argument
!!!
splice_dfs <- function(...) {
args <- rlang::list2(...)
dplyr::bind_rows(!!!args)
}
# equivalent
splice_dfs <- function(...) {
args <- rlang::list2(...)
dplyr::bind_rows(rlang::splice(args))
}
alt + tab configuration
why it's friggin sweet.
Please leave your suggestions or other topics below
DONT pass the whole ass data frame
pass just the columns you need
||
vs &&
imagine implementing a scalar
e.g.
scalar(x, ptype = character()
(with inspo from vctrs)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.