Upload 3 files
#1
by
Krazybeautiful85
- opened
- README (7).md +3 -0
- choropleth-maps.py +36 -0
- gitattributes (7).txt +51 -0
README (7).md
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: afl-3.0
|
3 |
+
---
|
choropleth-maps.py
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from dash import Dash, dcc, html, Input, Output
|
2 |
+
import plotly.express as px
|
3 |
+
|
4 |
+
app = Dash(__name__)
|
5 |
+
|
6 |
+
|
7 |
+
app.layout = html.Div([
|
8 |
+
html.H4('Polotical candidate voting pool analysis'),
|
9 |
+
html.P("Select a candidate:"),
|
10 |
+
dcc.RadioItems(
|
11 |
+
id='choropleth-maps-x-candidate',
|
12 |
+
options=["Joly", "Coderre", "Bergeron"],
|
13 |
+
value="Coderre",
|
14 |
+
inline=True
|
15 |
+
),
|
16 |
+
dcc.Graph(id="choropleth-maps-x-graph"),
|
17 |
+
])
|
18 |
+
|
19 |
+
|
20 |
+
@app.callback(
|
21 |
+
Output("choropleth-maps-x-graph", "figure"),
|
22 |
+
Input("choropleth-maps-x-candidate", "value"))
|
23 |
+
def display_choropleth(candidate):
|
24 |
+
df = px.data.election() # replace with your own data source
|
25 |
+
geojson = px.data.election_geojson()
|
26 |
+
fig = px.choropleth(
|
27 |
+
df, geojson=geojson, color=candidate,
|
28 |
+
locations="district", featureidkey="properties.district",
|
29 |
+
projection="mercator", range_color=[0, 6500])
|
30 |
+
fig.update_geos(fitbounds="locations", visible=False)
|
31 |
+
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
|
32 |
+
return fig
|
33 |
+
|
34 |
+
|
35 |
+
if __name__ == "__main__":
|
36 |
+
app.run_server(debug=True)
|
gitattributes (7).txt
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lz4 filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
20 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
24 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
31 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
33 |
+
# Audio files - uncompressed
|
34 |
+
*.pcm filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*.sam filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.raw filter=lfs diff=lfs merge=lfs -text
|
37 |
+
# Audio files - compressed
|
38 |
+
*.aac filter=lfs diff=lfs merge=lfs -text
|
39 |
+
*.flac filter=lfs diff=lfs merge=lfs -text
|
40 |
+
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
41 |
+
*.ogg filter=lfs diff=lfs merge=lfs -text
|
42 |
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
43 |
+
# Image files - uncompressed
|
44 |
+
*.bmp filter=lfs diff=lfs merge=lfs -text
|
45 |
+
*.gif filter=lfs diff=lfs merge=lfs -text
|
46 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
47 |
+
*.tiff filter=lfs diff=lfs merge=lfs -text
|
48 |
+
# Image files - compressed
|
49 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
50 |
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
51 |
+
*.webp filter=lfs diff=lfs merge=lfs -text
|