awacke1 commited on
Commit
7912d0f
·
1 Parent(s): fe37e60

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +108 -0
app.py ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import folium
2
+
3
+ # Define the dictionary containing the bird species data
4
+ birds = [
5
+ {
6
+ 'species': 'Canada Goose',
7
+ 'lat': 44.9778,
8
+ 'lon': -93.2650,
9
+ 'start_month': 'September',
10
+ 'end_month': 'April'
11
+ },
12
+ {
13
+ 'species': 'Mallard Duck',
14
+ 'lat': 44.8835,
15
+ 'lon': -93.2273,
16
+ 'start_month': 'August',
17
+ 'end_month': 'May'
18
+ },
19
+ {
20
+ 'species': 'Wood Duck',
21
+ 'lat': 44.9778,
22
+ 'lon': -93.2650,
23
+ 'start_month': 'March',
24
+ 'end_month': 'November'
25
+ },
26
+ {
27
+ 'species': 'Trumpeter Swan',
28
+ 'lat': 45.0941,
29
+ 'lon': -94.2392,
30
+ 'start_month': 'October',
31
+ 'end_month': 'April'
32
+ },
33
+ {
34
+ 'species': 'Tundra Swan',
35
+ 'lat': 44.9358,
36
+ 'lon': -93.1553,
37
+ 'start_month': 'November',
38
+ 'end_month': 'April'
39
+ },
40
+ {
41
+ 'species': 'Canvasback',
42
+ 'lat': 44.8835,
43
+ 'lon': -93.2273,
44
+ 'start_month': 'September',
45
+ 'end_month': 'May'
46
+ },
47
+ {
48
+ 'species': 'Redhead',
49
+ 'lat': 44.9778,
50
+ 'lon': -93.2650,
51
+ 'start_month': 'September',
52
+ 'end_month': 'May'
53
+ },
54
+ {
55
+ 'species': 'Greater Scaup',
56
+ 'lat': 44.8835,
57
+ 'lon': -93.2273,
58
+ 'start_month': 'September',
59
+ 'end_month': 'May'
60
+ },
61
+ {
62
+ 'species': 'Lesser Scaup',
63
+ 'lat': 44.9778,
64
+ 'lon': -93.2650,
65
+ 'start_month': 'September',
66
+ 'end_month': 'May'
67
+ },
68
+ {
69
+ 'species': 'Hooded Merganser',
70
+ 'lat': 44.8835,
71
+ 'lon': -93.2273,
72
+ 'start_month': 'October',
73
+ 'end_month': 'April'
74
+ }
75
+ ]
76
+
77
+ # Create a Folium map with the initial location and zoom level
78
+ m = folium.Map(location=[44.9778, -93.2650], zoom_start=8)
79
+
80
+ # Add markers for each bird species
81
+ for bird in birds:
82
+ # Get the species, latitude, longitude, start month, and end month from the dictionary
83
+ species = bird['species']
84
+ lat = bird['lat']
85
+ lon = bird['lon']
86
+ start_month = bird['start_month']
87
+ end_month = bird['end_month']
88
+
89
+ # Create a popup message for the marker
90
+ popup_msg = f"{species}: {start_month} - {end_month}"
91
+
92
+ # Add a marker to the map with the latitude, longitude, and popup message
93
+ marker = folium.Marker(location=[lat, lon], popup=popup_msg)
94
+
95
+ # Add the species, start month, and end month to the marker icon
96
+ icon_text = f"{species} ({start_month} - {end_month})"
97
+ icon = folium.Icon(color='red', icon='glyphicon-map-marker', prefix='glyphicon')
98
+ marker.add_child(folium.Popup(icon_text))
99
+ marker.add_to(m)
100
+ # This code will create a Folium map with markers for each bird species in the given dictionary, including the species name, start month, and end month on the markers. The marker icons are red and shaped like a map marker, and the labels are displayed in a popup when the marker is clicked. You can customize the map further by adjusting the map style, marker icons, and label formatting.
101
+ # create a press release for Yolo and Coco the two AI programs that can detect 25 different types of objects in live video. Make the press release full of emojis and write an exciting funny article written for grade school reading level
102
+ # Why do Canada Geese fly north during the winter and what places near MN do they go?
103
+ # create a streamlit folium map showing the migratory pattern of the canada goose in the united states and canada. Include the month and where they are likely to be
104
+ # create a dictionary list in python with the migratory goose data from the Cornell Lab of Ornithology and eBird data
105
+ # create the example again with top ten birds from minnesota including geese swans and ducks using the python dictionary
106
+
107
+
108
+