Skip to content

Instantly share code, notes, and snippets.

View subasish's full-sized avatar

Subasish Das subasish

View GitHub Profile
@paulmillr
paulmillr / active.md
Last active April 23, 2024 17:32
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@abresler
abresler / tufte
Last active July 4, 2023 18:56
Recreating Edward Tufte's New York City Weather Visualization
library(dplyr)
library(tidyr)
library(magrittr)
library(ggplot2)
"http://academic.udayton.edu/kissock/http/Weather/gsod95-current/NYNEWYOR.txt" %>%
read.table() %>% data.frame %>% tbl_df -> data
names(data) <- c("month", "day", "year", "temp")
data %>%
group_by(year, month) %>%
library(tmap)
library(tidycensus)
options(tigris_use_cache = TRUE)
sf::sf_use_s2(FALSE)
tarrant_housing <- get_acs(
geography = "tract",
state = "TX",
county = "Tarrant",
variables = c(
@chris-prener
chris-prener / bivariateMapping.R
Last active August 28, 2019 05:18
Adaptation of Grossenbacher/Zehr Bivariate Tutorial
# Bivariate Choropleth Map
## this is based on Timo Grossenbacher and Angelo Zehr's tutorial -
## https://timogrossenbacher.ch/2019/04/bivariate-maps-with-ggplot2-and-sf/
# dependencies
library(dplyr) # data wrangling
library(ggplot2) # plotting
library(purrr) # iteration
library(tidyr) # data wrangling
@dennislwm
dennislwm / Jurka_03_spam_RTextTools.R
Created February 28, 2013 13:34
Classifying Emails as Spam or Ham using RTextTools
suppressPackageStartupMessages(require(RTextTools))
suppressPackageStartupMessages(require(tm))
source("C:/Users/denbrige/100 FxOption/103 FxOptionVerBack/080 Fx Git/R-source/PlusReg.R", echo=FALSE)
spam.dir <- paste0(RegGetRNonSourceDir(), "spamassassin/")
get.msg <- function(path.dir)
{
con <- file(path.dir, open="rt", encoding="latin1")
text <- readLines(con)
msg <- text[seq(which(text=="")[1]+1,length(text),1)]
close(con)
@simecek
simecek / facebook_mining.r
Created January 18, 2012 18:26
Facebook Mining
# go to 'https://developers.facebook.com/tools/explorer' to get your access token
access_token <- "******************* INPUT YOUR ACCESS TOKEN ******************************"
require(RCurl)
require(rjson)
# Facebook json function copied from original (Romain Francois) post
facebook <- function( path = "me", access_token, options){
if( !missing(options) ){
options <- sprintf( "?%s", paste( names(options), "=", unlist(options), collapse = "&", sep = "" ) )