update metrics
This commit is contained in:
parent
aa1635cf7b
commit
212ff2772a
@ -273,9 +273,12 @@ def generate_revenue_dataset(dataset):
|
|||||||
"morepersonalcomputing": "More Personal Computing",
|
"morepersonalcomputing": "More Personal Computing",
|
||||||
"serviceother": "Service Other",
|
"serviceother": "Service Other",
|
||||||
"governmentoperatingsegment": "Government Operating Segment",
|
"governmentoperatingsegment": "Government Operating Segment",
|
||||||
"InternationalDevelopmentalLicensedMarketsandCorporate": "License Market",
|
"internationaldevelopmentallicensedmarketsandcorporate": "License Market",
|
||||||
"YouTubeAdvertisingRevenue": "Youtube Ads",
|
"youtubeadvertisingrevenue": "Youtube Ads",
|
||||||
"GoogleAdvertisingRevenue": "Google Ads",
|
"googleadvertisingrevenue": "Google Ads",
|
||||||
|
"cloudservicesandlicensesupport": "Cloude Services & Support",
|
||||||
|
"infrastructurecloudservicesandlicensesupport": "Infrastructure Cloud",
|
||||||
|
"applicationscloudservicesandlicensesupport": "Application Cloud"
|
||||||
}
|
}
|
||||||
excluded_names = {'government','enterpriseembeddedandsemicustom','computingandgraphics','automotiveleasing ','officeproductsandcloudservices','serverproductsandcloudservices','automotiverevenues','automotive','computeandnetworking','graphics','gpu','automotivesegment','energygenerationandstoragesales','energygenerationandstorage','automotivesaleswithoutresalevalueguarantee','salesandservices','compute', 'networking', 'cloudserviceagreements', 'digital', 'allother', 'preownedvideogameproducts'}
|
excluded_names = {'government','enterpriseembeddedandsemicustom','computingandgraphics','automotiveleasing ','officeproductsandcloudservices','serverproductsandcloudservices','automotiverevenues','automotive','computeandnetworking','graphics','gpu','automotivesegment','energygenerationandstoragesales','energygenerationandstorage','automotivesaleswithoutresalevalueguarantee','salesandservices','compute', 'networking', 'cloudserviceagreements', 'digital', 'allother', 'preownedvideogameproducts'}
|
||||||
dataset = [item for item in dataset if item['name'].lower() not in excluded_names]
|
dataset = [item for item in dataset if item['name'].lower() not in excluded_names]
|
||||||
@ -425,7 +428,7 @@ def process_filings(filings, symbol):
|
|||||||
for old, new in replacements.items():
|
for old, new in replacements.items():
|
||||||
name = name.replace(old, new)
|
name = name.replace(old, new)
|
||||||
|
|
||||||
if symbol in ['SAVE','BA','NFLX','LLY','MSFT','META','NVDA','AAPL','GME']:
|
if symbol in ['ORCL','SAVE','BA','NFLX','LLY','MSFT','META','NVDA','AAPL','GME']:
|
||||||
column_list = ["srt:ProductOrServiceAxis"]
|
column_list = ["srt:ProductOrServiceAxis"]
|
||||||
else:
|
else:
|
||||||
column_list = ["srt:ProductOrServiceAxis", "us-gaap:StatementBusinessSegmentsAxis"]
|
column_list = ["srt:ProductOrServiceAxis", "us-gaap:StatementBusinessSegmentsAxis"]
|
||||||
@ -461,5 +464,5 @@ def run(symbol):
|
|||||||
ujson.dump(final_dataset, file)
|
ujson.dump(final_dataset, file)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
for symbol in ['GOOGL']: #['AMD','SAVE','BA','ADBE','NFLX','PLTR','MSFT','META','TSLA','NVDA','AAPL','GME']:
|
for symbol in ['ORCL']: #['GOOGL','AMD','SAVE','BA','ADBE','NFLX','PLTR','MSFT','META','TSLA','NVDA','AAPL','GME']:
|
||||||
run(symbol)
|
run(symbol)
|
||||||
Loading…
x
Reference in New Issue
Block a user