File size: 737 Bytes
d863e72
f461271
d34aea0
5dcdc61
5e2d822
81dff67
f8ca16c
06e5f8b
e133ffb
06e5f8b
6633d16
cb72a5f
 
 
 
 
 
 
 
 
d7de914
6a34f39
6029005
 
 
 
 
5dcdc61
e133ffb
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#import definitions
import pandas as pd
import streamlit as st

df = pd.read_csv('Map-City-State-Zip-Lat-Long.txt', dtype=str, sep=';') 


st.title("Input a city or zip code and we will take you there!")

city_name = st.text_input("Please search for a city:")

if city_name != "": 
    lat = df[df["City"] == city_name]["Latitude"].values[0]
    lon = df[df["City"] == city_name]["Longitude"].values[0]
    
    st.write(lat)
    st.write(lon)
    city_list = []
    lat_list = []
    long_list = []


    #city_list.append(city_name)
    #lat_list.append(lat)
    #long_list.append(lon)
    #st.map(pd.DataFrame({'cities' : city_list, 'lat' : lat_list, 'lon' : long_list}))
    #st.write(city_name, "is located at: ", lat, ",", lon)