Skip to content

Instantly share code, notes, and snippets.

View ikashnitsky's full-sized avatar

Ilya Kashnitsky ikashnitsky

View GitHub Profile
@ikashnitsky
ikashnitsky / tidytuesday-190625-ufo.R
Created July 12, 2019 15:35
Calendar plot of UFO sightings, 2000--2013
#===============================================================================
# 2019-07-12 -- tidytuesday
# Data on UFO sightings ,2019-06-25
# Ilya Kashnitsky, [email protected]
#===============================================================================
# load required packages
library(tidyverse)
library(janitor)
library(sf)
#===============================================================================
# 2019-07-19-- ikashnitsky.github.io
# Reproduce Figure 2 from http://doi.org/10.1007/s10708-018-9953-5
# Ilya Kashnitsky, [email protected]
#===============================================================================
library(tidyverse)
library(hrbrthemes); import_roboto_condensed()
# the data as tribble
@ikashnitsky
ikashnitsky / dataviz-rules.R
Last active November 8, 2019 20:27
Simple rules and tricks to improve dataviz communication | slides: https://ikashnitsky.github.io/share/1911-prc20-dataviz/slides.html#/
#===============================================================================
# 2019-11-08 PRC dataviz workshop
# Simple rules and tricks to improve dataviz communication
# slides: https://ikashnitsky.github.io/share/1911-prc20-dataviz/slides.html#/
# Ilya Kashnitsky, [email protected]
#===============================================================================
library(tidyverse)
library(magrittr)
@ikashnitsky
ikashnitsky / pal-safe-five-and-six.R
Last active January 17, 2020 13:43
Safe and efficient palette of five colors for R -- https://twitter.com/ikashnitsky/status/1200570023334559745
#===============================================================================
# 2019-11-30 -- gist
# Safe and efficient palette of five colors, print and colorblind friendly
# Ilya Kashnitsky, [email protected]
#===============================================================================
library(magrittr)
library(prismatic)
# a function to test color paletes quickly
#===============================================================================
# 2019-12-07 -- twitter
# Generate snow and animate it
# Ilya Kashnitsky, [email protected]
#===============================================================================
library(tidyverse)
library(magrittr)
library(gganimate)
@ikashnitsky
ikashnitsky / us-names-median-age.R
Last active December 9, 2019 00:44
Median age of the US living persons with a specific name -- https://twitter.com/ikashnitsky/status/1201770729282424832
#===============================================================================
# 2019-12-08 -- digital dem
# Lab 1 -- Popularity of the US names
# Ilya Kashnitsky, [email protected]
#===============================================================================
# Data: https://www.ssa.gov/oact/babynames/limits.html
# Post: https://fivethirtyeight.com/features/how-to-tell-someones-age-when-all-you-know-is-her-name
# Gist: https://gist.github.com/ikashnitsky/654965cb971f3a11928806c4d0a0ef23
# Tweet: https://twitter.com/ikashnitsky/status/1201770729282424832
@ikashnitsky
ikashnitsky / countries-as-snowflakes.R
Last active December 12, 2019 20:07
Generate snowfall -- every snowflake scaled to a country population size ^1/3
#===============================================================================
# 2019-12-12 -- twitter
# Generate snowfall -- every snowflake scaled to a country population size ^1/3
# Ilya Kashnitsky, [email protected]
#===============================================================================
library(tidyverse)
library(magrittr)
library(gganimate)
@ikashnitsky
ikashnitsky / explain-map-borders.R
Last active January 1, 2023 17:33
Give an example how and why to use line borders instead of polygons outlines in maps -- https://ikashnitsky.github.io/2023/map-borders
#===============================================================================
# 2020-04-08 -- twitter upd 2023-01-01 ik-q
# Showcase the map hack -- use border lines instead of polygon outlines
# https://twitter.com/ikashnitsky/status/1247875600305598464
# https://ikashnitsky.github.io/2023/map-borders
# Ilya Kashnitsky, [email protected]
#===============================================================================
library(tidyverse)
library(sf)
@ikashnitsky
ikashnitsky / talk-links-st.andrews.md
Last active April 17, 2020 19:06
Links for the talk on COVID-19 given to St. Andrews demographers
@ikashnitsky
ikashnitsky / noymer-gut-check.r
Created May 6, 2020 10:33
Andrew Noymer's US death tolls gut-check estimates published daily on Twitter
#===============================================================================
# 2020-05-06 -- twitter
# Andrew Noymer's update of the total US covid deaths
# Ilya Kashnitsky, [email protected]
#===============================================================================
library(rtweet)
library(httr)
library(tidyverse)
library(hrbrthemes)