Author: Kuba

Artificial Intelligence (AI) and Machine Learning(ML) are one of those buzzwords that became really popular in recent years. How much hype vs. substance is behind them? Are they practical? How can you use them to solve your specific GIS problems?

Those were just a few questions that had in mind and wanted to answer.

Fortunately, I found devlopmentSEED which specialise in using Machine Learning to solve important problems and ask them to help me out.

I had privilege to talk to Drew who works there and he was eager to answer all of my questions:)

If you’re interested in AI/ML and especially how you can use it in your GIS work, this interview is a great way to start!

00:00 Short intro: what’s this interview is all about?

00:53 How Developmentseed makes Machine Learning more accessible for everyone?

02:06 What’s Machine Learning anyway and how it relates to Artificial Intelligence and GIS?

03:50 How much data do you need to make Machine Learning practical?

05:29 What we can do with Machine Learning that we can’t actually do without it? Drew tells a story about how ML helped mappers with mapping Energy infrastructure in developing countries.

How do you describe your GIS work to others?

Where’s GIS tech in your everyday life?

In this video I will share with you the two methods to take your programming skills to the next level and actually
learn how to build something. We will also talk about why a lot of beginners get stuck at this point and what you can actually do about it.

It’s just a piece of code that does a specific task
and return a specific value.

Easy, right?

Let me give you an example.

Let’s use a standard Javascript function called round
that will round it’s argument to the nearest integer number.

An argument is just a value that we pass into a function.

A function can have many arguments, in our case we have only one.

So, to use or run this function you need to write something like that in your code:

Math.round(1.2);

Let’s ignore for a moment the fact that there’s Math. before our function’s name. I will
explain that in the moment.

So, this function will return 1, right? This is the nearest integer for our first argument which is
1.2.

Here’s the thing:
when you actually put this function into your code like that, you won’t see a thing.

Why is that?

Well, we didn’t actually save a return value anywhere. Right?

And, what do we use to store values? Do you remember?

I’m sure you do:) A variable, right?

So, if you want to actually use a value or a result of this function you would have to write
something like that:
var myroundnumber = Math.round(1.2);

Then our newly created variable called myroundnumber will store a number 1 which is the result
of our round function.

When you look at our first web mapping application will see plenty of functions like that
and variables that store their results, in our code example map_app7.html we have:
In line 14:
var mymap = L.map(‘mapid’);

It looks quite similar, right?

We have a different function, in this case it’s called map (again we’re ignoring L. for now)
and instead of having a number as a first argument we now have a text.

And if you have a look at the rest of the code, you will see that we’re using function all the time
in that way.

Of course, we have different kinds and numbers of arguments,but basically it’s all the same.

Ok, let’s clarify this Math. and L. confusion. What’s that about?

So, those are objects. Our function belong,so to speak, to two different objects.

As you remember an object is a way to group values using keys. Like an index at the back of a book.
Right?

Math and L objects are more complex in a way that instead of storing values they store functions.

The only thing that you need to know is that a function that belongs to an object is called its method.

So, Math.round is really a function that belongs to a Math object.

What about L object?

As you probably remember from our second class in L object we have most of the Leaflet’s web mapping
library functionality.

So, what you’re mostly do when you’re building a web mapping application is you use L’s functions (methods)
to create a web map, center it etc.

Ok, let’s recap:
A function is just a container for a piece code.

When you run a function,it’s like you would run a code that is inside it.

A function can have arguments which are basically values that we can pass inside a function.

After function runs it will return a value. To save it you need to store it in a variable.

Functions that belongs to an object are called methods.

Objects can store simple keys and values (numbers or text) or functions.

So, this kind of grouping is a little bit different since we’re grouping
values using keys. Here we don’t care about the order of values. As long
as you define your keys and corresponding values to those keys you’re golden:)

In the previous post I’ve told you how
lack of jargon understanding can hold us
all back from learning new things.

Here I would like to explain and clarity for you
those few fundamental programming
concepts that you will be using all the time when you’re
working on your own programming project.

Ok, so let’s get moving:)

Let’s starts with a value.

What’s a value in programming?

It’s simply some kind of data.

If you think about what’s in the core of every web mapping applications it all boils down to showing
spatial data on a map.

And guess what – a map is a data too:)

So, in programming we have a few fundamental data types that we’re working with.

In web mapping applications the main piece of data are coordinates.

Latitude and longitude are pretty much everywhere.

So, our first data type we work with when programming is a number.

In programming you can use numbers directly, so every time you put a number like 2.22
into your code it will mean exactly that.

In a web mapping application we usually have a lot of text associated with latitude and longitude.

To use a text when programming you need to specifically put it into apostrophes. This for one simple
reason, source code is text too, so a text that you will be using in your application has to be somehow
distinguished from a source code.

So, those two types of values are by far the most commonly used in web mapping applications.

Since programming is all about working with data you also have to have some way to store it.

This is where variables come in.

A variable is a container that store values. When you create a variable you will also name it. Then
every time you use this variable’s name in your code it’s just like you would use its value.

You can change a value of a variable any time you want, you just assign different value to it.

Ok, so let’s recap what you’ve learned:
The two most fundamental values we’re working with in web mapping application are
numbers and text.

In programming, we use numbers directly. Every time you use a number a programming language
sees it as a number.

Text is different. You need to put a text into apostrophes.

A variable is just a way to store numbers and text. A variable has a unique name.
You can use variables just as you would use values.

Ok, that’s it for now:)

Next, I will tell you all about working with more that one value at the time.

Have you ever read, listen or watch someone
talking about programming and after a few
seconds realise that you’re far,far away,
thinking about totally different things?

It’s almost like our minds shut down when
we hear something we don’t quite understand.

It’s funny because, I do programming for a really
long time and there are still times when my mind
do this from time to time.

It’s because there are always those niches within
every field where experts develop their own lingo
and when you’re not inside their world, it like listening
to an alien species talking in their own language.

Years ago, I went to a Python conference in Wilnius.

And one of the hot topics back then was a Python version
written in Python itself.

So, I decided to go to one of the lectures to educate myself
on the subject.

After about 10 minutes, I almost fell asleep.

What happened?

Well, right from the beginning, speakers delved deeply into technical details
of their project.

It was full of jargon I didn’t understand, so I wasn’t able to actually
grasp most of the concepts presented there.

I’m sure it sounds familiar.

It happens to all of us, because we’re simply not experts in everything.

Even if what you’re learning something that is not complicated in itself, when you don’t know
the terminology, your mind will assume that this subject matter is indeed very difficult to learn.

Programming is a great example.

There’s nothing special about doing programming.

It’s similar to learning how to use a complex piece of software.

But, there’s this intimidation that every beginner feels.

Some time ago when I was preparing my web mapping course, I had to
refresh my memory on some parts of Javascript syntax.

So, I’ve opened a kindle version of one of Javascript books that I like
and started to go trough one of the chapters.

Then, it hit me.

It sounded so complicated!

I haven’t heard this precise terminology or use it for a really long time.

It became obvious to me why beginners think that programming is complicated.

It’s because it sounds complicated and hard;)

I’ve recently got an idea to explain programming terminology/concepts
only using spatial and GIS terms.

That way you can grasp programming essentials in no time and spend more
time building stuff:)

I don’t know if it’s possible or how far can I actually stretch this,but in the next
post I will explain most import programming concepts in a language that you
can easily understand!

When I started to build software I also started to look for an advice from more experienced programmers.

I wanted to learn how to build software faster and how to write robust and bug-free code.
So, over the years I came across lots of programming “wisdom” from different programming cultures. And there’s one principle in particular that stayed with me and really helped me over the years.

In this video you will learn what this principle is all about and how to apply it to both building software and learning programming.