Script to load, clean and code data downloaded from data service FAME (https://fame.bvdinfo.com) (data not included) in preparation for further analysis.
library(lubridate)
## Warning: package 'lubridate' was built under R version 3.1.3
library(reshape2)
## Warning: package 'reshape2' was built under R version 3.1.3
#Read data extracted from FAME, with accounting info for 581 FTSE companies.
file <- "FTSEall.txt"
companies <- read.csv(file, header = TRUE, sep = ";")
#Codebook
str(companies)
## 'data.frame': 581 obs. of 1562 variables:
## $ Mark : int 1 2 3 4 5 6 7 8 9 10 ...
## $ Company.name : Factor w/ 581 levels "3I Group PLC",..: 439 77 210 509 246 319 61 562 553 52 ...
## $ R.O.Full.Postcode : Factor w/ 459 levels "","AB10 1YG",..: 311 360 203 158 68 134 350 287 50 67 ...
## $ Registered.number : Factor w/ 581 levels "#0049580","#0053787",..: 362 47 515 103 119 560 296 181 30 31 ...
## $ Primary.UK.SIC..2007..code : int 6100 6100 8990 47110 64110 64110 8990 61200 70100 64110 ...
## $ Latest.accounts.date : Factor w/ 21 levels "28/02/2014","28/02/2015",..: 21 21 20 2 21 21 5 11 21 21 ...
## $ Ticker.symbol : Factor w/ 579 levels "888","AA","AAL",..: 432 72 219 541 251 321 65 561 551 47 ...
## $ Full.overview : Factor w/ 574 levels "","A company engaged in advertising activities. It was incorporated in March of 2007 and has its registered head office in Ewloe, "| __truncated__,..: 189 399 311 44 408 58 413 236 443 122 ...
## $ History : Factor w/ 286 levels "","Began in Asia as the Nahalma Tea Estate Company Limited",..: 1 1 1 266 1 62 6 1 41 76 ...
## $ Primary.business.line : Factor w/ 521 levels "","A closed-ended investment company",..: 166 14 502 308 395 479 462 252 20 317 ...
## $ Main.activity : Factor w/ 15 levels "","Manufacturing",..: 8 8 4 6 8 8 2 8 2 8 ...
## $ Size.estimate : Factor w/ 260 levels "","A global cruise company operating a fleet of 75 ships",..: 1 156 1 233 1 15 225 178 154 17 ...
## $ Strategy..organization.and.policy : Factor w/ 267 levels "","Aims for high long-term performance by seeking out the best small-capital companies as they emerge",..: 266 1 1 1 1 1 1 1 117 1 ...
## $ Strategic.alliances : Factor w/ 48 levels "","3D PartStream",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Membership.of.a.network : Factor w/ 17 levels "","Association for the Conservation of Energy",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Main.brand.names : Factor w/ 41 levels "","Aguila; Blue Moon; Castle Lager; Club Colombia; Coors Light; Dreher Classic; Gambrinus; Grolsch; Haywards 5000; Imperial",..: 1 3 1 1 1 1 1 1 8 1 ...
## $ Main.domestic.country : Factor w/ 5 levels "","Canada","Hong Kong",..: 5 5 5 5 5 5 5 5 5 5 ...
## $ Main.foreign.countries.or.regions : Factor w/ 199 levels "","Abu Dhabi, UAE; Saudi Arabia",..: 1 75 1 1 1 156 17 189 1 175 ...
## $ Main.production.sites : Factor w/ 51 levels "","Abingdon, United Kingdom",..: 1 1 41 1 1 1 5 1 1 1 ...
## $ Main.distribution.sites : Factor w/ 13 levels "","America; Asia Pacific; Europe; the Middle East; Africa",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Main.sales.representation.sites : Factor w/ 7 levels "","Belgium; Denmark; Finland; France; Germany; Holland; Ireland; Italy; Norway; Spain; Sweden; Switzerland; Australia; China; Hong"| __truncated__,..: 1 1 1 1 1 1 1 1 1 1 ...
## $ Main.customers : Factor w/ 84 levels "","A.T. Kearney, DaimlerChrysler, Department for Work and Pensions, Murray International, Land Rover UK, Panasonic, Universal Pict"| __truncated__,..: 1 1 17 1 1 1 1 1 1 1 ...
## $ Turnover.th.GBP.Last.avail..yr : int 270060000 226748000 140490000 62284000 60560000 40154000 39304000 38346000 37588000 32713000 ...
## $ Turnover.th.GBP.Year...1 : int 277485000 228905000 131920000 63557000 48213000 53195000 43329000 44445000 41428000 36907000 ...
## $ Turnover.th.GBP.Year...2 : int 296340000 231055000 119781000 64826000 51641000 54804000 46048000 46417000 41625000 34337000 ...
## $ Turnover.th.GBP.Year...3 : int 311749000 241630000 92596000 64539000 71336000 42189000 44708000 45884000 38813000 43007000 ...
## $ Turnover.th.GBP.Year...4 : int 241523000 189760000 NA 60931000 NA NA 34761000 44472000 37925000 NA ...
## $ Turnover.th.GBP.Year...5 : int 176561000 148165000 NA 56910000 NA NA 30401000 41017000 35382000 NA ...
## $ Turnover.th.GBP.Year...6 : int 316046000 253088000 NA 54327000 NA NA 29862000 35478000 38934000 NA ...
## $ Turnover.th.GBP.Year...7 : int 178525000 146238000 NA 47298000 NA NA 19686000 31104000 29652000 NA ...
## $ Turnover.th.GBP.Year...8 : int 162909000 140157000 NA 42641000 NA NA 17384000 29350000 26709000 NA ...
## $ Turnover.th.GBP.Year...9 : int 178664000 147729000 NA 39454000 NA NA 16703000 34133000 27258000 NA ...
## $ Profit..Loss..before.Taxation.th.GBP.Last.avail..yr : int 18158000 3175000 -4253000 -6376000 11980000 1762000 13004000 -5270000 5934000 2256000 ...
## $ Profit..Loss..before.Taxation.th.GBP.Year...1 : int 20281000 18246000 662000 2259000 13624000 415000 11739000 3255000 5918000 2868000 ...
## $ Profit..Loss..before.Taxation.th.GBP.Year...2 : int 30938000 11571000 2576000 1960000 12703000 -570000 14678000 9549000 5420000 99000 ...
## $ Profit..Loss..before.Taxation.th.GBP.Year...3 : int 35815000 24988000 2772000 3835000 14074000 -3542000 19478000 9498000 5216000 5879000 ...
## $ Profit..Loss..before.Taxation.th.GBP.Year...4 : int 22574000 -3082000 NA 3535000 12159000 281000 12886000 8674000 5254000 6065000 ...
## $ Profit..Loss..before.Taxation.th.GBP.Year...5 : int 13016000 15558000 NA 3176000 4384000 1042000 7034000 4189000 4368000 4585000 ...
## $ Profit..Loss..before.Taxation.th.GBP.Year...6 : int 35041000 23639000 NA 2954000 6417000 807000 11791000 9001000 6850000 6077000 ...
## $ Profit..Loss..before.Taxation.th.GBP.Year...7 : int 25378000 15862000 NA 2803000 12149000 4000000 8977000 -2383000 3825000 7076000 ...
## $ Profit..Loss..before.Taxation.th.GBP.Year...8 : int 22802000 17700000 NA 2653000 11284000 4248000 7659000 -14853000 3255000 7136000 ...
## $ Profit..Loss..before.Taxation.th.GBP.Year...9 : int 25959000 18593000 NA 2235000 12212000 3820000 4935000 -4702000 3264000 5280000 ...
## $ Net.Tangible.Assets..Liab...th.GBP.Last.avail..yr : int 165552000 120492000 60277000 20633000 131845000 50524000 74804000 50078000 4528000 98017000 ...
## $ Net.Tangible.Assets..Liab...th.GBP.Year...1 : int 154733000 119108000 34280000 24970000 119890000 40477000 73898000 59025000 5188000 62481000 ...
## $ Net.Tangible.Assets..Liab...th.GBP.Year...2 : int 151523000 114853000 35055000 26782000 118746000 78556000 65112000 56006000 6456000 58717000 ...
## $ Net.Tangible.Assets..Liab...th.GBP.Year...3 : int 145852000 112947000 27432000 27214000 113361000 45243000 51262000 55490000 5568000 59895000 ...
## $ Net.Tangible.Assets..Liab...th.GBP.Year...4 : int 131955000 104305000 NA 25137000 203178000 122789000 49460000 54077000 7173000 83890000 ...
## $ Net.Tangible.Assets..Liab...th.GBP.Year...5 : int 118909000 96037000 NA 25831000 124232000 39196000 40117000 49806000 6762000 534136000 ...
## $ Net.Tangible.Assets..Liab...th.GBP.Year...6 : int 114220000 94167000 NA 23986000 105814000 26503000 29576000 34966000 5599000 1098745000 ...
## $ Net.Tangible.Assets..Liab...th.GBP.Year...7 : int 82373000 66373000 NA 17565000 66236000 25177000 23575000 34399000 3674000 45552000 ...
## $ Net.Tangible.Assets..Liab...th.GBP.Year...8 : int 76533000 61041000 NA 14610000 43943000 13129000 21072000 39565000 2886000 42688000 ...
## $ Net.Tangible.Assets..Liab...th.GBP.Year...9 : int 74391000 68145000 NA 13520000 41858000 9720000 18594000 35605000 4175000 409947000 ...
## $ Shareholders.Funds.th.GBP.Last.avail..yr : int 110284000 71469000 30162000 7071000 122136000 48690000 46285000 70802000 10594000 59567000 ...
## $ Shareholders.Funds.th.GBP.Year...1 : int 108704000 78734000 19234000 14715000 109806000 38989000 46414000 71477000 11933000 55385000 ...
## $ Shareholders.Funds.th.GBP.Year...2 : int 115960000 72848000 18831000 16643000 107808000 43999000 41995000 76935000 12294000 60038000 ...
## $ Shareholders.Funds.th.GBP.Year...3 : int 109077000 71724000 12527000 17775000 102133000 45920000 35374000 87555000 11938000 55589000 ...
## $ Shareholders.Funds.th.GBP.Year...4 : int 94534000 60668000 NA 16535000 94314000 46061000 31948000 90381000 12411000 50858000 ...
## $ Shareholders.Funds.th.GBP.Year...5 : int 84483000 62922000 NA 14596000 79447000 43278000 24191000 86162000 10720000 47277000 ...
## $ Shareholders.Funds.th.GBP.Year...6 : int 87765000 62954000 NA 12938000 66877000 11260000 19249000 78043000 9558000 36618000 ...
## $ Shareholders.Funds.th.GBP.Year...7 : int 62200000 47012000 NA 11815000 66689000 12141000 14786000 67067000 9139000 23291000 ...
## $ Shareholders.Funds.th.GBP.Year...8 : int 54019000 43237000 NA 10506000 55361000 11155000 13094000 85425000 7566000 19799000 ...
## $ Shareholders.Funds.th.GBP.Year...9 : int 52962000 46584000 NA 9380000 53840000 10195000 9683000 99317000 5744000 17426000 ...
## $ Profit.Margin...Last.avail..yr : num 6.72 1.4 -3.03 -10.24 19.78 ...
## $ Profit.Margin...Year...1 : num 7.31 7.97 0.5 3.55 28.26 ...
## $ Profit.Margin...Year...2 : num 10.44 5.01 2.15 3.02 24.6 ...
## $ Profit.Margin...Year...3 : num 11.49 10.34 2.99 5.94 19.73 ...
## $ Profit.Margin...Year...4 : num 9.35 -1.62 NA 5.8 NA ...
## $ Profit.Margin...Year...5 : num 7.37 10.5 NA 5.58 NA ...
## $ Profit.Margin...Year...6 : num 11.09 9.34 NA 5.44 NA ...
## $ Profit.Margin...Year...7 : num 14.22 10.85 NA 5.93 NA ...
## $ Profit.Margin...Year...8 : num 14 12.63 NA 6.22 NA ...
## $ Profit.Margin...Year...9 : num 14.53 12.59 NA 5.66 NA ...
## $ Return.on.Shareholders.Funds...Last.avail..yr : num 16.46 4.44 -14.1 -90.17 9.81 ...
## $ Return.on.Shareholders.Funds...Year...1 : num 18.66 23.17 3.44 15.35 12.41 ...
## $ Return.on.Shareholders.Funds...Year...2 : num 26.7 15.9 13.7 11.8 11.8 ...
## $ Return.on.Shareholders.Funds...Year...3 : num 32.8 34.8 22.1 21.6 13.8 ...
## $ Return.on.Shareholders.Funds...Year...4 : num 23.88 -5.08 NA 21.38 12.89 ...
## $ Return.on.Shareholders.Funds...Year...5 : num 15.41 24.73 NA 21.76 5.52 ...
## $ Return.on.Shareholders.Funds...Year...6 : num 39.9 37.5 NA 22.8 9.6 ...
## $ Return.on.Shareholders.Funds...Year...7 : num 40.8 33.7 NA 23.7 18.2 ...
## $ Return.on.Shareholders.Funds...Year...8 : num 42.2 40.9 NA 25.2 20.4 ...
## $ Return.on.Shareholders.Funds...Year...9 : num 49 39.9 NA 23.8 22.7 ...
## $ Return.on.Capital.Employed...Last.avail..yr : num 10.68 2.24 -6.47 -26.13 8.01 ...
## $ Return.on.Capital.Employed...Year...1 : num 12.89 13.05 1.84 7.85 9.88 ...
## $ Return.on.Capital.Employed...Year...2 : num 20.05 8.45 7.32 6.29 9.26 ...
## $ Return.on.Capital.Employed...Year...3 : num 24.1 18.6 10.1 12.1 10.7 ...
## $ Return.on.Capital.Employed...Year...4 : num 16.7 -2.59 NA 11.99 5.47 ...
## $ Return.on.Capital.Employed...Year...5 : num 10.65 14.34 NA 10.58 3.07 ...
## $ Return.on.Capital.Employed...Year...6 : num 29.78 21.88 NA 10.55 5.15 ...
## $ Return.on.Capital.Employed...Year...7 : num 29.8 21.1 NA 14.1 14.1 ...
## $ Return.on.Capital.Employed...Year...8 : num 28.9 25.6 NA 15.9 17.9 ...
## $ Return.on.Capital.Employed...Year...9 : num 33.8 24.2 NA 14.9 20 ...
## $ Liquidity.Ratio..x..Last.avail..yr : num 0.93 1.08 0.78 0.45 0.91 1.03 0.9 0.97 0.42 1.06 ...
## $ Liquidity.Ratio..x..Year...1 : num 0.79 0.93 0.71 0.44 0.9 1.03 0.69 0.73 0.47 1.04 ...
## $ Liquidity.Ratio..x..Year...2 : num 0.87 1.07 0.91 0.49 1.06 1.07 0.65 0.81 0.49 1.03 ...
## $ Liquidity.Ratio..x..Year...3 : num 0.88 0.85 0.73 0.49 0.96 1.02 0.97 0.61 0.54 1.03 ...
## $ Liquidity.Ratio..x..Year...4 : num 0.83 0.84 NA 0.47 0.78 1.12 1.52 0.48 0.6 0.71 ...
## $ Liquidity.Ratio..x..Year...5 : num 0.81 0.76 NA 0.56 0.77 0.27 1.49 0.45 0.62 0.11 ...
## $ Liquidity.Ratio..x..Year...6 : num 0.92 0.71 NA 0.63 0.92 1.03 1.01 0.38 0.53 0.04 ...
## [list output truncated]
#Split data
comp.info <- companies[ , c(2:5, 7:22)]
comp.data <- companies[ , c(6:7, 23:1562)]
rm(file, companies)
comp.data[ , 1] <- as.Date(comp.data[ , 1], "%d/%m/%Y")
# Create data frame for the analysis
df <- as.data.frame(comp.data[ , 2])
names(df) <- c("ticker")
# If accounts are filed after March, consider previous year.
df$year <- year(comp.data[ , 1])
keep <- month(comp.data[ , 1]) < 4
df$year[keep] <- df$year[keep] - 1
rm(keep)
df <- cbind(df, comp.data[ , c(3:1542)])
rm(comp.data)
# Remove unlisted companies
df <- df[!df$ticker == "Unlisted", ]
# Transform data into long form
comp.df <- melt(df, id = c("ticker", "year"))
rm(df)
change <- grepl('.Year...1', comp.df$variable)
comp.df$year[change] <- comp.df$year[change] - 1
change <- grepl('.Year...2', comp.df$variable)
comp.df$year[change] <- comp.df$year[change] - 2
change <- grepl('.Year...3', comp.df$variable)
comp.df$year[change] <- comp.df$year[change] - 3
change <- grepl('.Year...4', comp.df$variable)
comp.df$year[change] <- comp.df$year[change] - 4
change <- grepl('.Year...5', comp.df$variable)
comp.df$year[change] <- comp.df$year[change] - 5
change <- grepl('.Year...6', comp.df$variable)
comp.df$year[change] <- comp.df$year[change] - 6
change <- grepl('.Year...7', comp.df$variable)
comp.df$year[change] <- comp.df$year[change] - 7
change <- grepl('.Year...8', comp.df$variable)
comp.df$year[change] <- comp.df$year[change] - 8
change <- grepl('.Year...9', comp.df$variable)
comp.df$year[change] <- comp.df$year[change] - 9
rm(change)
# Standardise variable names removing year tag
comp.df$variable <- gsub('.Last.avail..yr', "", comp.df$variable)
comp.df$variable <- gsub('.Year...1', "", comp.df$variable)
comp.df$variable <- gsub('.Year...2', "", comp.df$variable)
comp.df$variable <- gsub('.Year...3', "", comp.df$variable)
comp.df$variable <- gsub('.Year...4', "", comp.df$variable)
comp.df$variable <- gsub('.Year...5', "", comp.df$variable)
comp.df$variable <- gsub('.Year...6', "", comp.df$variable)
comp.df$variable <- gsub('.Year...7', "", comp.df$variable)
comp.df$variable <- gsub('.Year...8', "", comp.df$variable)
comp.df$variable <- gsub('.Year...9', "", comp.df$variable)
# Remove NA
comp.df <- comp.df[!is.na(comp.df$value), ]
library(plyr)
##
## Attaching package: 'plyr'
##
## The following object is masked from 'package:lubridate':
##
## here
unique(comp.df$ticker)
## [1] RDSB BP GLEN TSCO HSBA LLOY BLT VOD ULVR BARC PRU SSE RIO CNA
## [15] RBS SBRY GSK AV BT.A AAL CPG MRW AZN SL STAN OML BA CRG
## [29] NG DGE BATS RR IMT SAB WOS ABF BG DCC JMAT WPP KGF MKS
## [43] RMG LGEN RB TCG EVR VED SKY RSA BBY GKN GFS FGP INCH BNZL
## [57] HOME TPK MNDI PSON BOK CCL EZJ CPI WG SMDS PDG NXT AMFW SRP
## [71] REX PFC HAS CLLN ANTO INVP BAB BDEV TATE CCC LOOK DLG SHP SN
## [85] KIE SMIN DRTY SGC IRV EXPN DRX SPD GOG TW SHI ITV DC PSN
## [99] WEIR BRBY DEB WTB MTO MGNS AML ITRK MAB SDR GFTU MNZS NEX SVT
## [113] SSPG CNCT COB GFRD ATK RTO TALK UU UDG IMI PIC AHT BKG WMH
## [127] KLR AGK MGGT RGU JD BWY BBA VSVS JRG TLW JDW IAP DCG MRO
## [141] BVIC PNN COLT SGE GNK LSE ECM MERL STJ IHG TSB QQ LAD SXS
## [155] SMWH CWC ADN JLT HFG WIN HWDN SVS PFG COST RPC MPI CRDA PMO
## [169] BRSN POLY PLND CWK GNC AA BRIT PFL HIK BGEO OCDO HFD SYNT ADM
## [183] MCLS MGAM FRES FXPO HTG ESNT RDW GMD PZC PFD VM MER BWNG CBG
## [197] MLC ISAT SNR MARS BVS GRG SPRT ARM UBM IPF CSN STHR MCB EMG
## [211] DNLM FENR MTC BRAM LAND ULE TLPR CIU III RRS CWD RWA RNK SPX
## [225] HLMA XCH PETS ENQ LAM TEP ALNT SKS TNI CRST RTN ETI FLYB CINE
## [239] BOY AFR ACA LMI ROR RPS NTG HSV LRD POG KAZ BPTY TTG FDL
## [253] DLAR UKM ELM NOG BPI CSR INPP ESUR NVA HILS PA PUB CPR HTY
## [267] FSJ ICP SGP CARR IGG NMC LWB ERM CHG BET CHW TED AO. SYR
## [281] GNS KCOM INTU OXIG MSLH HL RSW TYMN DNO SDY TCY CMS HRG SIV
## [295] PLP GRI HOC BLND VTC DPLM PTEC CEY ALY PAG DOM ASHM SPT BTG
## [309] JUP FSTA ANH LSL SIA BRW SMP FDSA EXO DTY JPR FOUR AGA BAG
## [323] SDL MCRO VCT MONY LVD MMC INFI 888 CMBN CKN AVV RCDO DVO SFR
## [337] STCK RAT NXR E2V OSB PAY TIG HMSO RM TPT EXI DPH PHTM RNO
## [351] VP ITE SGRO IMG RMV HNT RUS DIA JE BHY FOXT AQP DLN GDWN
## [365] TRI GEMD GMS BMS AVON BACT TRB HLCL GAW FDM AEP UKCM FAN STVG
## [379] UTV MOSB CTR DJAN ARW NCC ATST BMY AIE XAR UTG SPO PRV XPP
## [393] CSRT STOB SAFE CAR SEPU HSTN JEV CLI ZPLA SHB DSC RDI TRS SUS
## [407] SKP WKP BYG ELTA CAU CAPC BVC GPOR MTVW MYI TEM PHP FRCL EDIN
## [421] FCPT SERV LMP SMT LWDB MRC CAL BRWM CTY UKW CLDN PCTN WTAN AGR
## [435] VEC PLI TRY QED TMPL ASL MRCH LIO IPO IEM HGT MUT BIST RCP
## [449] CLIG FEV MNKS ECWO DIG BNKR MKLW SCIN GPE TCSC SCAM BBOX BTEM SREI
## [463] JEMI EFM JMG FSV JAM NAIT JCH FCSS PIN LWI OXB MCKS SEP JETG
## [477] PNL AUKT AAS CDI AGIT HSL SVI FCI HHI SDU FGT SDP VIN BRLA
## [491] FCRE EUT KIT JRS JEO WWH BUT DIVI SCF BRSC HRI JESC BRFI BRCI
## [505] PCFT STS PCT SLET TRG BRGE ABD IVI HAN JII MAJE SST JMF TIGT
## [519] BEE FCS BRNA NAS JFJ CYN MNP HEFT PCGH WPC ALM THRG P2P SLS
## [533] JAI HNE IPU IAT SHRS MCP JMO HGL MTU SCP LSLI SJG BGFD ANW
## [547] PAC JMC APF FAS ATR JMI DNDL ATS PHI NII FPER MTE HVTR DNE
## [561] BGS FJV JPS EWI CGT BIOG ATT JUS IBT LMS EPG OPHR CNE MPO
## [575] REL BEEP CIR FEET
## 579 Levels: 888 AA AAL AAS ABD ABF ACA ADM ADN AEP AFR AGA AGIT AGK ... ZPLA
unique(comp.df$year)
## [1] 2014 2013 2012 2010 2009 2011 2008 2007 2006 2005 2004
unique(comp.df$variable)
## [1] "Turnover.th.GBP"
## [2] "Profit..Loss..before.Taxation.th.GBP"
## [3] "Net.Tangible.Assets..Liab...th.GBP"
## [4] "Shareholders.Funds.th.GBP"
## [5] "Profit.Margin.."
## [6] "Return.on.Shareholders.Funds.."
## [7] "Return.on.Capital.Employed.."
## [8] "Liquidity.Ratio..x."
## [9] "Gearing.."
## [10] "Number.of.Employees"
## [11] "Tangible.Assets.th.GBP"
## [12] "Land...Buildings.th.GBP"
## [13] "Freehold.Land.th.GBP"
## [14] "Leasehold.Land.th.GBP"
## [15] "Fixtures...Fittings.th.GBP"
## [16] "Plant...Vehicles.th.GBP"
## [17] "Plant.th.GBP"
## [18] "Vehicles.th.GBP"
## [19] "Other.Fixed.Assets.th.GBP"
## [20] "Intangible.Assets.th.GBP"
## [21] "Investments..Fixed.Assets..th.GBP"
## [22] "Fixed.Assets.th.GBP"
## [23] "Stock...W.I.P.th.GBP"
## [24] "Stock.th.GBP"
## [25] "X.W.I.P..th.GBP"
## [26] "Finished.Goods.th.GBP"
## [27] "Trade.Debtors.th.GBP"
## [28] "Bank...Deposits.th.GBP"
## [29] "Other.Current.Assets.th.GBP"
## [30] "Group.Loans..asset..th.GBP"
## [31] "Directors.Loans..asset..th.GBP"
## [32] "Other.Debtors.th.GBP"
## [33] "Prepayments.th.GBP"
## [34] "Deferred.Taxation.th.GBP"
## [35] "Investments..Current.Assets..th.GBP"
## [36] "Current.Assets.th.GBP"
## [37] "Trade.Creditors.th.GBP"
## [38] "Short.Term.Loans...Overdrafts.th.GBP"
## [39] "Bank.Overdrafts.th.GBP"
## [40] "Group.Loans..short.t...th.GBP"
## [41] "Director.Loans..short.t...th.GBP"
## [42] "Corporation.Tax.th.GBP"
## [43] "Dividends.th.GBP"
## [44] "Accruals...Def..Inc...short.t...th.GBP"
## [45] "Social.Securities...V.A.T..th.GBP"
## [46] "Other.Current.Liabilities.th.GBP"
## [47] "Current.Liabilities.th.GBP"
## [48] "Net.Current.Assets..Working.Capital..th.GBP"
## [49] "Net.Tangible.Assets..Liab...th.GBP.1"
## [50] "Working.Capital.needs.th.GBP"
## [51] "Total.Assets.th.GBP"
## [52] "Total.Assets.less.Cur..Liab..th.GBP"
## [53] "Long.Term.Debt.th.GBP"
## [54] "Group.Loans..long.t...th.GBP"
## [55] "Director.Loans..long.t...th.GBP"
## [56] "Hire.Purchase...Leas...long.t...th.GBP"
## [57] "Hire.Purchase..long.t...th.GBP"
## [58] "Leasing..long.t...th.GBP"
## [59] "Preference.Shares.th.GBP"
## [60] "Other.Long.Term.Loans.th.GBP"
## [61] "Total.Other.Long.Term.Liab..th.GBP"
## [62] "Accruals...Def..Inc...long.t...th.GBP"
## [63] "Other.Long.Term.Liab..th.GBP"
## [64] "Provisions.for.Other.Liab..th.GBP"
## [65] "Deferred.Tax.th.GBP"
## [66] "Other.Provisions.th.GBP"
## [67] "Pension.Liabilities.th.GBP"
## [68] "Balance.sheet.Minorities.th.GBP"
## [69] "Long.Term.Liabilities.th.GBP"
## [70] "Net.assets.th.GBP"
## [71] "Issued.Capital.th.GBP"
## [72] "Ordinary.Shares.th.GBP"
## [73] "Preference.Shares.th.GBP.1"
## [74] "Other.Shares.th.GBP"
## [75] "Total.Reserves.th.GBP"
## [76] "Share.Premium.Account.th.GBP"
## [77] "Revaluation.Reserves.th.GBP"
## [78] "Profit..Loss..Account.th.GBP"
## [79] "Other.Reserves.th.GBP"
## [80] "Shareholders.Funds.th.GBP.1"
## [81] "Turnover.th.GBP.1"
## [82] "National.Turnover.th.GBP"
## [83] "Overseas.Turnover.th.GBP"
## [84] "Cost.of.Sales.th.GBP"
## [85] "Exceptional.Items.pre.GP.th.GBP"
## [86] "Other.Income.pre.GP.th.GBP"
## [87] "Gross.Profit.th.GBP"
## [88] "Administration.Expenses.th.GBP"
## [89] "Other.Operating.Income.Costs.pre.OP.th.GBP"
## [90] "Exceptional.Items.pre.OP.th.GBP"
## [91] "Operating.Profit.th.GBP"
## [92] "Other.Income.th.GBP"
## [93] "Total.Other.Income...Int..Received.th.GBP"
## [94] "Exceptional.Items.th.GBP"
## [95] "Profit..Loss..on.Sale.of.Operations.th.GBP"
## [96] "Costs.of.Reorganisation.th.GBP"
## [97] "Profit..Loss..on.Disposal.th.GBP"
## [98] "Other.Exceptional.Items.th.GBP"
## [99] "Profit..Loss..before.Interest.paid.th.GBP"
## [100] "Interest.Received.th.GBP"
## [101] "Interest.Paid.th.GBP"
## [102] "Paid.to.Bank.th.GBP"
## [103] "Paid.on.Hire.Purchase.th.GBP"
## [104] "Paid.on.Leasing.th.GBP"
## [105] "Other.Interest.Paid.th.GBP"
## [106] "Net.Interest.th.GBP"
## [107] "Profit..Loss..before.Tax.th.GBP"
## [108] "Taxation.th.GBP"
## [109] "Profit..Loss..after.Tax.th.GBP"
## [110] "Extraordinary.Items.th.GBP"
## [111] "Minority.Interests.th.GBP"
## [112] "Profit..Loss..for.Period.th.GBP"
## [113] "Dividends.th.GBP.1"
## [114] "Retained.Profit..Loss..th.GBP"
## [115] "Depreciation.th.GBP"
## [116] "Depreciation.Owned.Assets.th.GBP"
## [117] "Depreciation.Other.Assets.th.GBP"
## [118] "Impairment.Tangibles.th.GBP"
## [119] "Audit.Fee.th.GBP"
## [120] "Non.Audit.Fee.th.GBP"
## [121] "Tax.Advice.th.GBP"
## [122] "Non.Tax.Advisory.Services.th.GBP"
## [123] "Other.Auditors.Services.th.GBP"
## [124] "Non.Audit.Fees.paid.to.Other.Auditors.th.GBP"
## [125] "Total.Amortization.and.Impairment.th.GBP"
## [126] "Amortisation.th.GBP"
## [127] "Impairment.th.GBP"
## [128] "Total.Operating.Lease.Rentals.th.GBP"
## [129] "Hire.of.Plant...Machinery.th.GBP"
## [130] "Land...Building.or.Property.Rents...Other.th.GBP"
## [131] "Research...Development.th.GBP"
## [132] "Foreign.Exchange.Gains.Losses.th.GBP"
## [133] "Remuneration.th.GBP"
## [134] "Wages...Salaries.th.GBP"
## [135] "Social.Security.Costs.th.GBP"
## [136] "Pension.Costs.th.GBP"
## [137] "Other.Staff.Costs.th.GBP"
## [138] "Directors..Remuneration.th.GBP"
## [139] "Directors..Fees.th.GBP"
## [140] "Pension.Contribution.th.GBP"
## [141] "Other.Emoluments.th.GBP"
## [142] "Highest.Paid.Director.th.GBP"
## [143] "EBITDA.th.GBP"
## [144] "Number.of.Employees.1"
## [145] "Net.Cash.In.Out.flow.Operat..Activ..th.GBP"
## [146] "Net.Cash.In.Out.flow.Ret..On.Invest..th.GBP"
## [147] "Taxation.th.GBP.1"
## [148] "Net.Cash.Out.In.flow.Investing.Activ..th.GBP"
## [149] "Capital.Expenditure...Financ..Invest..th.GBP"
## [150] "Acquisition...Disposal.th.GBP"
## [151] "Equity.Dividends.Paid.th.GBP"
## [152] "Management.of.Liquid.Resources.th.GBP"
## [153] "Net.Cash.Out.In.flow.from.Financing.th.GBP"
## [154] "Increase..Decrease..Cash...Equiv..th.GBP"
count(comp.df, "year")
## year freq
## 1 2004 8808
## 2 2005 38587
## 3 2006 40306
## 4 2007 41765
## 5 2008 42942
## 6 2009 43829
## 7 2010 48379
## 8 2011 49858
## 9 2012 50569
## 10 2013 51511
## 11 2014 38221
saveRDS(comp.info, "company_info.rds")
saveRDS(comp.df, "company_data.rds")
rm(comp.info, comp.df)