This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import pyarrow as pa | |
import pyarrow.parquet as pq | |
import fastavro | |
import os | |
np.random.seed(0) # for reproducibility | |
region = np.random.choice(["Europe", "North America", "Latin America", "Asia"], 10000000, p=[0.3, 0.5, 0.1, 0.1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snippet shiny:module | |
${1:name}UI <- function(id) { | |
ns <- NS(id) | |
tagList( | |
${0} | |
) | |
} | |
${1:name}Server <- function(id) { | |
moduleServer( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(future) | |
library(promises) | |
plan(multisession, workers = 4) | |
ui <- fluidPage( | |
tags$head( | |
tags$style( | |
HTML(" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
data <- tibble::tibble( | |
x = c(1, 2, NA, 2, NA), | |
y = c("a", NA, "b", NA, "b"), | |
z = c("x", NA, "y", NA, NA) | |
) | |
# Get counts of NA values for each column in a data frame | |
data %>% |