Update app.py
Browse files
app.py
CHANGED
@@ -1,23 +1,9 @@
|
|
1 |
-
import altair as alt
|
2 |
import streamlit as st
|
|
|
|
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
alt.Chart(african_countries)
|
10 |
-
.mark_geoshape(stroke="white", strokeWidth=2)
|
11 |
-
.encode(
|
12 |
-
color="value:Q",
|
13 |
-
tooltip=[
|
14 |
-
alt.Tooltip("properties.geounit:O", title="Country name"),
|
15 |
-
alt.Tooltip("value:Q", title="Indicator value"),
|
16 |
-
],
|
17 |
-
)
|
18 |
-
.transform_lookup(
|
19 |
-
lookup="properties.geounit",
|
20 |
-
from_=alt.LookupData(filtered_data, "Geo Name", ["value"]),
|
21 |
-
)
|
22 |
-
)
|
23 |
-
st.altair_chart(africa_chart)
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
import pandas as pd
|
3 |
+
import numpy as np
|
4 |
|
5 |
+
df = pd.DataFrame(
|
6 |
+
np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4],
|
7 |
+
columns=['lat', 'lon'])
|
8 |
+
|
9 |
+
st.map(df)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|