Published
Edited
Aug 24, 2022
Insert cell
# Arquero analytics of Forbes 2000 lists of companies
Insert cell
md`- [**Reading of raw CSVs**](#csv_import)
- [for 2013](#import_2013)
- [for 2015](#import_2015)
- [for 2017](#import_2017)
- [for 2018](#import_2018)
- [for 2020](#import_2020)
`
Insert cell
Insert cell
f_2022_raw = aq.fromCSV(await FileAttachment('forbes_2022.csv').text())
Insert cell
f_2021_raw = aq.fromCSV(await FileAttachment('forbes_2021.csv').text())
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
import_2013 = md`### For 2013`
Insert cell
forbes_2013_raw = aq.loadCSV("https://raw.githubusercontent.com/alogean/corpedia/master/Forbes_2000_2013.csv")
Insert cell
forbes_2013 = forbes_2013_raw.rename(
{ rank: 'rank_2013' },
{ sales_billion_usd: 'sales_billion_usd_2013' },
{ profits_billion_usd: 'profits_billion_usd_2013'},
{ assets_billion_usd: 'assests_billion_usd_2013'},
{ market_value_billion_usd: 'market_value_billion_usd_2013'})
Insert cell
forbes_2013.view()
Insert cell
Insert cell
forbes_2015_raw = aq.loadCSV("https://raw.githubusercontent.com/alogean/corpedia/master/Forbes_2000_2015.csv")
Insert cell
forbes_2015 = forbes_2015_raw.rename({ rank: 'rank_2015' },
{ sales_billion_usd: 'sales_billion_usd_2015' },
{ profits_billion_usd: 'profits_billion_usd_2015'},
{ assets_billion_usd: 'assests_billion_usd_2015'},
{ market_value_billion_usd: 'market_value_billion_usd_2015'})
Insert cell
Insert cell
forbes_2017_raw = aq.loadCSV("https://raw.githubusercontent.com/alogean/corpedia/master/Forbes_2000_2017.csv")
Insert cell
forbes_2017 = forbes_2017_raw.rename({ rank: 'rank_2017' },
{ sales_billion_usd: 'sales_billion_usd_2017' },
{ profits_billion_usd: 'profits_billion_usd_2017'},
{ assets_billion_usd: 'assests_billion_usd_2017'},
{ market_value_billion_usd: 'market_value_billion_usd_2017'})
Insert cell
forbes_2017.view()
Insert cell
Insert cell
forbes_2018_raw = aq.loadCSV("https://raw.githubusercontent.com/alogean/corpedia/master/Forbes_2000_2018.csv")
Insert cell
forbes_2018 = forbes_2018_raw.rename({ rank: 'rank_2018' },
{ revenues_billion_usd: 'sales_billion_usd_2018' },
{ profits_billion_usd: 'profits_billion_usd_2018'},
{ assets_billion_usd: 'assests_billion_usd_2018'},
{ market_value_billion_usd: 'market_value_billion_usd_2018'},
{ ceo: 'ceo_2018'})
Insert cell
forbes_2018.view()
Insert cell
Insert cell
forbes_2020_raw = aq.loadCSV("https://raw.githubusercontent.com/alogean/corpedia/master/Forbes_2000_2020.csv")
Insert cell
forbes_2021_raw = aq.loadCSV("https://www.kaggle.com/datasets/shivamb/fortune-global-2000-companies-till-2021?select=fortune_2000_in_2021.csv")
Insert cell
forbes_2020 = forbes_2020_raw.rename({ rank: 'rank_2020' },
{ sales_billion_usd: 'sales_billion_usd_2020' },
{ profits_billion_usd: 'profits_billion_usd_2020'},
{ assets_billion_usd: 'assests_billion_usd_2020'},
{ market_value_billion_usd: 'market_value_billion_usd_2020'})
Insert cell
forbes_2020
.derive({sales_billion_usd_2020: d => op.normalized_monetary_value(d.sales_billion_usd_2020)})
.derive({profits_billion_usd_2020: d => op.normalized_monetary_value(d.profits_billion_usd_2020)})
.derive({assests_billion_usd_2020: d => op.normalized_monetary_value(d.assests_billion_usd_2020)})
.derive({market_value_billion_usd_2020: d => op.normalized_monetary_value(d.market_value_billion_usd_2020)})
.view()
Insert cell
forbes_2022_raw = aq.fromCSV(await FileAttachment('forbes_2020.csv').text())
Insert cell
forbes_2022_raw.view(2000)
Insert cell
https://storage.googleapis.com/kagglesdsdata/datasets/1852580/3024934/fortune_2000_in_2021.csv?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=gcp-kaggle-com%40kaggle-161607.iam.gserviceaccount.com%2F20220821%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20220821T122107Z&X-Goog-Expires=259200&X-Goog-SignedHeaders=host&X-Goog-Signature=50f1b79cf5f6212f0aef24b8113bad4274edd10fda83f07a79cdbd55362ca8ed282c5931c33ff9253564f903cc796618ab3f47e46c9882766953102e1e94416f1b1a2df1267ae0f32e3ed2aafe6519a3c437d5f9a55222ed39bb13dcfc1f90f49cae96e1cde43c4477bbb3c4b99568afea9f2acdfc6d50c50527035f1826027648db3758c57da0be74a503fb3213f4aef22c9c8df8dae5afebaeefc742bba91729d6de2009270af4861a6a35ccf903e543d90305eaaabeada9ee6f1244e6969f65f5ccc4b344f90c9d5c0752b829679252c7e62d6d65bde68d6e4840206d437af1f018a17f6fbfa7a01175733b353af78bf7ad82d6395626935424da0e092076
Insert cell
Insert cell
forbes_joined = forbes_2013.join_full(forbes_2015, 'company').join_full(forbes_2017, 'company').join_full(forbes_2018, 'company').join_full(forbes_2020, 'company')
Insert cell
Insert cell
forbes_joined.select('company', 'rank_2013', 'rank_2015', 'rank_2017', 'rank_2018', 'rank_2020', 'forbes_webpage').orderby('company').view(3202)
Insert cell
forbes_2013.orderby('sales_billion_usd_2013').derive({
sales_rank: d => op.row_number()}).view(2000)
Insert cell
md`We first create four separate lists of the 2000 biggest companies in each of the metrics: sales, profits, assets, and market value. Each of the 2000 lists has a minimum cutoff value for a company to qualify: sales of $5.5 billion, profits of $493 million, assets of $13.7 billion and market value of $7.6 billion. A company needs to qualify for at least one of the lists to be eligible for the final Global 2000 ranking. This year 3,550 companies were needed to fill out the four lists of 2000. Each company qualifies for at least one of the lists. Companies receive a separate score for each metric based on where it ranks on the 2000 list. We add up all the scores for all four metrics (equally weighted) and compile a composite score for each company based on its rankings for sales, profits, assets and market value. We sort the companies in descending order by the highest composite score and then apply our Forbes Global 2000 rank. The highest composite score gets the highest rank.`
Insert cell
Insert cell
import { aq, op } from '@uwdata/arquero'
Insert cell
aq.addFunction(function normalized_monetary_value(string_value) {
const tmp = op.replace(string_value, '$', '');
return op.parse_float(op.replace(tmp, ' B', ''));
})
Insert cell
Insert cell
forbes_2010 = FileAttachment("forbes_2010.csv").csv()
Insert cell
forbes_2011 = FileAttachment("forbes_2011.csv").csv()
Insert cell
forbes_2012 = FileAttachment("forbes_2012.csv").csv()
Insert cell
forbes_20131 = FileAttachment("forbes_2013.csv").csv()
Insert cell
forbes_2014 = FileAttachment("forbes_2014.csv").csv()
Insert cell
forbes_20151 = FileAttachment("forbes_2015.csv").csv()
Insert cell
forbes_2016 = FileAttachment("forbes_2016.csv").csv()
Insert cell
forbes_20171 = FileAttachment("forbes_2017.csv").csv()
Insert cell
forbes_20181 = FileAttachment("forbes_2018.csv").csv()
Insert cell
forbes_2019 = FileAttachment("forbes_2019.csv").csv()
Insert cell
forbes_2021 = FileAttachment("forbes_2021.csv").csv()
Insert cell
forbes_2022 = FileAttachment("forbes_2022.csv").csv()
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more