Spaces:
Build error
Build error
client footprint mapping
#6
by notjulietxd - opened
- pages/output.py +45 -1
pages/output.py
CHANGED
|
@@ -6,6 +6,40 @@ import time
|
|
| 6 |
|
| 7 |
st.set_page_config(layout="centered")
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
def write_table(website_and_tools_data):
|
| 10 |
|
| 11 |
if website_and_tools_data:
|
|
@@ -136,7 +170,17 @@ This document represents the results of our audit of LoansOne’s digital market
|
|
| 136 |
st.markdown("---")
|
| 137 |
|
| 138 |
st.markdown("### CLIENT FOOTPRINT")
|
| 139 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
st.markdown("---")
|
| 141 |
|
| 142 |
st.markdown("### SNAPSHOT BY CHANNEL")
|
|
|
|
| 6 |
|
| 7 |
st.set_page_config(layout="centered")
|
| 8 |
|
| 9 |
+
def write_client_footprint():
|
| 10 |
+
|
| 11 |
+
web = get_analyst_response("Website and Tools Analyst")
|
| 12 |
+
result_web = {item["category"]: item["current_footprint"] for item in web}
|
| 13 |
+
|
| 14 |
+
seo = get_analyst_response("SEO Analyst")
|
| 15 |
+
seo = {item["category"]: item["current_footprint"] for item in seo}
|
| 16 |
+
|
| 17 |
+
socmed = get_analyst_response("Social Media Analyst")
|
| 18 |
+
socmed = {item["category"]: item["current_footprint"] for item in socmed}
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
markdown_table = "| Source/Channel | Current KPI |\n"
|
| 22 |
+
markdown_table += "|---|---|\n"
|
| 23 |
+
markdown_table += f"| Website Health Score | {result_web['website_overall_health_score']} |\n"
|
| 24 |
+
markdown_table += f"| Organic Traffic to the Website | {seo['organic_traffic']} |\n"
|
| 25 |
+
markdown_table += f"| Paid Traffic to the Website | {seo['paid_traffic']} |\n"
|
| 26 |
+
markdown_table += f"| Referral Traffic to the Website | {seo['referral_traffic']} |\n"
|
| 27 |
+
markdown_table += f"| Email Traffic to the Website | N/A |\n"
|
| 28 |
+
markdown_table += f"| Direct Traffic to the Website | {seo['direct_traffic']} |\n"
|
| 29 |
+
markdown_table += f"| Social Traffic to the Website | N/A |\n"
|
| 30 |
+
markdown_table += f"| Display Traffic to the Website | N/A |\n"
|
| 31 |
+
markdown_table += f"| Email Database | N/A |\n"
|
| 32 |
+
markdown_table += f"| Facebook Followers | {socmed['facebook_followers']} |\n"
|
| 33 |
+
markdown_table += f"| Twitter Followers | {socmed['twitter_followers']} |\n"
|
| 34 |
+
markdown_table += f"| Instagram Followers | {socmed['instagram_followers']} |\n"
|
| 35 |
+
markdown_table += f"| Linkedin Followers | {socmed['linkedin_followers']} |\n"
|
| 36 |
+
markdown_table += f"| Google My Business | N/A |\n"
|
| 37 |
+
markdown_table += f"| # of Keywords Ranking in Top 10 | {seo['keyword_ranking_in_top_10']} |\n"
|
| 38 |
+
markdown_table += f"| # of Keywords Ranking in Top 100 | {seo['keyword_ranking_in_top_100']} |\n"
|
| 39 |
+
|
| 40 |
+
return markdown_table
|
| 41 |
+
|
| 42 |
+
|
| 43 |
def write_table(website_and_tools_data):
|
| 44 |
|
| 45 |
if website_and_tools_data:
|
|
|
|
| 170 |
st.markdown("---")
|
| 171 |
|
| 172 |
st.markdown("### CLIENT FOOTPRINT")
|
| 173 |
+
st.markdown(write_client_footprint())
|
| 174 |
+
st.markdown(
|
| 175 |
+
"""
|
| 176 |
+
<style>
|
| 177 |
+
table{
|
| 178 |
+
width: 100%;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
""",
|
| 182 |
+
unsafe_allow_html=True,
|
| 183 |
+
)
|
| 184 |
st.markdown("---")
|
| 185 |
|
| 186 |
st.markdown("### SNAPSHOT BY CHANNEL")
|