Spaces:
Runtime error
Runtime error
add app file
Browse files- app.py +85 -0
- environment.yml +157 -0
app.py
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
|
4 |
+
from prettymaps import plot
|
5 |
+
|
6 |
+
x = st.slider("Select a value")
|
7 |
+
st.write(x, "squared is", x * x)
|
8 |
+
|
9 |
+
|
10 |
+
# import uuid
|
11 |
+
|
12 |
+
# # import typer
|
13 |
+
# # import vsketch
|
14 |
+
# from prettymaps import *
|
15 |
+
# import matplotlib.font_manager as fm
|
16 |
+
# from matplotlib import pyplot as plt
|
17 |
+
|
18 |
+
|
19 |
+
# def draw(
|
20 |
+
# location: str = "Müvezzi Cd. No:15, Istanbul", radius: int = 1000, width: int = 12, height: int = 12
|
21 |
+
# ):
|
22 |
+
# fig, ax = plt.subplots(figsize=(width, height), constrained_layout=True)
|
23 |
+
|
24 |
+
# backup = plot(
|
25 |
+
# location,
|
26 |
+
# radius=radius,
|
27 |
+
# ax=ax,
|
28 |
+
# layers={
|
29 |
+
# # Perimeter (in this case, a circle)
|
30 |
+
# "perimeter": {},
|
31 |
+
# # Streets and their widths
|
32 |
+
# "streets": {
|
33 |
+
# "width": {
|
34 |
+
# "motorway": 5,
|
35 |
+
# "trunk": 5,
|
36 |
+
# "primary": 4.5,
|
37 |
+
# "secondary": 4,
|
38 |
+
# "tertiary": 3.5,
|
39 |
+
# "residential": 3,
|
40 |
+
# "service": 2,
|
41 |
+
# "unclassified": 2,
|
42 |
+
# "pedestrian": 2,
|
43 |
+
# "footway": 1,
|
44 |
+
# }
|
45 |
+
# },
|
46 |
+
# # Other layers:
|
47 |
+
# # Specify a name (for example, 'building') and which OpenStreetMap tags to fetch
|
48 |
+
# "building": {"tags": {"building": True, "landuse": "construction"}, "union": False},
|
49 |
+
# "water": {"tags": {"natural": ["water", "bay"]}},
|
50 |
+
# "green": {"tags": {"landuse": "grass", "natural": ["island", "wood"], "leisure": "park"}},
|
51 |
+
# "forest": {"tags": {"landuse": "forest"}},
|
52 |
+
# "parking": {"tags": {"amenity": "parking", "highway": "pedestrian", "man_made": "pier"}},
|
53 |
+
# },
|
54 |
+
# # drawing_kwargs:
|
55 |
+
# # Reference a name previously defined in the 'layers' argument and specify matplotlib parameters to draw it
|
56 |
+
# drawing_kwargs={
|
57 |
+
# "background": {"fc": "#F2F4CB", "ec": "#dadbc1", "hatch": "ooo...", "zorder": -1},
|
58 |
+
# "perimeter": {"fc": "#F2F4CB", "ec": "#dadbc1", "lw": 0, "hatch": "ooo...", "zorder": 0},
|
59 |
+
# "green": {"fc": "#D0F1BF", "ec": "#2F3737", "lw": 1, "zorder": 1},
|
60 |
+
# "forest": {"fc": "#64B96A", "ec": "#2F3737", "lw": 1, "zorder": 1},
|
61 |
+
# "water": {
|
62 |
+
# "fc": "#a1e3ff",
|
63 |
+
# "ec": "#2F3737",
|
64 |
+
# "hatch": "ooo...",
|
65 |
+
# "hatch_c": "#85c9e6",
|
66 |
+
# "lw": 1,
|
67 |
+
# "zorder": 2,
|
68 |
+
# },
|
69 |
+
# "parking": {"fc": "#F2F4CB", "ec": "#2F3737", "lw": 1, "zorder": 3},
|
70 |
+
# "streets": {"fc": "#2F3737", "ec": "#475657", "alpha": 1, "lw": 0, "zorder": 3},
|
71 |
+
# "building": {
|
72 |
+
# "palette": ["#FFC857", "#E9724C", "#C5283D"],
|
73 |
+
# "ec": "#2F3737",
|
74 |
+
# "lw": 0.5,
|
75 |
+
# "zorder": 4,
|
76 |
+
# },
|
77 |
+
# },
|
78 |
+
# )
|
79 |
+
|
80 |
+
# filename = str(uuid.uuid4()).split("-")[0] + ".png"
|
81 |
+
# plt.savefig(filename)
|
82 |
+
# print(filename)
|
83 |
+
|
84 |
+
|
85 |
+
# draw()
|
environment.yml
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: py38
|
2 |
+
channels:
|
3 |
+
- conda-forge
|
4 |
+
dependencies:
|
5 |
+
- attrs=21.4.0=pyhd8ed1ab_0
|
6 |
+
- blosc=1.21.1=hd414afc_3
|
7 |
+
- boost-cpp=1.74.0=h1cb353e_8
|
8 |
+
- branca=0.5.0=pyhd8ed1ab_0
|
9 |
+
- brotli=1.0.9=h1c322ee_7
|
10 |
+
- brotli-bin=1.0.9=h1c322ee_7
|
11 |
+
- brotlipy=0.7.0=py38h33210d7_1004
|
12 |
+
- bzip2=1.0.8=h3422bc3_4
|
13 |
+
- c-ares=1.18.1=h3422bc3_0
|
14 |
+
- ca-certificates=2022.6.15=h4653dfc_0
|
15 |
+
- cairo=1.16.0=h3e596be_1011
|
16 |
+
- certifi=2022.6.15=py38h10201cd_0
|
17 |
+
- cffi=1.15.1=py38h0e10f82_0
|
18 |
+
- cfitsio=4.1.0=hd4f5c17_0
|
19 |
+
- charset-normalizer=2.1.0=pyhd8ed1ab_0
|
20 |
+
- click=8.1.3=py38h10201cd_0
|
21 |
+
- click-plugins=1.1.1=py_0
|
22 |
+
- cligj=0.7.2=pyhd8ed1ab_1
|
23 |
+
- cryptography=37.0.4=py38h530bd25_0
|
24 |
+
- curl=7.83.1=h2fcd78c_0
|
25 |
+
- cycler=0.11.0=pyhd8ed1ab_0
|
26 |
+
- descartes=1.1.0=py_4
|
27 |
+
- expat=2.4.8=h6b3803e_0
|
28 |
+
- fiona=1.8.21=py38h6cbfdb8_2
|
29 |
+
- folium=0.12.1.post1=pyhd8ed1ab_1
|
30 |
+
- font-ttf-dejavu-sans-mono=2.37=hab24e00_0
|
31 |
+
- font-ttf-inconsolata=3.000=h77eed37_0
|
32 |
+
- font-ttf-source-code-pro=2.038=h77eed37_0
|
33 |
+
- font-ttf-ubuntu=0.83=hab24e00_0
|
34 |
+
- fontconfig=2.14.0=hfb34624_0
|
35 |
+
- fonts-conda-ecosystem=1=0
|
36 |
+
- fonts-conda-forge=1=0
|
37 |
+
- fonttools=4.34.4=py38he5c2ac2_0
|
38 |
+
- freetype=2.10.4=h17b34a0_1
|
39 |
+
- freexl=1.0.6=h27ca646_0
|
40 |
+
- gdal=3.5.1=py38hd5b0be9_1
|
41 |
+
- geopandas=0.11.0=pyhd8ed1ab_0
|
42 |
+
- geopandas-base=0.11.0=pyha770c72_0
|
43 |
+
- geos=3.11.0=h9a09cb3_0
|
44 |
+
- geotiff=1.7.1=hc898e3f_3
|
45 |
+
- gettext=0.19.8.1=h049c9fb_1008
|
46 |
+
- giflib=5.2.1=h27ca646_2
|
47 |
+
- hdf4=4.2.15=h0ef36ac_3
|
48 |
+
- hdf5=1.12.1=nompi_hf9525e8_104
|
49 |
+
- icu=70.1=h6b3803e_0
|
50 |
+
- idna=3.3=pyhd8ed1ab_0
|
51 |
+
- jinja2=3.1.2=pyhd8ed1ab_1
|
52 |
+
- joblib=1.1.0=pyhd8ed1ab_0
|
53 |
+
- jpeg=9e=he4db4b2_2
|
54 |
+
- json-c=0.16=hc449e50_0
|
55 |
+
- kealib=1.4.14=hca62043_4
|
56 |
+
- kiwisolver=1.4.4=py38haa2428a_0
|
57 |
+
- krb5=1.19.3=hf9b2bbe_0
|
58 |
+
- lcms2=2.12=had6a04f_0
|
59 |
+
- lerc=3.0=hbdafb3b_0
|
60 |
+
- libblas=3.9.0=15_osxarm64_openblas
|
61 |
+
- libbrotlicommon=1.0.9=h1c322ee_7
|
62 |
+
- libbrotlidec=1.0.9=h1c322ee_7
|
63 |
+
- libbrotlienc=1.0.9=h1c322ee_7
|
64 |
+
- libcblas=3.9.0=15_osxarm64_openblas
|
65 |
+
- libcurl=7.83.1=h2fcd78c_0
|
66 |
+
- libcxx=14.0.6=h04bba0f_0
|
67 |
+
- libdap4=3.20.6=h8510809_2
|
68 |
+
- libdeflate=1.12=he4db4b2_0
|
69 |
+
- libedit=3.1.20191231=hc8eb9b7_2
|
70 |
+
- libev=4.33=h642e427_1
|
71 |
+
- libffi=3.4.2=h3422bc3_5
|
72 |
+
- libgdal=3.5.1=h125b1ee_1
|
73 |
+
- libgfortran=5.0.0.dev0=11_0_1_hf114ba7_23
|
74 |
+
- libgfortran5=11.0.1.dev0=hf114ba7_23
|
75 |
+
- libglib=2.72.1=ha1047ec_0
|
76 |
+
- libiconv=1.16=h642e427_0
|
77 |
+
- libkml=1.3.0=h893ab4d_1014
|
78 |
+
- liblapack=3.9.0=15_osxarm64_openblas
|
79 |
+
- libnetcdf=4.8.1=nompi_h96a3436_102
|
80 |
+
- libnghttp2=1.47.0=he723fca_0
|
81 |
+
- libopenblas=0.3.20=openmp_h2209c59_0
|
82 |
+
- libpng=1.6.37=h2c9beb0_3
|
83 |
+
- libpq=14.4=h8ab49ba_0
|
84 |
+
- librttopo=1.1.0=h275bb25_11
|
85 |
+
- libspatialindex=1.9.3=hbdafb3b_4
|
86 |
+
- libspatialite=5.0.1=h47b1232_18
|
87 |
+
- libssh2=1.10.0=hb80f160_2
|
88 |
+
- libtiff=4.4.0=hcbbed22_1
|
89 |
+
- libwebp=1.2.2=h0d20362_0
|
90 |
+
- libwebp-base=1.2.2=h3422bc3_1
|
91 |
+
- libxcb=1.13=h9b22ae9_1004
|
92 |
+
- libxml2=2.9.14=h035c1df_3
|
93 |
+
- libzip=1.9.2=h8caee39_0
|
94 |
+
- libzlib=1.2.12=ha287fd2_2
|
95 |
+
- llvm-openmp=14.0.4=hd125106_0
|
96 |
+
- lz4-c=1.9.3=hbdafb3b_1
|
97 |
+
- mapclassify=2.4.3=pyhd8ed1ab_0
|
98 |
+
- markupsafe=2.1.1=py38h33210d7_1
|
99 |
+
- matplotlib-base=3.5.2=py38hd7f6e49_0
|
100 |
+
- munch=2.5.0=py_0
|
101 |
+
- munkres=1.1.4=pyh9f0ad1d_0
|
102 |
+
- ncurses=6.3=h07bb92c_1
|
103 |
+
- networkx=2.8.5=pyhd8ed1ab_0
|
104 |
+
- nspr=4.32=hbdafb3b_1
|
105 |
+
- nss=3.78=h1483a63_0
|
106 |
+
- numpy=1.23.1=py38he1fcd3f_0
|
107 |
+
- openjpeg=2.4.0=h062765e_1
|
108 |
+
- openssl=1.1.1q=ha287fd2_0
|
109 |
+
- packaging=21.3=pyhd8ed1ab_0
|
110 |
+
- pandas=1.4.3=py38h6724fcd_0
|
111 |
+
- pcre=8.45=hbdafb3b_0
|
112 |
+
- pillow=9.2.0=py38h3852883_0
|
113 |
+
- pip=22.1.2=pyhd8ed1ab_0
|
114 |
+
- pixman=0.40.0=h27ca646_0
|
115 |
+
- poppler=22.04.0=hadf1f10_1
|
116 |
+
- poppler-data=0.4.11=hd8ed1ab_0
|
117 |
+
- postgresql=14.4=heaa1073_0
|
118 |
+
- prettymaps=0.1.3=pyhd8ed1ab_0
|
119 |
+
- proj=9.0.1=h4c79c2b_1
|
120 |
+
- pthread-stubs=0.4=h27ca646_1001
|
121 |
+
- pycparser=2.21=pyhd8ed1ab_0
|
122 |
+
- pyopenssl=22.0.0=pyhd8ed1ab_0
|
123 |
+
- pyparsing=3.0.9=pyhd8ed1ab_0
|
124 |
+
- pyproj=3.3.1=py38hb16ab4f_1
|
125 |
+
- pysocks=1.7.1=py38h10201cd_5
|
126 |
+
- python=3.8.13=h7e095e3_0_cpython
|
127 |
+
- python-dateutil=2.8.2=pyhd8ed1ab_0
|
128 |
+
- python_abi=3.8=2_cp38
|
129 |
+
- pytz=2022.1=pyhd8ed1ab_0
|
130 |
+
- readline=8.1.2=h46ed386_0
|
131 |
+
- requests=2.28.1=pyhd8ed1ab_0
|
132 |
+
- rtree=1.0.0=py38hb34dff0_1
|
133 |
+
- scikit-learn=1.1.1=py38hddc176c_0
|
134 |
+
- scipy=1.8.1=py38h4f188a7_0
|
135 |
+
- setuptools=63.2.0=py38h10201cd_0
|
136 |
+
- shapely=1.8.2=py38h7253250_3
|
137 |
+
- six=1.16.0=pyh6c4a22f_0
|
138 |
+
- snappy=1.1.9=h39c3846_1
|
139 |
+
- sqlite=3.39.1=h40dfcc0_0
|
140 |
+
- tabulate=0.8.9=pyhd8ed1ab_0
|
141 |
+
- threadpoolctl=3.1.0=pyh8a188c0_0
|
142 |
+
- tiledb=2.9.4=hdd33e7b_0
|
143 |
+
- tk=8.6.12=he1e0b03_0
|
144 |
+
- tzcode=2022a=h1c322ee_0
|
145 |
+
- tzdata=2022a=h191b570_0
|
146 |
+
- unicodedata2=14.0.0=py38h33210d7_1
|
147 |
+
- urllib3=1.26.10=pyhd8ed1ab_0
|
148 |
+
- wheel=0.37.1=pyhd8ed1ab_0
|
149 |
+
- xerces-c=3.2.3=h1b0b642_5
|
150 |
+
- xorg-libxau=1.0.9=h27ca646_0
|
151 |
+
- xorg-libxdmcp=1.1.3=h27ca646_0
|
152 |
+
- xyzservices=2022.6.0=pyhd8ed1ab_0
|
153 |
+
- xz=5.2.5=h642e427_1
|
154 |
+
- zlib=1.2.12=ha287fd2_2
|
155 |
+
- zstd=1.5.2=hd705a24_2
|
156 |
+
- pip:
|
157 |
+
- osmnx==1.2.1
|