All language subtitles for 111 Color-Based Point Markers-subtitle-en

af Afrikaans
ak Akan
sq Albanian
am Amharic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

1

Hey! Hi again and welcome to this new

lecture! What we have so far is this map

3

with this 62 markers each of them

representing a volcano location in the

5

United States, however this map is not

very smart so to say. The only

7

information that this map conveys is the

locations of the volcanoes and you also

9

have a base map. There's also a good

aspect of this now because you can

11

extract information like that if you

click the icons, however you may want to

13

transform this map to actually show an

attribute instead of just volcano

15

locations and the way to do that, there may

be different way and that's up to your

17

knowledge about cartography, but I could

make the map show an attribute here.

19

For example I could change the colors of

these markers to actually show the

21

elevation range. Let's say we can

categorize these markers into three

23

colors, let's say green, orange, and red.

Green would be four elevations from zero

25

to a 1 000 meter for example or 2 000

meters, and orange would be from 2 000 to

27

3 000 meters, and then red markers would

represent volcanoes with an

29

elevation of higher than 3 000 meters.

So how do we do that with Folium? Let's get

31

back to Atom. Here is our code. What we

have so far? Currently what we're passing

33

to icon argument is a color argument

with a value of green, so basically what

35

we need to do we need to make this

dynamic so that the color changes

37

depending on the elevation.

Unfortunately we cannot do that with

39

Folium, so folium doesn't have native

functionality to create dynamic colors

41

for your markers, therefore we need to be

a bit creative here and use Python core

43

functionalities

to do this, and when you think

45

about dynamics, I think about

functions so basically this loop is

47

going through latitude, longitude,

elevation and then it passes those three

49

values into this expression in here.

However color is being passed as a

51

a string always, but how do I change it

depending on the elevation for instance?

53

Well the way to do that is by creating a

function, a function that gets as input

55

elevation and then it does some actions

inside the function, and then it returns

57

a color depending on the elevation value.

So you can say if elevation is less than

59

this give me green color, a green string

here, and so on and so forth. So to give

61

you an idea the way this would work is,

let me write a function here, this

63

would be a good place to do that before

creating the map object, but always

65

always you need to create the function

because I will be calling the function

67

in here so you need to create the

function before this expression, so from

69

here and upwards. I'll be creating that

in here. Let's call a function color

71

producer. Let's keep it simple for a

while just to demonstrate you how this

73

would work, so let's keep it very very

simple. Let's say return green, and if you

75

change this to color producer and don't

forget the brackets, by passing brackets

77

that means you are calling the function.

If you don't pass in the bracket so that

79

means you're just calling the function

name and you are not executing the

81

function, so I'll just keep it like that.

And go ahead and execute

83

map1.py .

All right, reload and you'll get the same

85

thing, right, because what happens is that

this thing in here this function call

87

will be equal to whatever you return

here, so the type of this object it's

89

actually a string so it's exactly the

green string. Therefore now you can add

91

some conditionals here. Basically you

need to pass an input here, so elevation

93

let me write whatever variable you like.

I'll write elevation and here you need to pass

95

el, so el for lat, lon, el. Let's say we

have 62 rows in the data table,

97

and for loop will go through the first row

of the table, it will get elevation and

99

it will pass it to this function code, so

the function will pass el into elevation,

101

and then you say here if elevation is

less than 1 000, then you want to

103

return green for elevations less than

1000 meters, elif elevation is

105

between 1 000 meters, so it's

greater than 1 000 meters, or less

107

then let's say 3 000 meters, return orange,

else return red, so red will be returned

109

if none of these conditional is

satisfied which means elevation is

111

neither less than 1 000 meters,

nor between 1 000 and 3 000 meters

113

which means what is left is

greater than 3 000 meters.

115

In that case we return red.

For finding out what values actually,

117

you need to do a little bit of data

exploration, for instance you need to,

119

you may want to look at the data quickly

like that to see what values you have.

121

And then decide all the category

thresholds, but you can also make more

123

significant statistical analysis like

you can make a histogram and see the

125

data distribution and then decide on

these values, but let's keep things

127

simple and let's decide on these values.

Okay, I'll save this, check if everything

129

is in place just quickly, yeah, let me

try the code. Go and reload and yeah, we have

131

some different colors here, yeah this is

looking good. Let me double check the

133

values. For instance oranges between

1 000 meters and 3 000 meters

135

Yeah, we're doing good.

Red is above 3 000 meters.

137

Yeah, it seems it's working.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.