mdnh commited on
Commit
55ff5f6
·
verified ·
1 Parent(s): ece75f0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +155 -0
README.md ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - tabular-classification
5
+ - feature-extraction
6
+ language:
7
+ - en
8
+ tags:
9
+ - finance
10
+ - stocks
11
+ - companies
12
+ - fundamentals
13
+ - market-data
14
+ pretty_name: US Public Company Facts
15
+ size_categories:
16
+ - n<1K
17
+ ---
18
+
19
+ # US Public Company Facts Dataset
20
+
21
+ A comprehensive dataset of **441 major US public companies** with fundamental company information including sector, industry, market cap, employee count, and more.
22
+
23
+ ## Dataset Description
24
+
25
+ This dataset provides essential company metadata for major publicly traded US companies, useful for financial analysis, company classification, and as features for machine learning models.
26
+
27
+ ### Key Statistics
28
+
29
+ | Metric | Value |
30
+ |--------|-------|
31
+ | Total Companies | 441 |
32
+ | Sectors | 12 |
33
+ | Industries | 58 |
34
+ | Exchanges | NASDAQ, NYSE |
35
+ | Total Market Cap | $60.7 trillion |
36
+ | Total Employees | 27.2 million |
37
+
38
+ ### Sectors Covered
39
+
40
+ - Information Technology
41
+ - Financials
42
+ - Healthcare
43
+ - Consumer Discretionary
44
+ - Consumer Staples
45
+ - Energy
46
+ - Industrials
47
+ - Materials
48
+ - Real Estate
49
+ - Utilities
50
+ - Communication Services
51
+
52
+ ## Column Descriptions
53
+
54
+ | Column | Type | Description |
55
+ |--------|------|-------------|
56
+ | `ticker` | string | Stock ticker symbol |
57
+ | `name` | string | Full company name |
58
+ | `cik` | string | SEC Central Index Key |
59
+ | `sector` | string | GICS sector classification |
60
+ | `industry` | string | GICS industry classification |
61
+ | `category` | string | Security type (Common Stock, ADR, etc.) |
62
+ | `exchange` | string | Primary exchange (NASDAQ/NYSE) |
63
+ | `is_active` | bool | Whether the company is actively trading |
64
+ | `listing_date` | date | IPO / listing date |
65
+ | `location` | string | Headquarters location |
66
+ | `market_cap` | float | Market capitalization in USD |
67
+ | `number_of_employees` | int | Total employee count |
68
+ | `sec_filings_url` | string | Link to SEC EDGAR filings |
69
+ | `sic_code` | string | Standard Industrial Classification code |
70
+ | `sic_industry` | string | SIC industry description |
71
+ | `sic_sector` | string | SIC sector description |
72
+ | `website_url` | string | Company website |
73
+ | `weighted_average_shares` | float | Weighted average shares outstanding |
74
+
75
+ ## Usage
76
+
77
+ ### Load with Hugging Face Datasets
78
+
79
+ ```python
80
+ from datasets import load_dataset
81
+
82
+ dataset = load_dataset("mdnh/us-company-facts")
83
+ df = dataset['train'].to_pandas()
84
+
85
+ print(f"Total companies: {len(df)}")
86
+ print(f"Sectors: {df['sector'].nunique()}")
87
+ ```
88
+
89
+ ### Example: Filter by Sector
90
+
91
+ ```python
92
+ # Get all tech companies
93
+ tech = df[df['sector'] == 'Information Technology']
94
+ print(f"Tech companies: {len(tech)}")
95
+ print(f"Total tech market cap: ${tech['market_cap'].sum()/1e12:.1f}T")
96
+ ```
97
+
98
+ ### Example: Top Companies by Market Cap
99
+
100
+ ```python
101
+ top_10 = df.nlargest(10, 'market_cap')[['ticker', 'name', 'market_cap', 'sector']]
102
+ print(top_10)
103
+ ```
104
+
105
+ ### Example: Company Size Analysis
106
+
107
+ ```python
108
+ # Employees per billion market cap
109
+ df['employees_per_bn'] = df['number_of_employees'] / (df['market_cap'] / 1e9)
110
+
111
+ # Most efficient by this metric
112
+ efficient = df.nsmallest(10, 'employees_per_bn')[['ticker', 'name', 'employees_per_bn']]
113
+ print(efficient)
114
+ ```
115
+
116
+ ### Example: Sector Breakdown
117
+
118
+ ```python
119
+ sector_stats = df.groupby('sector').agg({
120
+ 'ticker': 'count',
121
+ 'market_cap': 'sum',
122
+ 'number_of_employees': 'sum'
123
+ }).rename(columns={'ticker': 'companies'})
124
+
125
+ print(sector_stats.sort_values('market_cap', ascending=False))
126
+ ```
127
+
128
+ ## Use Cases
129
+
130
+ - **Company Classification**: Train models to classify companies by sector/industry
131
+ - **Feature Engineering**: Use as features for stock prediction models
132
+ - **Portfolio Analysis**: Analyze sector exposure and diversification
133
+ - **Screening**: Filter companies by size, sector, or other criteria
134
+ - **Research**: Study industry composition and market structure
135
+
136
+ ## License
137
+
138
+ This dataset is released under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/).
139
+
140
+ ## Citation
141
+
142
+ ```bibtex
143
+ @dataset{company_facts_2026,
144
+ author = {mdnh},
145
+ title = {US Public Company Facts Dataset},
146
+ year = {2026},
147
+ publisher = {Hugging Face},
148
+ url = {https://huggingface.co/datasets/mdnh/us-company-facts}
149
+ }
150
+ ```
151
+
152
+ ## Related Datasets
153
+
154
+ - [US Stock Insider Trades](https://huggingface.co/datasets/mdnh/insider-trades-us-stocks) - Insider trading transactions
155
+ - [Hourly Stock Data 2023](https://huggingface.co/datasets/mdnh/hourly-stock-data-2023) - OHLCV + technical indicators