This file contains hidden or 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
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v2.json", | |
"vconcat": [ | |
{ | |
"data": { | |
"values": [ | |
{ | |
"enum": "victim.industry2.52", | |
"x": 471, | |
"n": 1935, |
This file contains hidden or 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 networkx as nx # NOTE: written against dev networkx 2.0 | |
import logging | |
import inspect | |
import json | |
logger = logging.getLogger() | |
fileLogger = logging.FileHandler("~/Documents/Development/tmp/vega.log") | |
fileLogger.setLevel(logging.DEBUG) | |
logger.addHandler(fileLogger) |
This file contains hidden or 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
#' Flip the x and y axis | |
#' | |
#' This is accomplished by updating the x & y marks, updating the flipping the | |
#' scales, and updating the axis labels. | |
#' | |
#' WARNING: This currently works for rectangular layer figures. It may not work with | |
#' multiple-layer figures, other marks, or signals. | |
#' | |
#' WARNING: No tests currently exist for this function | |
#' |
This file contains hidden or 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
{ | |
"$schema": "https://vega.github.io/schema/vega/v3.0.json", | |
"width": 500, | |
"height": 309, | |
"autosize": "pad", | |
"data": [ | |
{ | |
"name": ".", | |
"format": { | |
"type": "csv", |
This file contains hidden or 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
#' A function to find github issues which may have been closed w/o being added | |
#' | |
#' NOTE: Many github issues have 'na' for their issue #, leading to false positives | |
#' NOTE: Requires ghql package, currently only at https://github.com/ropensci/ghql | |
#' `devtools::install_github("ropensci/ghql")` | |
#' | |
#' @param veris a verisr dataframe | |
#' @param gh_token a github user token for api access | |
#' @return a list of github issue numbers not in veris | |
#' @export |
This file contains hidden or 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
# Copywrite Gabriel Bassett 2018 | |
# Not licensed for reuse | |
import copy | |
import operator | |
import uuid | |
import networkx as nx | |
import logging | |
import pprint | |
import simplejson as json |
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 15 columns, instead of 12 in line 7.
This file contains hidden or 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
enum,x,n,freq,method,x1,n1,shape1,shape2,mean,lower,upper,sig,y2,x2 | |
Hacking,1055,2215,0.4763,bayes,1055,2215,1055.5,1160.5,0.4763086642599278,0.45552701193652323,0.4971023064317177,0.050000011597819416,1,0 | |
Hacking,1055,2215,0.4763,bayes,1055,2215,1055.5,1160.5,0.4763086642599278,0.45552701193652323,0.4971023064317177,0.050000011597819416,1,0.005 | |
Hacking,1055,2215,0.4763,bayes,1055,2215,1055.5,1160.5,0.4763086642599278,0.45552701193652323,0.4971023064317177,0.050000011597819416,1,0.01 | |
Hacking,1055,2215,0.4763,bayes,1055,2215,1055.5,1160.5,0.4763086642599278,0.45552701193652323,0.4971023064317177,0.050000011597819416,1,0.015 | |
Hacking,1055,2215,0.4763,bayes,1055,2215,1055.5,1160.5,0.4763086642599278,0.45552701193652323,0.4971023064317177,0.050000011597819416,1,0.02 | |
Hacking,1055,2215,0.4763,bayes,1055,2215,1055.5,1160.5,0.4763086642599278,0.45552701193652323,0.4971023064317177,0.050000011597819416,1,0.025 | |
Hacking,1055,2215,0.4763,bayes,1055,2215,1055.5,1160.5,0.4763086642599278,0.45552701193652323,0.49710230643171 |
This file contains hidden or 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
enum | x | n | freq | shape1 | shape2 | x2 | y2 | |
---|---|---|---|---|---|---|---|---|
Web Applications | 581 | 2013 | 0.2886 | 581.5 | 1432.5 | 0 | 1 | |
Web Applications | 581 | 2013 | 0.2886 | 581.5 | 1432.5 | 0.005 | 1 | |
Web Applications | 581 | 2013 | 0.2886 | 581.5 | 1432.5 | 0.01 | 1 | |
Web Applications | 581 | 2013 | 0.2886 | 581.5 | 1432.5 | 0.015 | 1 | |
Web Applications | 581 | 2013 | 0.2886 | 581.5 | 1432.5 | 0.02 | 1 | |
Web Applications | 581 | 2013 | 0.2886 | 581.5 | 1432.5 | 0.025 | 1 | |
Web Applications | 581 | 2013 | 0.2886 | 581.5 | 1432.5 | 0.03 | 1 | |
Web Applications | 581 | 2013 | 0.2886 | 581.5 | 1432.5 | 0.035 | 1 | |
Web Applications | 581 | 2013 | 0.2886 | 581.5 | 1432.5 | 0.04 | 1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
# https://population.un.org/wpp/Download/Standard/Population/ | |
pop <- readr::read_csv("~/Documents/Data/covid19/population.csv") %>% | |
select(`Region, subregion, country or area *`, `Country code`, `2020`) %>% | |
rename(name = `Region, subregion, country or area *`, alpha_3 = `Country code`, population=`2020`) %>% | |
mutate(population = as.integer(gsub(" ", "", population))) %>% | |
mutate(population = population * 1000) %>% | |
glimpse() | |
# From https://github.com/CSSEGISandData/COVID-19 | |
covid <- readr::read_csv("~/Documents/Development/COVID-19/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv") %>% |