This data is downloaded with a short python script from binlist.net. The script stores the bin info as a csv file.
Thanks to Dr.Ā Matt Hale
# read data from csv file
binData <- read.csv("./data/bin-list-hitcap.csv")
# Number of rows in the file
nrow(binData)
## [1] 11129
# Number of columns in the file
ncol(binData)
## [1] 10
Letās make sure we got something by plotting the frequency of binās associated with a country.
# build a table using frequency counts of the country_name column
countrytable <- as.data.frame(table(binData$country_name))
# subset the data for Freq > 50 and removing blanks and dashes
highcountcountries <- subset(countrytable, Freq > 50 & Var1 != "" & Var1 != "-")
# list it
highcountcountries[order(-highcountcountries$Freq),]
## Var1 Freq
## 163 United States 6717
## 130 Russian Federation 482
## 27 Brazil 300
## 143 Spain 211
## 160 Ukraine 145
## 142 South Korea 123
## 78 Italy 119
## 125 Poland 91
## 73 India 86
## 156 Turkey 84
## 9 Argentina 83
## 162 United Kingdom 82
## 75 Iraq 71
## 137 Serbia 67
## 149 Taiwan 63
## 38 China 56
## 94 Luxembourg 56
## 60 Germany 55
## 39 Colombia 53
## 12 Australia 51
# plot this
library("ggplot2")
q <- qplot(reorder(Var1,-Freq),Freq,data=highcountcountries,geom="auto",group=1, xlab = "Countries with more than 50 bins in 4000** range", ylab="# of Bins", main = "Geographic Distribution of Bins in the 4000** range")
q + theme(axis.text.x = element_text(angle = 90, hjust = 1))
Letās look at card types
# build a table using frequency counts of the card_type column
cardtypes <- as.data.frame(table(binData$card_type))
# list it after removing blanks and dashes
cardtypes <- subset(cardtypes, Var1 != "" & Var1 != "-")
cardtypes[order(-cardtypes$Freq),]
## Var1 Freq
## 4 DEBIT 3617
## 3 CREDIT 3388
# plot this
library("ggplot2")
q <- qplot(reorder(Var1,-Freq),Freq,data=cardtypes,geom="auto",group=1, xlab = "Card Types", ylab="# of Bins", main = "Card Type Distribution of Bins in the 4000** range")
q + theme(axis.text.x = element_text(angle = 90, hjust = 1))
Now it is the brands
# build a table using frequency counts of the brand column
brandtypes <- as.data.frame(table(binData$brand))
# list it after removing blanks and dashes
brandtypes <- subset(brandtypes, Var1 != "" & Var1 != "-")
brandtypes[order(-brandtypes$Freq),]
## Var1 Freq
## 3 VISA 11118
# plot this
library("ggplot2")
q <- qplot(reorder(Var1,-Freq),Freq,data=brandtypes,geom="auto",group=1, xlab = "Brand Types", ylab="# of Bins", main = "Brand Distribution of Bins in the 4000** range")
q + theme(axis.text.x = element_text(angle = 90, hjust = 1))
This appears to be all just VISA. That is expected
Letās look at card categories
# build a table using frequency counts of the card_category column
cardCategories <- as.data.frame(table(binData$card_category))
# list it after removing blanks and dashes
cardCategories <- subset(cardCategories, Var1 != "" & Var1 != "-")
cardCategories [order(-cardCategories$Freq),]
## Var1 Freq
## 4 CLASSIC 3436
## 3 BUSINESS 762
## 8 ELECTRON 753
## 15 PREMIER 639
## 13 PLATINUM 572
## 9 GOLD PREMIUM 232
## 16 PREPAID 223
## 7 CORPORATE T&E 118
## 12 INFINITE 35
## 6 CORPORATE T 28
## 21 SIGNATURE 27
## 19 PURCHASING 21
## 11 GSA CARD 11
## 22 TRAVEL MONEY 9
## 10 GOLD/PREM 4
## 17 PRIVATE LABEL 4
## 14 PLUS 2
## 18 PROPRIETARY 2
## 23 VISA CASH 2
## 5 CORPORATE 1
## 20 REBATE 1
# plot this
library("ggplot2")
q <- qplot(reorder(Var1,-Freq),Freq,data=cardCategories,geom="auto",group=1, xlab = "Card Categories", ylab="# of Bins", main = "Card Categories Distribution of Bins in the 4000** range")
q + theme(axis.text.x = element_text(angle = 90, hjust = 1))
Finally the banks themselves
# build a table using frequency counts of the bank column
banks <- as.data.frame(table(binData$bank))
# subset the data for Freq > 50 and remove blanks and dashes
freqBanks <- subset(banks, Freq > 25 & Var1 != "" & Var1 != "-")
# list it
freqBanks[order(-freqBanks$Freq),]
## Var1 Freq
## 739 CARD SERVICES FOR CREDIT UNIONS, INC. 342
## 1750 JPMORGAN CHASE BANK, N.A. 154
## 2970 WELLS FARGO BANK, N.A. 86
## 2969 WELLS FARGO BANK NEVADA, N.A. 82
## 1730 ITS BANK 72
## 2549 SERVICES C.U. 72
## 1269 FIA CARD SERVICES, N.A. 70
## 2954 WACHOVIA BANK, N.A. 60
## 602 BC CARD CO., LTD. 45
## 829 CHASE BANK USA, N.A. 43
## 1995 METABANK 41
## 320 BANCO DO BRASIL, S.A. 35
## 271 BANCO COOPERATIVO ESPANOL, S.A. 33
## 2818 U.S. BANK N.A. ND 33
## 2840 UNICARD BANCO MULTIPLO, S.A. 33
## 1387 FIRST NATIONAL BANK OF OMAHA 31
## 261 BANCO CITICARD, S.A. 26
# plot this
library("ggplot2")
q <- qplot(reorder(Var1,-Freq),Freq,data=freqBanks[order(-freqBanks$Freq),],geom="auto",group=1, xlab = "Banks", ylab="# of Bins", main = "Bank Distribution of Bins in the 4000** range")
q + theme(axis.text.x = element_text(angle = 90, hjust = 1))
# subset of banks with US country code
binDataUS <- subset(binData, country_code == "US")
# extract just the bank column as a data frame
USbanks <- as.data.frame(table(binDataUS$bank))
# subset of banks with more than 10 bins
USfreqBanks <- subset(USbanks, Freq > 10 & Var1 != "" & Var1 != "-")
# plot this
library("ggplot2")
q <- qplot(Freq, reorder(Var1,Freq), data=USfreqBanks,geom="auto",group=1, xlab = "# of Bins", ylab="US Banks")
q
One more thing! let us look at the crosstable of cards types and card categories in US banks
# cross-table for card type and card category
carddiversity <- as.data.frame(table(binDataUS$card_type,binDataUS$card_category))
# plot it
g <- ggplot(carddiversity, aes(Var1, Var2)) + geom_point(aes(size = Freq), colour = "grey") + xlab("Card Type") + ylab("Card Category")
g + scale_size_continuous(range=c(10,30)) + geom_text(aes(label = Freq))
OK one last thing. Look at some bins for a particular US bankā¦say Wells Fargo
# US only
binDataUS <- subset(binData, country_code == "US")
# reset factors after subsetting
binDataUS$country_code <- factor(binDataUS$country_code)
# wellsFargo bins only
wellsfargoBins <- subset(binDataUS, grepl("^WELLS", toupper(binDataUS$bank)))
# reset factors after subsetting
wellsfargoBins$bank <- factor(wellsfargoBins$bank)
# plot this
q <- qplot(Freq, reorder(Var1,-Freq), data=as.data.frame(table(wellsfargoBins$bank)),geom="auto",group=1, ylab = "Banks", xlab="# of Bins")
q + theme(axis.text.x = element_text(angle = 90, hjust = 1))
# Actual bins sorted and then by bank name
wellsfargoBins[ order(wellsfargoBins$bin, wellsfargoBins$bank), c("bin", "bank", "card_type", "card_category")]
## bin bank card_type card_category
## 1159 401158 WELLS FARGO BANK IOWA, N.A. DEBIT CLASSIC
## 1372 401371 WELLS FARGO BANK, N.A.
## 1373 401372 WELLS FARGO BANK, N.A.
## 1374 401373 WELLS FARGO BANK, N.A.
## 1375 401374 WELLS FARGO BANK, N.A.
## 1393 401392 WELLS FARGO BANK, N.A.
## 1394 401393 WELLS FARGO BANK, N.A.
## 1395 401394 WELLS FARGO BANK, N.A.
## 1396 401395 WELLS FARGO BANK, N.A.
## 1397 401396 WELLS FARGO BANK, N.A.
## 1646 401645 WELLS FARGO BANK IOWA, N.A. DEBIT CLASSIC
## 1656 401655 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 1671 401670 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 1672 401671 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 1829 401828 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 1976 401975 WELLS FARGO BANK, N.A. CREDIT PLATINUM
## 1978 401977 WELLS FARGO BANK, N.A. CREDIT CLASSIC
## 2137 402136 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 2232 402231 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 2239 402238 WELLS FARGO BANK IOWA, N.A. DEBIT PREPAID
## 2242 402241 WELLS FARGO BANK IOWA, N.A. DEBIT CLASSIC
## 2490 402489 WELLS FARGO BANK, N.A.
## 3098 403097 WELLS FARGO BANK, N.A. CREDIT PLATINUM
## 3122 403121 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3123 403122 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3127 403126 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3129 403128 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3130 403129 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3131 403130 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3134 403133 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3136 403135 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3137 403136 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3138 403137 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3139 403138 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3140 403139 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3141 403140 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3459 403458 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3540 403539 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 3701 403700 WELLS FARGO BANK, N.A. CREDIT PREMIER
## 3719 403718 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 3791 403790 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 4005 404004 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4011 404010 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4014 404013 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4015 404014 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4016 404015 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4017 404016 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4018 404017 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4019 404018 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4020 404019 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4021 404020 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4022 404021 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4023 404022 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4024 404023 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4025 404024 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4026 404025 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4029 404028 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4030 404029 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4031 404030 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4032 404031 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4033 404032 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4034 404033 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4038 404037 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4039 404038 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4040 404039 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4041 404040 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4045 404044 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4046 404045 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4047 404046 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4048 404047 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4049 404048 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4051 404050 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4052 404051 WELLS FARGO BANK NEVADA, N.A. DEBIT PREPAID
## 4053 404052 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4054 404053 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4055 404054 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4056 404055 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4057 404056 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4058 404057 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4061 404060 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4062 404061 WELLS FARGO BANK NEVADA, N.A. DEBIT BUSINESS
## 4065 404064 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4066 404065 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4067 404066 WELLS FARGO BANK NEVADA, N.A. DEBIT PREPAID
## 4068 404067 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4069 404068 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4071 404070 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4074 404073 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4075 404074 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4076 404075 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4077 404076 WELLS FARGO BANK NEVADA, N.A. DEBIT BUSINESS
## 4078 404077 WELLS FARGO BANK NEVADA, N.A. DEBIT PREPAID
## 4084 404083 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4085 404084 WELLS FARGO BANK NEVADA, N.A. DEBIT PREPAID
## 4087 404086 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4088 404087 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4089 404088 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4090 404089 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4091 404090 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4092 404091 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 4094 404093 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4095 404094 WELLS FARGO BANK NEVADA, N.A. DEBIT PREPAID
## 4096 404095 WELLS FARGO BANK NEVADA, N.A. DEBIT PREPAID
## 4097 404096 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4098 404097 WELLS FARGO BANK NEVADA, N.A. DEBIT PREPAID
## 4099 404098 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4100 404099 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 4610 404609 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 4682 404681 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 5001 405000 WELLS FARGO BANK, N.A. CREDIT CLASSIC
## 5011 405010 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 5012 405011 WELLS FARGO BANK ARIZONA, N.A.
## 5013 405012 WELLS FARGO BANK ARIZONA, N.A.
## 5016 405015 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 5018 405017 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 5019 405018 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 5021 405020 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 5024 405023 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 5027 405026 WELLS FARGO BANK ARIZONA, N.A.
## 5028 405027 WELLS FARGO BANK ARIZONA, N.A.
## 5036 405035 WELLS FARGO BANK NEVADA, N.A. DEBIT CLASSIC
## 5041 405040 WELLS FARGO BANK ARIZONA, N.A.
## 5042 405041 WELLS FARGO BANK ARIZONA, N.A.
## 5061 405060 WELLS FARGO BANK ARIZONA, N.A.
## 5063 405062 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 5064 405063 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 5079 405078 WELLS FARGO BANK ARIZONA, N.A.
## 5083 405082 WELLS FARGO BANK ARIZONA, N.A.
## 5084 405083 WELLS FARGO BANK ARIZONA, N.A.
## 5379 405378 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 5524 405523 WELLS FARGO BANK, N.A.
## 5525 405524 WELLS FARGO BANK, N.A.
## 5610 405609 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 5714 405713 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 5715 405714 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 6099 406098 WELLS FARGO BANK NEVADA, N.A. CREDIT GOLD PREMIUM
## 7111 407110 WELLS FARGO BANK, N.A. CREDIT PLATINUM
## 7164 407163 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 7185 407184 WELLS FARGO BANK, N.A. CREDIT GOLD PREMIUM
## 7189 407188 WELLS FARGO BANK, N.A. CREDIT GOLD PREMIUM
## 7196 407195 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 7222 407221 WELLS FARGO BANK, N.A. CREDIT CLASSIC
## 7223 407222 WELLS FARGO BANK, N.A. CREDIT SIGNATURE
## 7777 407776 WELLS FARGO BANK, N.A. CREDIT CLASSIC
## 7781 407780 WELLS FARGO BANK, N.A. CREDIT CLASSIC
## 7783 407782 WELLS FARGO BANK, N.A. CREDIT CLASSIC
## 7792 407791 WELLS FARGO BANK, N.A. CREDIT CLASSIC
## 7795 407794 WELLS FARGO BANK, N.A. CREDIT CLASSIC
## 8001 408000 WELLS FARGO BANK NEVADA, N.A. CREDIT CLASSIC
## 8006 408005 WELLS FARGO BANK ARIZONA, N.A.
## 8007 408006 WELLS FARGO BANK ARIZONA, N.A.
## 8008 408007 WELLS FARGO BANK ARIZONA, N.A.
## 8010 408009 WELLS FARGO BANK ARIZONA, N.A.
## 8011 408010 WELLS FARGO BANK, N.A.
## 8127 408126 WELLS FEDERAL BANK, F.S.B. CREDIT CLASSIC
## 8128 408127 WELLS FEDERAL BANK, F.S.B. CREDIT PREMIER
## 8190 408189 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 8629 408628 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 8850 408849 WELLS FARGO BANK, N.A.
## 8851 408850 WELLS FARGO BANK, N.A.
## 8862 408861 WELLS FARGO BANK, N.A.
## 8909 408908 WELLS FARGO BANK, N.A.
## 8938 408937 WELLS FARGO BANK, N.A.
## 8953 408952 WELLS FARGO BANK, N.A.
## 9252 409251 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9255 409254 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9281 409280 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9282 409281 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9283 409282 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9284 409283 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9285 409284 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9286 409285 WELLS FARGO BANK, N.A.
## 9287 409286 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9288 409287 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9289 409288 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9291 409290 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9294 409293 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9295 409294 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9296 409295 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9297 409296 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9298 409297 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9300 409299 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 9704 409703 WELLS FARGO BANK, N.A. DEBIT CLASSIC
## 10101 410100 WELLS FARGO BANK, N.A. CREDIT CLASSIC
Most of these bins seem to be sequential or in the vicinity of each other
Until next timeā¦