Penguni commited on
Commit
1f5d4a3
·
verified ·
1 Parent(s): f482baf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -1,7 +1,19 @@
1
  import streamlit as st
2
  import pandas as pd
3
  import plotly.express as px
4
-
 
 
 
 
 
 
 
 
 
 
 
 
5
  # Country mapping dictionary
6
  country_mapping = {
7
  'United States': 'USA',
 
1
  import streamlit as st
2
  import pandas as pd
3
  import plotly.express as px
4
+ def assign_color(count):
5
+ if count <= 10:
6
+ return '1-10'
7
+ elif count <= 50:
8
+ return '10-50'
9
+ elif count <= 100:
10
+ return '50-100'
11
+ elif count <= 500:
12
+ return '100-500'
13
+ elif count <= 1000:
14
+ return '500-1000'
15
+ else:
16
+ return '>1000'
17
  # Country mapping dictionary
18
  country_mapping = {
19
  'United States': 'USA',