Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- .gradio/flagged/dataset1.csv +3 -0
- Chart 1.csv +40 -0
- README.md +3 -9
- __pycache__/app_api.cpython-311.pyc +0 -0
- app.py +35 -0
- gw chart _country.png +0 -0
- requirements.txt +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
.gradio/flagged/dataset1.csv filter=lfs diff=lfs merge=lfs -text
|
.gradio/flagged/dataset1.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6c0626727df0ba581be5a6b356ee5864fddade8afd93b5339d578fc48223a451
|
3 |
+
size 19623678
|
Chart 1.csv
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Country you practice in,count(Screening Number),Screening Number
|
2 |
+
Pakistan,266,0SC-2865460SC-2873130SC-2873177SC-2873178SC-2873181SC-2881387SC-2881391SC-2881394SC-2881396SC-2881401SC-2881403SC-2881404SC-2881405SC-2881482SC-2881542SC-2881545SC-2881551SC-2881558SC-2881559SC-2881561SC-2881565SC-2881606SC-2881691SC-2881827SC-2881849SC-2881870SC-2881884SC-2884635SC-2884637SC-2884642SC-2884643SC-2884644SC-2884647SC-2884648SC-2884649SC-2884650SC-2884654SC-2884655SC-2884658SC-2884659SC-2884660SC-2884664SC-2884666SC-2884667SC-2884669SC-2884673SC-2884677SC-2884684SC-2884686SC-2884691SC-2884697SC-2884698SC-2884699SC-2884702SC-2884704SC-2884708SC-2884710SC-2884714SC-2884723SC-2884727SC-2884745SC-2884747SC-2884748SC-2884751SC-2884753SC-2884754SC-2884756SC-2884772SC-2884773SC-2884776SC-2884783SC-2884790SC-2884792SC-2884799SC-2884804SC-2884839SC-2884842SC-2884847SC-2884922SC-2884957SC-2884958SC-2884966SC-2884969SC-2885006SC-2885076SC-2885236SC-2885260SC-2885340SC-2885354SC-2885355SC-2885360SC-2885361SC-2885362SC-2885364SC-2885368SC-2885371SC-2885406SC-2885411SC-2885421SC-2885571SC-2885663SC-2885664SC-2885683SC-2885848SC-2889628SC-2892846SC-2894692SC-2894793SC-2895740SC-2902242SC-2902468SC-2908466SC-2923608SC-2925268SC-2925276SC-2925280SC-2925281SC-2925282SC-2925284SC-2925285SC-2925289SC-2925291SC-2925293SC-2925301SC-2925303SC-2925311SC-2925312SC-2925315SC-2925318SC-2925321SC-2925325SC-2925333SC-2925346SC-2925349SC-2925351SC-2925356SC-2925357SC-2925358SC-2925364SC-2925366SC-2925367SC-2925371SC-2925385SC-2925404SC-2925414SC-2925416SC-2925419SC-2925421SC-2925423SC-2925424SC-2925425SC-2925429SC-2925431SC-2925432SC-2925440SC-2925443SC-2925449SC-2925450SC-2925455SC-2925460SC-2925462SC-2925467SC-2925472SC-2925473SC-2925474SC-2925475SC-2925478SC-2925481SC-2925482SC-2925487SC-2925492SC-2925493SC-2925499SC-2925505SC-2925552SC-2925567SC-2925592SC-2925593SC-2925594SC-2925595SC-2925597SC-2925598SC-2925599SC-2925601SC-2925604SC-2925605SC-2925607SC-2925610SC-2925611SC-2925612SC-2925613SC-2925616SC-2925617SC-2925618SC-2925619SC-2925620SC-2925621SC-2925622SC-2925623SC-2925625SC-2925626SC-2925627SC-2925628SC-2925630SC-2925631SC-2925632SC-2925633SC-2925634SC-2925636SC-2925637SC-2925639SC-2925641SC-2925642SC-2925643SC-2925644SC-2925645SC-2925648SC-2925649SC-2925652SC-2925653SC-2925654SC-2925655SC-2925657SC-2925658SC-2925659SC-2925661SC-2925662SC-2925674SC-2925688SC-2925700SC-2925710SC-2925730SC-2925748SC-2925756SC-2925759SC-2925760SC-2925763SC-2925764SC-2925770SC-2925774SC-2925783SC-2925828SC-2925852SC-2925855SC-2925859SC-2925862SC-2925863SC-2925864SC-2925865SC-2925867SC-2925868SC-2925872SC-2925892SC-2925894SC-2925913SC-2925915SC-2925948SC-2926261SC-2926431SC-2926692SC-2926763SC-2926969SC-2927121SC-2927158SC-2927264SC-2927724
|
3 |
+
USA,56,0SC-2872943SC-2872953SC-2872956SC-2872958SC-2872978SC-2872986SC-2873016SC-2873024SC-2873029SC-2873033SC-2873042SC-2873070SC-2873073SC-2873075SC-2873129SC-2873132SC-2873182SC-2873185SC-2873187SC-2873188SC-2873194SC-2873229SC-2881022SC-2881633SC-2881787SC-2882948SC-2884324SC-2885539SC-2885540SC-2885577SC-2885590SC-2885642SC-2885647SC-2885648SC-2885649SC-2885662SC-2885950SC-2886000SC-2889775SC-2889817SC-2889891SC-2895727SC-2900473SC-2911925SC-2911930SC-2911938SC-2912012SC-2912105SC-2912334SC-2912647SC-2912909SC-2919726SC-2919792SC-2922152SC-2923607SC-2926104
|
4 |
+
Canada,2,0SC-2872948SC-2894797
|
5 |
+
Ethiopia,1,0SC-2872964
|
6 |
+
Ukraine,4,0SC-2872968SC-2881840SC-2885507SC-2912027
|
7 |
+
Barbados,1,0SC-2872991
|
8 |
+
Nigeria,5,0SC-2873000SC-2881318SC-2881372SC-2895730SC-2912101
|
9 |
+
Panama,2,0SC-2873018SC-2911919
|
10 |
+
Puerto Rico,3,0SC-2873064SC-2911916SC-2912070
|
11 |
+
India,60,0SC-2873067SC-2882043SC-2884687SC-2884688SC-2884689SC-2884692SC-2884717SC-2884731SC-2884734SC-2884735SC-2884736SC-2884758SC-2884774SC-2884825SC-2884865SC-2885052SC-2885326SC-2885328SC-2885329SC-2885331SC-2885345SC-2885347SC-2885348SC-2885357SC-2885490SC-2895729SC-2895741SC-2895742SC-2895746SC-2895768SC-2895775SC-2901388SC-2911923SC-2911927SC-2925570SC-2927780SC-2927782SC-2927784SC-2927788SC-2927790SC-2927791SC-2927792SC-2927793SC-2927794SC-2927798SC-2927799SC-2927800SC-2927801SC-2927802SC-2927803SC-2927804SC-2927805SC-2927807SC-2927808SC-2927811SC-2927821SC-2927822SC-2927823SC-2927867SC-2927875
|
12 |
+
Peru,3,0SC-2873068SC-2881432SC-2885993
|
13 |
+
Iraq,1,0SC-2873076
|
14 |
+
Jordan,5,0SC-2873078SC-2927824SC-2928572SC-2929522SC-2929815
|
15 |
+
Ghana,4,0SC-2881223SC-2881407SC-2882144SC-2911924
|
16 |
+
South Africa,6,0SC-2881285SC-2881321SC-2881411SC-2885521SC-2885881SC-2927674
|
17 |
+
Guatemala,2,0SC-2881299SC-2912092
|
18 |
+
Nicaragua,1,0SC-2881310
|
19 |
+
Haiti,1,0SC-2881475
|
20 |
+
china,1,0SC-2881514
|
21 |
+
Argentina,2,0SC-2881705SC-2898746
|
22 |
+
Australia,1,0SC-2881726
|
23 |
+
Vietnam,1,0SC-2881878
|
24 |
+
Namibia,1,0SC-2881919
|
25 |
+
Rwanda,3,0SC-2882150SC-2882610SC-2886018
|
26 |
+
Papua New Guinea,1,0SC-2882912
|
27 |
+
Kuwait,1,0SC-2884678
|
28 |
+
UAE,2,0SC-2884695SC-2925650
|
29 |
+
Malawi,6,0SC-2885384SC-2932564SC-2932565SC-2932586SC-2932642SC-2932782
|
30 |
+
Nepal,1,0SC-2885462
|
31 |
+
Brazil,5,0SC-2885497SC-2899504SC-2899910SC-2909890SC-2931811
|
32 |
+
dominican republic,1,0SC-2885506
|
33 |
+
Mexico,6,0SC-2885530SC-2885536SC-2911968SC-2912020SC-2912148SC-2931850
|
34 |
+
Bosnia and Herzegovina,1,0SC-2885624
|
35 |
+
Thailand,2,0SC-2885715SC-2904697
|
36 |
+
Indonesia,3,0SC-2885855SC-2885871SC-2889637
|
37 |
+
Ecuador,2,0SC-2895401SC-2931813
|
38 |
+
Oman,3,0SC-2895467SC-2895494SC-2895751
|
39 |
+
Colombia,1,0SC-2911959
|
40 |
+
Venezuela,1,0SC-2912062
|
README.md
CHANGED
@@ -1,12 +1,6 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji: 👁
|
4 |
-
colorFrom: purple
|
5 |
-
colorTo: gray
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 5.9.1
|
8 |
app_file: app.py
|
9 |
-
|
|
|
10 |
---
|
11 |
-
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: PyGwalker_dashboard
|
|
|
|
|
|
|
|
|
|
|
3 |
app_file: app.py
|
4 |
+
sdk: gradio
|
5 |
+
sdk_version: 5.0.2
|
6 |
---
|
|
|
|
__pycache__/app_api.cpython-311.pyc
ADDED
Binary file (6.11 kB). View file
|
|
app.py
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
import pygwalker as pyg
|
3 |
+
import gradio as gr
|
4 |
+
|
5 |
+
#df = pd.read_csv("C:\\Users\\tooba.alvi\\OneDrive - Aga Khan University\\Documents\\GitHub\\PyG Walker\\WorldBank.csv", encoding= "utf-8")
|
6 |
+
url="https://raw.githubusercontent.com/ToobaAhmedAlvi/PyG_Walker_dashboard/main/WorldBank.csv"
|
7 |
+
df = pd.read_csv(url, index_col=0)
|
8 |
+
|
9 |
+
# Define a function to create the dashboard
|
10 |
+
'''
|
11 |
+
def create_dashboard():
|
12 |
+
df = pd.read_csv("C:\\Users\\tooba.alvi\\OneDrive - Aga Khan University\\Documents\\GitHub\\PyG Walker\\WorldBank.csv", encoding= "utf-8")
|
13 |
+
pyg.walk(df)
|
14 |
+
return pyg.get_html()
|
15 |
+
'''
|
16 |
+
|
17 |
+
def display_data():
|
18 |
+
url="https://raw.githubusercontent.com/ToobaAhmedAlvi/PyG_Walker_dashboard/main/WorldBank.csv"
|
19 |
+
df = pd.read_csv(url, index_col=0)
|
20 |
+
#df = pd.read_csv("C:\\Users\\tooba.alvi\\OneDrive - Aga Khan University\\Documents\\GitHub\\PyG Walker\\WorldBank.csv", encoding= "utf-8")
|
21 |
+
df=pd.DataFrame(df)
|
22 |
+
pyg.walk(df)
|
23 |
+
pyg_html = pyg.to_html(df)
|
24 |
+
vis_spec=r"""{"config":[{"config":{"defaultAggregated":true,"geoms":["auto"],"coordSystem":"generic","limit":-1,"timezoneDisplayOffset":0},"encodings":{"dimensions":[{"fid":"Year","name":"Year","basename":"Year","analyticType":"dimension","semanticType":"ordinal","aggName":"sum","offset":0},{"fid":"Country Name","name":"Country Name","basename":"Country Name","semanticType":"nominal","analyticType":"dimension","offset":0},{"fid":"Country Code","name":"Country Code","basename":"Country Code","semanticType":"nominal","analyticType":"dimension","offset":0},{"fid":"Region","name":"Region","basename":"Region","semanticType":"nominal","analyticType":"dimension","offset":0},{"fid":"IncomeGroup","name":"IncomeGroup","basename":"IncomeGroup","semanticType":"nominal","analyticType":"dimension","offset":0},{"fid":"gw_mea_key_fid","name":"Measure names","analyticType":"dimension","semanticType":"nominal"}],"measures":[{"fid":"Birth rate, crude (per 1,000 people)","name":"Birth rate, crude (per 1,000 people)","basename":"Birth rate, crude (per 1,000 people)","analyticType":"measure","semanticType":"quantitative","aggName":"sum","offset":0},{"fid":"Death rate, crude (per 1,000 people)","name":"Death rate, crude (per 1,000 people)","basename":"Death rate, crude (per 1,000 people)","analyticType":"measure","semanticType":"quantitative","aggName":"sum","offset":0},{"fid":"Electric power consumption (kWh per capita)","name":"Electric power consumption (kWh per capita)","basename":"Electric power consumption (kWh per capita)","analyticType":"measure","semanticType":"quantitative","aggName":"sum","offset":0},{"fid":"GDP (USD)","name":"GDP (USD)","basename":"GDP (USD)","analyticType":"measure","semanticType":"quantitative","aggName":"sum","offset":0},{"fid":"GDP per capita (USD)","name":"GDP per capita (USD)","basename":"GDP per capita (USD)","analyticType":"measure","semanticType":"quantitative","aggName":"sum","offset":0},{"fid":"Individuals using the Internet (% of population)","name":"Individuals using the Internet (% of population)","basename":"Individuals using the Internet (% of population)","analyticType":"measure","semanticType":"quantitative","aggName":"sum","offset":0},{"fid":"Infant mortality rate (per 1,000 live births)","name":"Infant mortality rate (per 1,000 live births)","basename":"Infant mortality rate (per 1,000 live births)","analyticType":"measure","semanticType":"quantitative","aggName":"sum","offset":0},{"fid":"Life expectancy at birth (years)","name":"Life expectancy at birth (years)","basename":"Life expectancy at birth (years)","analyticType":"measure","semanticType":"quantitative","aggName":"sum","offset":0},{"fid":"Population density (people per sq. km of land area)","name":"Population density (people per sq. km of land area)","basename":"Population density (people per sq. km of land area)","analyticType":"measure","semanticType":"quantitative","aggName":"sum","offset":0},{"fid":"Unemployment (% of total labor force) (modeled ILO estimate)","name":"Unemployment (% of total labor force) (modeled ILO estimate)","basename":"Unemployment (% of total labor force) (modeled ILO estimate)","analyticType":"measure","semanticType":"quantitative","aggName":"sum","offset":0},{"fid":"gw_count_fid","name":"Row count","analyticType":"measure","semanticType":"quantitative","aggName":"sum","computed":true,"expression":{"op":"one","params":[],"as":"gw_count_fid"}},{"fid":"gw_mea_val_fid","name":"Measure values","analyticType":"measure","semanticType":"quantitative","aggName":"sum"}],"rows":[{"fid":"Birth rate, crude (per 1,000 people)","name":"Birth rate, crude (per 1,000 people)","basename":"Birth rate, crude (per 1,000 people)","analyticType":"measure","semanticType":"quantitative","aggName":"mean","offset":0}],"columns":[{"fid":"Year","name":"Year","basename":"Year","analyticType":"dimension","semanticType":"ordinal","aggName":"sum","offset":0}],"color":[{"fid":"IncomeGroup","name":"IncomeGroup","basename":"IncomeGroup","semanticType":"nominal","analyticType":"dimension","offset":0}],"opacity":[],"size":[],"shape":[],"radius":[],"theta":[],"longitude":[],"latitude":[],"geoId":[],"details":[],"filters":[{"fid":"IncomeGroup","name":"IncomeGroup","basename":"IncomeGroup","semanticType":"nominal","analyticType":"dimension","offset":0,"rule":null}],"text":[]},"layout":{"showActions":false,"showTableSummary":false,"stack":"stack","interactiveScale":false,"zeroScale":true,"size":{"mode":"auto","width":320,"height":200},"format":{},"geoKey":"name","resolve":{"x":false,"y":false,"color":false,"opacity":false,"shape":false,"size":false}},"visId":"gw_DGUp","name":"Chart 1"}],"chart_map":{},"workflow_list":[{"workflow":[{"type":"view","query":[{"op":"aggregate","groupBy":["Year","IncomeGroup"],"measures":[{"field":"Birth rate, crude (per 1,000 people)","agg":"mean","asFieldKey":"Birth rate, crude (per 1,000 people)_mean"}]}]}]}],"version":"0.4.8.10"}"""
|
25 |
+
return pyg_html
|
26 |
+
|
27 |
+
|
28 |
+
# Create a Gradio interface
|
29 |
+
interface = gr.Interface(fn=display_data,
|
30 |
+
inputs=[],
|
31 |
+
outputs="html",
|
32 |
+
title="My Dashboard with PyG Walker")
|
33 |
+
|
34 |
+
# Launch the interface
|
35 |
+
interface.launch(share='True')
|
gw chart _country.png
ADDED
![]() |
requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
gradio
|
2 |
+
pygwalker
|
3 |
+
pandas
|