Skip to content

Instantly share code, notes, and snippets.

View alramadona's full-sized avatar

Aditya Ramadona alramadona

View GitHub Profile
library(dplyr)
library(rio)
library(data.table)
pst_20152016 <- import("D:/Projects/Data Sampel BPJS Kesehatan Edisi August2019/01 KEPESERTAAN 260819.dta")
kunFKL_20152016 <- import("D:/Projects/Data Sampel BPJS Kesehatan Edisi August2019/04 FKRTL 260819.dta")
kunFKP_20152016 <- import("D:/Projects/Data Sampel BPJS Kesehatan Edisi August2019/02 FKTP Kapitasi 260819.dta")
kunPNK_20152016 <- import("D:/Projects/Data Sampel BPJS Kesehatan Edisi August2019/03 FKTP Non Kapitasi 260819.dta")
# FKLdx2nd <- import("D:/Projects/Data Sampel BPJS Kesehatan Edisi August2019/05 FKRTL Diagnosis Sekunder 260819.dta")
@tylermorganwall
tylermorganwall / india_historical_map.R
Last active February 25, 2024 18:22
Historical Map of India with 3D elevation
library(raster)
library(rayshader)
#Load QGIS georeference image (see https://www.qgistutorials.com/en/docs/3/georeferencing_basics.html)
testindia = raster::stack("1870_southern-india_modified.tif")
#Set bounding box for final map (cut off edges without data, introduced via reprojection)
india_bb = raster::extent(c(68,92,1,20))
cropped_india = raster::crop(testindia, india_bb)
#Convert to RGB array
@Joaobazzo
Joaobazzo / gist:70910d5578d04a3f34f1f31ae924bd50
Last active May 2, 2020 18:54
Google maps GPS locations due to COVID in Brazil
rm(list=ls())
library(data.table)
library(dplyr)
library(ggplot2)
library(viridis)
library(stringr)
library(patchwork)
google <- data.table::fread("data-raw/Global_Mobility_Report_google.csv")
google <- google[country_region %in% "Brazil",]
@jeroen
jeroen / cranscraper.R
Last active January 17, 2021 17:15
Fast scraping of package metadata using curl multi API
# Globals
repos <- 'https://cloud.r-project.org'
pkgdata <- available.packages(repos = repos)
pkgs <- row.names(pkgdata)
# On success
make_callback <- function(i, url){
function(res){
if(res$status == 200){
buf <- rawConnection(res$content)