-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
[25] - Added Area Served for 3+ Facilities & Updated Readme File
- Loading branch information
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,341 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><span style=\"color:#565656\">Make this Notebook Trusted to load map: File -> Trust Notebook</span><iframe srcdoc=\"<!DOCTYPE html>\n", | ||
"<html>\n", | ||
"<head>\n", | ||
" \n", | ||
" <meta http-equiv="content-type" content="text/html; charset=UTF-8" />\n", | ||
" \n", | ||
" <script>\n", | ||
" L_NO_TOUCH = false;\n", | ||
" L_DISABLE_3D = false;\n", | ||
" </script>\n", | ||
" \n", | ||
" <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>\n", | ||
" <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>\n", | ||
" <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.js"></script>\n", | ||
" <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>\n", | ||
" <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>\n", | ||
" <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>\n", | ||
" <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css"/>\n", | ||
" <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"/>\n", | ||
" <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"/>\n", | ||
" <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css"/>\n", | ||
" <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>\n", | ||
" <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>\n", | ||
" \n", | ||
" <meta name="viewport" content="width=device-width,\n", | ||
" initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n", | ||
" <style>\n", | ||
" #map_1a45a7666ffea91f9a3955544c2729b7 {\n", | ||
" position: relative;\n", | ||
" width: 100.0%;\n", | ||
" height: 100.0%;\n", | ||
" left: 0.0%;\n", | ||
" top: 0.0%;\n", | ||
" }\n", | ||
" .leaflet-container { font-size: 1rem; }\n", | ||
" </style>\n", | ||
" \n", | ||
"</head>\n", | ||
"<body>\n", | ||
" \n", | ||
" \n", | ||
" <div class="folium-map" id="map_1a45a7666ffea91f9a3955544c2729b7" ></div>\n", | ||
" \n", | ||
"</body>\n", | ||
"<script>\n", | ||
" \n", | ||
" \n", | ||
" var map_1a45a7666ffea91f9a3955544c2729b7 = L.map(\n", | ||
" "map_1a45a7666ffea91f9a3955544c2729b7",\n", | ||
" {\n", | ||
" center: [0, 0],\n", | ||
" crs: L.CRS.EPSG3857,\n", | ||
" zoom: 1,\n", | ||
" zoomControl: true,\n", | ||
" preferCanvas: false,\n", | ||
" }\n", | ||
" );\n", | ||
"\n", | ||
" \n", | ||
"\n", | ||
" \n", | ||
" \n", | ||
" var tile_layer_c1a9c8ff890f61c16ac0abe5866a8a9b = L.tileLayer(\n", | ||
" "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",\n", | ||
" {"attribution": "Data by \\u0026copy; \\u003ca target=\\"_blank\\" href=\\"http://openstreetmap.org\\"\\u003eOpenStreetMap\\u003c/a\\u003e, under \\u003ca target=\\"_blank\\" href=\\"http://www.openstreetmap.org/copyright\\"\\u003eODbL\\u003c/a\\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}\n", | ||
" ).addTo(map_1a45a7666ffea91f9a3955544c2729b7);\n", | ||
" \n", | ||
" \n", | ||
" var rectangle_89e7a7351d6406fc8249382d06dbcdec = L.rectangle(\n", | ||
" [[28.6477626, 77.2250592], [28.6642405, 77.2434511]],\n", | ||
" {"bubblingMouseEvents": true, "color": "#3388ff", "dashArray": null, "dashOffset": null, "fill": false, "fillColor": "#3388ff", "fillOpacity": 0.2, "fillRule": "evenodd", "lineCap": "round", "lineJoin": "round", "noClip": false, "opacity": 1.0, "smoothFactor": 1.0, "stroke": true, "weight": 3}\n", | ||
" ).addTo(map_1a45a7666ffea91f9a3955544c2729b7);\n", | ||
" \n", | ||
"</script>\n", | ||
"</html>\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>" | ||
], | ||
"text/plain": [ | ||
"<folium.folium.Map at 0x19b3e100220>" | ||
] | ||
}, | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"import folium\n", | ||
"\n", | ||
"# Create a map\n", | ||
"m = folium.Map()\n", | ||
"\n", | ||
"# Create a rectangle object\n", | ||
"bbox = folium.Rectangle([\n", | ||
" [28.6477626, 77.2250592],\n", | ||
" [28.6642405, 77.2434511]\n", | ||
"])\n", | ||
"\n", | ||
"# Add the rectangle to the map\n", | ||
"m.add_child(bbox)\n", | ||
"\n", | ||
"# Display the map\n", | ||
"m" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 27, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"application/vnd.jupyter.widget-view+json": { | ||
"model_id": "b2896959c4af469f99f4a9ab3d60bb6f", | ||
"version_major": 2, | ||
"version_minor": 0 | ||
}, | ||
"text/plain": [ | ||
"Map(center=[28.6561681, 77.2342614], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title…" | ||
] | ||
}, | ||
"execution_count": 27, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"import leafmap.foliumap\n", | ||
"import folium\n", | ||
"\n", | ||
"\n", | ||
"latitude = float(28.6561681)\n", | ||
"longitude = float(77.2342614)\n", | ||
"center_point = (latitude, longitude)\n", | ||
"m = leafmap.Map(center=center_point, zoom=16)\n", | ||
"\n", | ||
"kw = {\n", | ||
" \"color\": \"blue\",\n", | ||
" \"line_cap\": \"round\",\n", | ||
" \"fill\": True,\n", | ||
" \"fill_color\": \"red\",\n", | ||
" \"weight\": 5,\n", | ||
" \"popup\": \"Tokyo, Japan\",\n", | ||
" \"tooltip\": \"<strong>Click me!</strong>\",\n", | ||
"}\n", | ||
"\n", | ||
"# Create a rectangle object\n", | ||
"bbox = folium.Rectangle(\n", | ||
" bounds=[[28.6477626, 77.2250592],[28.6642405, 77.2434511]],\n", | ||
" **kw,\n", | ||
" )\n", | ||
"\n", | ||
"# Add the rectangle to the map\n", | ||
"m.add(bbox)\n", | ||
"\n", | ||
"# Display the map\n", | ||
"m" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 17, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"application/vnd.jupyter.widget-view+json": { | ||
"model_id": "fe54214e045c4bec83316b443899eae0", | ||
"version_major": 2, | ||
"version_minor": 0 | ||
}, | ||
"text/plain": [ | ||
"Map(center=[20, 0], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', 'zoom_out_text…" | ||
] | ||
}, | ||
"execution_count": 17, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"m = leafmap.Map(zoom=1)\n", | ||
"source = {\n", | ||
" \"type\": \"geojson\",\n", | ||
" \"data\": {\n", | ||
" \"type\": \"Feature\",\n", | ||
" \"properties\": {\"color\":\"#4dbd9a\"},\n", | ||
" \"geometry\": {\n", | ||
" \"type\": \"Polygon\",\n", | ||
" \"coordinates\": [[[28.6477626, 77.2250592],[28.6642405, 77.2434511]]],\n", | ||
" },\n", | ||
" },\n", | ||
"}\n", | ||
"m.add_geojson(source)\n", | ||
"m" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 14, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"application/vnd.jupyter.widget-view+json": { | ||
"model_id": "85320d32f799409e8c83475b7e0133a2", | ||
"version_major": 2, | ||
"version_minor": 0 | ||
}, | ||
"text/plain": [ | ||
"Map(center=[20, 0], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', 'zoom_out_text…" | ||
] | ||
}, | ||
"execution_count": 14, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"import leafmap\n", | ||
"\n", | ||
"# Define the polygon data\n", | ||
"source = {\n", | ||
" \"type\": \"geojson\",\n", | ||
" \"data\": {\n", | ||
" \"type\": \"Feature\",\n", | ||
" \"properties\": {},\n", | ||
" \"geometry\": {\n", | ||
" \"type\": \"Polygon\",\n", | ||
" \"coordinates\": [[[-30, -25], [-30, 35], [30, 35], [30, -25], [-30, -25]]],\n", | ||
" },\n", | ||
" },\n", | ||
"}\n", | ||
"\n", | ||
"# Create a map\n", | ||
"m = leafmap.Map(zoom=1)\n", | ||
"\n", | ||
"# Add the polygon with style options\n", | ||
"style_options = {\n", | ||
" \"color\": \"blue\", # Change this to your desired color\n", | ||
" \"fill\": True, # Set fill to True to fill the polygon\n", | ||
" \"fillColor\": \"lightblue\", # Change this to your desired fill color\n", | ||
" \"weight\": 2, # Adjust the line weight\n", | ||
" \"opacity\": 0.7 # Adjust the opacity of the polygon\n", | ||
"}\n", | ||
"\n", | ||
"m.add_geojson(source, style_options=style_options)\n", | ||
"\n", | ||
"# Display the map\n", | ||
"m" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 34, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"application/vnd.jupyter.widget-view+json": { | ||
"model_id": "b309b5ba81364914adb7f5507605e645", | ||
"version_major": 2, | ||
"version_minor": 0 | ||
}, | ||
"text/plain": [ | ||
"Map(center=[46.7808, -96.0156], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', 'z…" | ||
] | ||
}, | ||
"execution_count": 34, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"m = leafmap.Map(\n", | ||
" center=[46.7808, -96.0156], zoom=12, toolbar_control=False, layers_control=True\n", | ||
")\n", | ||
"m.add_osm_from_point(\n", | ||
" center_point=(46.7808, -96.0156),\n", | ||
" tags={\"natural\": \"water\"},\n", | ||
" dist=10000,\n", | ||
" layer_name=\"Lakes\",\n", | ||
")\n", | ||
"m" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"print(\"Please enter the coordinates. Eg: For New Delhi (28.645307, 77.224662)\")\n", | ||
"#Taking the map from the user\n", | ||
"#latitude = float(input(\"Enter latitude: \"))\n", | ||
"#longitude = float(input(\"Enter longitude: \"))\n", | ||
"latitude = float(28.6561681)\n", | ||
"longitude = float(77.2342614)\n", | ||
"print(\"Entered:\",latitude, longitude)\n", | ||
"center_point = (latitude, longitude)\n", | ||
"G = ox.graph_from_point(center_point, dist=900, network_type='all')\n", | ||
"nodes, edges = ox.graph_to_gdfs(G)\n", | ||
"#gdf = ox.graph_to_gdfs(G)\n", | ||
"bbox = edges.total_bounds\n", | ||
"bbox1 = nodes.total_bounds\n", | ||
"print(bbox)\n", | ||
"print(bbox1)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.10.9" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
latitude,longitude | ||
28.6576419,77.2292175 | ||
28.6538828,77.2319103 | ||
28.6570721,77.2352708 |