- 데이터 출처: https://gist.github.com/cornchz/eb495322b97bd69362a2#file-lotteria-csv
- 주의사항
- 같은 위경도를 가지는 두 점이 있으면 voronoi가 깨짐
- 그래서
screen.py
로 중복되는 점들 filtering함
- 그래서
- 같은 위경도를 가지는 두 점이 있으면 voronoi가 깨짐
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 os | |
rfiles = os.listdir('.') | |
rc = [] | |
for f in rfiles: | |
if '.txt' in f: | |
# The recipes come in 3 txt files consisting of 1 recipe per line, the | |
# cuisine of the recipe as the first entry in the line, and all subsequent ingredient | |
# entries separated by a tab | |
infile = open(f, 'r') | |
rc.append(infile.read()) |
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
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
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(rgdal) | |
library(rgeos) | |
library(ggplot2) | |
library(readr) | |
library(tidyr) | |
library(dplyr) | |
library(grid) | |
us <- readOGR("us_states_hexgrid.geojson", "OGRGeoJSON") |
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
# Drawing a scatter plot of raster images | |
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("png", "sna") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# Go to https://www.gosquared.com/resources/2400-flags, download the ZIP, | |
# and put the 64 x 64 files into a directory of your choosing. | |
# Then setwd() to that directory: | |
setwd("C:/Dropbox/isDotR_Files/flagIcons") |
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
require "rubygems" | |
require "bundler" | |
require_relative "lib/importer" | |
Bundler.setup | |
desc "Import from Trello board" | |
task :import do | |
Importer.new(File.dirname(__FILE__)).import ENV["ISSUE"] | |
end |
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 | |
# http://blog.yhathq.com/static/misc/data/WineKMC.xlsx | |
df_offers = pd.read_excel("./WineKMC.xlsx", sheetname=0) | |
df_offers.columns = ["offer_id", "campaign", "varietal", "min_qty", "discount", "origin", "past_peak"] | |
df_offers.head() | |
df_transactions = pd.read_excel("./WineKMC.xlsx", sheetname=1) | |
df_transactions.columns = ["customer_name", "offer_id"] | |
df_transactions['n'] = 1 | |
df_transactions.head() |
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
belief | y2015 | y2014 | |
---|---|---|---|
Improves the security posture of my organization | 0.75 | 0.71 | |
Improves the security posture of the nations critical infrastructure | 0.63 | 0.64 | |
Reduces the cost of detecting and preventing cyber attacks | 0.22 | 0.21 | |
Improves situational awareness | 0.60 | 0.54 | |
Fosters collaboration among peers and industry groups | 0.48 | 0.51 | |
Enhances the timeliness of threat data | 0.11 | 0.16 | |
Makes threat data more actionable | 0.21 | 0.24 |
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 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
#Load library mass and set seed | |
library(MASS) | |
set.seed(100) | |
# We are going to use 3 random variables | |
m <- 3 | |
# Number of samples to be drawn | |
n <- 2000 |