Spaces:
Sleeping
Sleeping
add industry subclasses and superclasses
Browse files
app.py
CHANGED
|
@@ -56,6 +56,8 @@ with st.spinner(text="Build company df ..."):
|
|
| 56 |
company_df = build_company_df(competitor_df)
|
| 57 |
st.success("Company Data Loaded!")
|
| 58 |
|
|
|
|
|
|
|
| 59 |
# industry_data = pd.read_excel('data/industry_hierarchy_20241125.xlsx')
|
| 60 |
|
| 61 |
### Pre computation Steps ###
|
|
@@ -227,7 +229,17 @@ elif option == "By Industry":
|
|
| 227 |
competitors = competitor_df[competitor_df.industry == industry.industry][['companyLabel', 'companyLabelJA', 'company', 'country', 'countryLabel']].drop_duplicates().copy()
|
| 228 |
st.dataframe(competitors)
|
| 229 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 230 |
|
|
|
|
| 231 |
|
| 232 |
|
| 233 |
elif option == "By Product":
|
|
|
|
| 56 |
company_df = build_company_df(competitor_df)
|
| 57 |
st.success("Company Data Loaded!")
|
| 58 |
|
| 59 |
+
industry_hierarchy = load_pandas_xlsx(INDUSTRY_PATH)
|
| 60 |
+
|
| 61 |
# industry_data = pd.read_excel('data/industry_hierarchy_20241125.xlsx')
|
| 62 |
|
| 63 |
### Pre computation Steps ###
|
|
|
|
| 229 |
competitors = competitor_df[competitor_df.industry == industry.industry][['companyLabel', 'companyLabelJA', 'company', 'country', 'countryLabel']].drop_duplicates().copy()
|
| 230 |
st.dataframe(competitors)
|
| 231 |
|
| 232 |
+
st.title(f'Industry Superclasses of {industry.industryLabel}')
|
| 233 |
+
|
| 234 |
+
superclasses = industry_hierarchy[industry_hierarchy.subject == industry.industry][['object', 'objectLabel', 'objectLabelJa']]
|
| 235 |
+
|
| 236 |
+
st.dataframe(superclasses)
|
| 237 |
+
|
| 238 |
+
st.title(f'Industry Subclasses of {industry.industryLabel}')
|
| 239 |
+
|
| 240 |
+
subclasses = industry_hierarchy[industry_hierarchy.object == industry.industry][['subject', 'subjectLabel', 'subjectLabelJa']]
|
| 241 |
|
| 242 |
+
st.dataframe(subclasses)
|
| 243 |
|
| 244 |
|
| 245 |
elif option == "By Product":
|