
Jose Martin Garcia from Wolfram Research shows how to make maps and visualize geographic data in Wolfram Language. He demonstrates placing shapes on maps, computing distances and directions, and creating plots like GeoHistogram and GeoDensity to display data across regions.
Chapters
Okay. Hello, welcome to another live talk by the Research and Development department of Wolfram Research. My name is Jose Martin Garcia and today I will be talking about geography. The title of the talk is Maps and Geo Computation in Wolfram Language. And this is the summary. First, we will start with a brief introduction to map making. You will see how easy it is to produce maps with Wolfram language and geographics. And then we will talk about how to describe and handle different types of data that we need to produce maps. Then the rest of the talk will be dedicated to two big sections, one on GEO computation and the other one on geovisualization. Okay, so let's start with a brief introduction to map making. You can ask questions during the talk. I will address them as soon as I can, and if not, we can discuss at the end of the of the talk. Okay, so as I said, the main command in this area is geographics that can produce maps of any area. It's very easy to use and by default it gives a map of the whole world centered at the meridian where you are. We are in Champagne here. And so that's the default map for us and this location. If you want a map of your location local area, you can just do this geographics of here. But from language knows where you are using GeoIP location. And so it shows in our case a map of the area of Urbana Champagne with a radius of about 10 miles. So the distance from here to the border would be about 10 miles. You can specify any area you are interested in using the powerful entity language that we will describe in more detail later. And so this is a map of the United States using a GEO background of a relief map. And in this case we are using an option as you saw in Wolfram language, saying that we want the image of the result to be larger, right? Compare this width with this width here. We can change the background, for example. Now this will be a satellite imagery image. So this is highly processed, of course, because it has no clouds, etc. And other types of GEO backgrounds are what we call the vector GEO backgrounds. So far, Geographics has always produced image based results. We are soon about to change to produce vector results. And so you will see during the talk that I use your backgrounds starting with vectors. So these are the temporary names that we are using for the various vector backgrounds that will be used in the future. So this is an example of the same area as before, 10 miles of radius approximately of the area where we are. For example, that will be vector map for the whole world. Now when we say here, world, we use the standard -182 + 180 longitudes view of the world. Or we can choose a larger area, like say for example the country Monaco that we get here. And so this is all formed by vector primitives. We can click here and get the various elements of the map, etc. Right, we label the roads along the roads, etc. Yes. So as I said, in the future you will have access to all these vector elements and their styles. Okay, so this was a very quick introduction to how to produce maps with geographics. And now let's quickly see as well how, how to place things on the maps. So these are things we call primitives. So for example, in these maps we are going to draw a red geodisc, this one centered here, our location, with a radius of 2,000 miles. And then we will draw a geopath, a geodesic that goes from here to Los Angeles. So that would be that line. And we are also going to introduce an option saying that we want geogrid lines. That means the lines of constant longitude and constant latitude. So the meridians and the parallels. So that's our map. And notice how the geodisc looks perfectly round and the geodesic, the geopath looks quite rectilinear, as expected. Now this is because Geographics has chosen a nice and appropriate geo projection for you. So notice how the parallels and meridians are curved. So if we drew the same map using the standard Mercato projection, which used to be the standard default for web maps, then you would see that indeed the parallels and meridian are rectilinear and cross right angles. But now the geodisk doesn't look circular or the geodesic doesn't look rectilinear, even though it's the very same disk. Notice that it goes through exactly the same points in the map, just that the map is deformed in a different way. So this is going to be a constant during the whole talk. And it's a very important choice always to make when drawing a map. That is the choice of geo projection. Okay. Another thing that I wanted to show at the very beginning is that we can use satellite imagery of local regions. And this is satellite imagery that we get via mapbox. For example, this is an image of the area around Central Park. So it's about 2 miles of radius about Central Park. We also have images for other celestial bodies, like for example here, Pluto, we have images for the solid bodies of the large solid bodies of the solar system. So Mars, Mercury, Moon and Pluto at the moment, we can use that background in any map. For example, here we have a map of the moon where we have placed again the geogrid lines. And now we are also setting style so that they look very clearly here. So we are saying that they should be white. Okay, so that was a very quick introduction to maps. Oh, sorry. Yes, I have another style which is about dynamic maps. So we can just say, okay, I want a map of this area. And now we can zoom in, right? So that we keep zooming in and again we'll see. We can move the map as well. We can zoom in and there we are. That's Paul from headquarters. Each time you click the plus, we increase the zoom by one level. And here I will be using the standard conventions of using geo zoom levels, which we can reach from 1 to 18. When using one, we are covering the whole world. So a radius of 20,000 km we can go all the way up to some level 18, which means maps of 150 meters in radius. So that would be about like 450ft or something like that. In terms of, in terms of georesolution, meaning the size of a pixel in the map that would be going in this case from about 78 kilometers to less than 1 meter. So about 2ft of size for a single pixel. So you see how powerful is the resolution of the maps we are showing. Ok, so that's all. Is there any questions so far? Not yet. Okay, so let's go to the section on how to handle data. We are going to be discussing four elements. We are going to see how to work with physical quantities, dates, entities for concepts and regions, and geopositions for explicit latitude, longitude locations. So let's start with quantities. So for example, imagine that you want to know something like the speed of wind at your geolocation. So that's the result we get. And in Wolfram language, we have a very powerful language for units and quantities and we can convert to any other unit you want. For example, imagine that you want that result in meters per second. So we do that and that's the number we get. So the default unit system, basically either metric or imperial, is decided by default, depending on where you are. Because we are in the United States, the default unit system is the imperial system. If you wanted to change to metric units, or for example, for those of you in Europe, then this would return metric. Or you can locally say, I want the same result in the unit system. And then this result, rather than being in miles per hour, is now in kilometers per hour. And could be changed into meters per hour with that result. The same thing happens for other functions, say temperatures, elevations. So that's the hour elevation here in Japan with respect to sea level. And all these quantities are all expressed in the same language as usual in Wolfram language, it's an expression with a head and arguments. In this case, the number corresponding to that quantity and the unit in the second argument. So we have thousands and thousands of different units you can change to. And so this is very powerful. Okay, so that's about quantities. Now, dates. So in dates again, we have a way of getting the current instant. So every time I evaluate this, I will get a different number here. Or we get the date corresponding to today in the same way that we had quantity before. Now, the key symbol in Borfram language is date object. It allows us to express any date we want. For example, this is the instant at which we went to the moon for the first time, or we stepped on the moon for the first time. So we can specify the time zone as well, and we can convert the date into other time zones. For example, my local time zone, which is GMT -5. We can change the calendar, for example, that would be the same date expressed in the Islamic calendar. We can change the time system as well. So we can compute what's the date expressed or measured by atomic time clocks corresponding to that instant. We can change what we call the granularity. So that date had a granularity of an instant. Right. We specified all the numbers, but we can say I want only weeks, or in this case, I want only the day. We have multiple possibilities for all of those in terms of time zones, time systems, etc. I'm going to show here how to change any date. For example, the current date to be expressed in any of the many calendars that we have. And here we have, I don't know, old calendars, Samaritan calendars, French revolutionary calendar, etc. Many of them. Okay, something important is that when subtracting two dates, the difference of two dates is a quantity. So that gives the number of days that have elapsed since the instant in which we stepped on the moon. So it's almost 2,000 days. We have functions to visualize dates specifically, and we also have several functions to have very fine control on the properties of time. Like, for example, is every day, is every rotation of the Earth exactly an exact day, 86,400 seconds. This function computes that what is called the day duration excess. And it reports that today, for example, was a millisecond or is a millisecond shorter than the standard average of 86,400 seconds. We have data for that property for a long time and for many decades. And for example, we see how in recent years they are getting slightly shorter. Again, this is measured in milliseconds. So changes every day are about a millisecond or so. Okay, that's about time. Let's discuss entities now. So entities again is a very powerful concept, again formed by what we call head symbol and then arguments. The first argument is the domain, the type of entity, in this case countries, and then the name, the name that identifies a single element in that collection of entities in that collection of countries in this case. So this is the U.S. the United States. And once we have this entity, you will see these yellow boxes multiple times. We can ask properties about it. For example, what's the population? That's a notation for it. And this is a simplified notation to get a exactly the same thing. So these values of data are updated regularly by the WolframAlpha team. And we have very many properties about each of these entities. For example, about countries, we have more than 700. These are some examples of properties that we can query about these countries. So we have also classes of countries. These are collections of countries. For example, this is the group of 10, which actually now has 11 countries, but it's still called the G10. And again, we can compute properties of the entity classes. And because an entity class represents a list of countries, we get back a list of values of population. You can also specify that you want an association, another concept in bor form language. And you see now how easy is to get the correspondence between the various countries here and the values of their population. We can now do operations on these associations. For example, let's sort the association in reverse order, so from largest to smallest. And this is what we get. So of the G10 countries, the largest in terms of population is the United States and the smallest is Switzerland. Okay, so I have some questions. Do we have a last day of month option in dates? Okay, let's have a look. Let's go back for a moment. To date. So if I do current date, month. So that's the current month. And now we can ask for properties. So these are various things. Beginning instant. I don't think we have that yet. That's a good suggestion. No, that's a good suggestion. Thanks, Alan. We will look into that. And Sander is asking, I miss with geographics, the addition of standard scale bars. Well, geographics we can do Something like here, geo scale bar. I don't know what you're referring to this, for example, we say, I want a scale bar in given a metric. And so we have here. Or you can say imperial. Right. And then the scale bar will be in miles. I think we can actually even put both together. Metric, metric and imperial. Yes. And you see, and now we get zero to five miles. Zero to five kilometers. Okay, so entities, that's. That was all I know. And yes, the last element I wanted to introduce is locations. So the head we will be using here is geoposition. And for example, as I said, using GEOIP methods. So by your IP address, we can more or less estimate allocation. It's not very precise, particularly outside the US but it will know more or less what you are. We can get positions out of very many of the entities that we were discussing before. For example, some of them depend on time. And this is the current position of the International Space Station. So that's latitude, degrees, longitude in degrees. That's elevation with respect to our default GEO ellipsoid in meters. And this is annotation for time. It's essentially a number of seconds since 1900. Every time I evaluate this, you, it will change a little bit because this International Space Station is moving very fast. And with something like this, we can draw a map of where is the International Space Station right now. And we have this geoprimative, the geovisible region. So we see that's the region that will be visible from the International Space Station, or vice versa, the region from which currently the International Space Station could be seen. Yes. So as I said, we can get the position for very many geo entities, like in this case, the Eiffel Tower. You can also get it in this way. And another important property for many of the GEO entities is, is the polygon. If just for the polygon, you get this construction, a polygon containing geoposition. So a polygon in which the vertices are locations on the world or on other planet. And we can compute like random geoposition. So this gives me five pairs latitude, longitude in the area I requested. And now I can go and say, okay, plot them in a map. And that's what we get. So if I reevaluate this again, I get a different set of locations and I can draw markers at the locations we got. Okay, could be good to add styling to geographic scale bar. It often gets lost. Yes, that's a good point. We indeed have been testing an internal option for that. Let me try to remember. So if I do geoscale Bar here, metric, for example. Sorry, I need to say I want the output 69. And now we have a. And you see, because it's gray, it's not very visible. So I think we had a, an option geoscale bar style set. Or was it geographics? Perhaps it was Geographics. Geographics. What? No, sorry, I. So what could it be? Geo. Let me try to remember so I could do GEO scale bar geo. That's the one I just introduced. No, sorry, I don't remember where it is right now. Perhaps it was string. This is the sort of thing. No, sorry, I, I cannot find it now. But we have been exploring the possibility of adding a, a style for the, for the geoscale bar. I will look into it. You can contact me separately and I think I can send you how to change style. It's something that we want to add in the future in this. Okay, so. Any other question? Yes. So Sandra was asking about how does it work with warped views. Okay, let me address that when we go to the section on GEO projections. Yes. So GEO computation. Let's look at fundamental operations that we always want to do when working in geography, namely computation of distances, angles and areas. So let's go again back to our location for the Eiffel Tower. Now, for example, imagine that we want to draw what we did before a geopath, a geodesic from here to the Eiffel Tower. So that would be the geodesic in the Mercato projection. Again, it looks curved because we are not using an appropriate projection. If we use something like the orthographic projection, which is a projection looking from above, then we would get something that is more rectilinear. So, so what's the distance between those two locations? So that's computed by the function geodistance. So you add here one location, the other location you want to go. And again, the result is in miles because we are in the United States or I am the United States. So now. So that's the distance. How do we compute the direction we need to start from here in order to go to the Eiffel Tower? That's computed by GEO direction. And the convention here is that this is a bearing angle. That means it's the angle computed from north. So in this case it's easier to understand. So if we take the line that goes from here to the North Pole, that would be the angle with which we need to start Here you see that it's an angle that changes, of course, during the geodesic. Right? So somewhere here, the bearing angle is 90°. And when we arrived at the Eiffel Tower, the angle is larger than 90°. And in fact, for example, if we wanted to go in the opposite direction, we wanted to go from the Eiffel Tower to here. Now the angle would be minus 60 degree. That angle would be from north in this direction. So that's why it's negative. That angle is like 60°, right? So you see that these two angles don't have to be related at all. Okay? So that's what's called the inverse problem of geodesy. Given two locations, compute the distance and the angle at the beginning or at the end. Now, the direct problem of geodesy is given is the opposite. Given my location and a distance and an angle, give me the final location. So that's computed by geodestinations. So you give where you are, the distance you want to traverse and the direction. And you see, we arrived exactly at the same place that we started with in the previous computation and the Eiffel Tower. So all these computations are performed with ellipsoidal geometry. Using a spherical model for the Earth is unprecise. It would give like errors in the order of tens of kilometers. Given that the difference between the equatorial axis and the polar axis of the earth is about 20 kilometers. So we use ellipsoidal geometries. And within ellipsoidal geometry, not taking into account the topography, we get results that are very precise to micrometer source or better. For example, how could we compute where we end up if we move 40,000 kilometers, starting with 45 degrees, if we were on a sphere, then we would end up on the same trajectory, right? Because it would be a geodesic, it would be a great circle. We would end up on the same place. But because we are on an ellipse side, that's not true. We can compute, for example, the whole trajectory. Let's just do this. So we start here. That will be the trajectory we are computing. We end up more or less at the same place. We can now say that we want to center this map at my location, meaning my longitude, right? So you see, that's the trajectory we are following. And now by adding this gear range, we center around our location and with a radius of just 50 miles. And we see how the end of this trajectory moves to the east, sorry, to the west. And it's, I don't know, about 30 miles or so from here. Another question, is geographic north also used in bearing calculation? The southern hemisphere. Yes, indeed. So when we are in the southern hemisphere, bearing angles are also referred to the north. The direction is degrees. Is there a way to specify magnetic degrees? No, we don't have magnetic degrees, but we do know where the magnetic pole is. And I will have an example further down. Yes. So we have looked at distances and angles. Now let's look at areas so we can compute the geo area of any of the entities. Now, something important here is that for each entity we have several polygons. For example, if we refer to the United States, that means continental United States. So only this area, we now have this geovariant to change to various variants of the same country. There is one, this one is called the default map area, but we have another one called all areas. And this includes all territories, including Alaska and Hawaii and the various territories of the US in the Pacific. So now the geo area, of course is larger. Right? So that was like 3 million miles, and now it's 3.7 million miles. We can compute this as a fraction of the area of the world. And we see that it covers about 2% of the world. Right? So geo area can compute areas of any polygon in the format that you saw before. And again, it's all done with ellipsoidal geometry. Okay, so another thing we can compute is what we call travel directions. So let's take two countries, Germany and Spain, and we take random positions in each country. These two here. So let's rerun it again. So now we got that location in Germany, that location in Spain, these two. And what we do with the function travel directions is to compute directions on how to go through actual roads from one to the other. And now I put this in a dynamic geographic map. You see, I'm just drawing the polygons of the two countries, the markers on the random positions that were computed by random geoposition here. And then I draw a thick red path corresponding to the travel directions. We have computed just that one. And now we could, for example, I don't know, zoom around this location in Germany. Right. And I want to show how this is precise enough to actually take into account all turns. And even, for example, we go to the motorway, you'll see how it's following all the intersections, etc. So this becomes slower because at some zoom, we have to start generating tiles that have not been requested before. Up to Zoom 13, we have all tiles pre computed, but at some point we have to compute some of them. And you see how this knows, for example, on which side of the road you have to travel, etc. Again, this is computing those tiles from the OSM data. And there we have it. Okay. Okay. You can compute also things like the distance travel, an estimation of time, assuming you drive. It's also possible to tell it that you want to go by bike or walking. And this is a data set of instructions. So it will tell you how much you have to move from in which street, giving you coordinates. You can extract individual paths so that you can draw a little map of that area or that street, etc, etc, and you have here all the instructions all the way from Germany to Spain. And that would be places in Spain. Okay? Yes. So let's discuss now a bit about projections. So we have a very large collection of projections for the sphere we have more than 150 and then we have hundreds more for local maps of different areas. For example the US this is a map of the whole world in the Alvers projection. This is a conic projection. It's a projection that starts by cutting the earth around the axis and then cutting it also around here. And I'm projecting this on a cone. This is the generatrix lines of a cone. This is the question that Sandar was asking before. How do we draw a scale bar here? So let's do that. So if I do now the scale bar goes to metric. So now we have here a scale bar. Now of course, because distances here and distances here are different, what we do is that we compute these effectively for the center of the map. We do a computation of the length or distance distortion at the center of the map. And that's what we use. So for a map that covers the whole world and it's in, in a non cylindrical projection, this. Well, actually, yes, even for cylindrical projections there will be different distortions depending on where you are in latitude. So yes, this will apply at the center mostly. Okay. So we have geoprojection data to compute various properties, to report properties and options for the GEO projections. So each of the projections has options. For example, let's do Albers. So what can we change for the Albers projection? So we have the centering which will be that point. It's the point of the map where. The projection gets tangent to that cone that we were discussing before would be tangent at that location, but would touch the earth rather than being tangent. The grid origin. That's the coordinates of the projected map reference models. That's to control the size of the map and the standard parallel. So these are two lines here where the projection is especially good. Let's change for example, some of these. So if I take this and I put it here that would be exactly the same map I've computed before. But if I change the standard parallels now it's a 30 rather than 60. You will see how the curvature changes. Right. So this is still an Arab projection, but now I have changed this. Or I can use a very high standard parallel and then this will look almost like a semicircle, Right? So, so you can change all this projection parameters also, for example, we can put a grid of projected coordinates, right? So these are the rectangular coordinates of the projected map. And the scale is controlled by this number. If I put a 10 here, this will be 10 times larger. So now these two will be a 20. If you want this to be in some sort of approximate meters, you just put here the radius of the earth in meters. Or if you wanted in miles, you put here the rate, the radius of the Earth in miles, etc. Or for example, notice 0, 0 gives 0, 0. If I change this to, I don't know, 10,000, then that number is now 10,000. This is still zero because it didn't change that. So that allows you to shift the projected coordinate. So there is much freedom in all these options that we have for projections. We can also get properties. For example, those are the properties of the Mercato projection. It's a cylindrical projection, it's a conformal projection, so it preserves angles. Alvers is not conformal, but it's equal area. So albers preserves areas, etc. So this is very informative about the multiple projections we have. So as I said, we have more than 150 projections on the sphere. And then we have local coordinate systems. These are the standard plate coordinate Systems of the U.S. we have two collections, the ones given in 27, 1927 and the ones given in 1983. And these are for example the ones for Alaska. So each state has a bunch of them. And these are kind of suggested projections to use for that state. So these are a few of the projections that we can use. And this is a collage of the shapes of the world for the 150something projections on the sphere. Okay, so it's, you see, it's much fun to play with projections. Okay, so that was about geo computations. And now I'm going to start the last section of the talk dedicated to geovisualization. So how do we represent data on those maps that we computed with geographics? Okay, so we do this via a collection of functions, geovisualization functions. And the first one we will be looking at is called Geo region value plot. This is a way of representing heat maps. So we just use different colors and this is a legend about them on the values that we are representing for a given area. So for example, here we say for the area of China and its subdivisions, give me results about population. The background we are going to be using is called vector monochrome, which is very useful to avoid distractions of other colors when we are representing things with a given color. And again that's the size of the image. So this will go to WolframAlpha, get information about the subdivisions of China, their populations, etc. And this is the map we get. Now we can also draw density maps. And for example, take this collection of points, they are spanning the whole world. See latitudes from minus 90 to 90, minus 180 to plus 180 in longitude. And now we get some values that we have computed somewhere else. Doesn't matter. Now you see, you say that for those locations you want those values, they have to correspond to 1 to 1. So you see 703 points here, 703 values here. And so this is a density plot of those values. Again we get this map, that's the legend. We are using both colors and opacity. We can draw the same map using contours and their labels. And now with show standard function in buffer language to merge different graphics result, we get that map that contains both the density map and the contour labels and the contours. Here we have another geovisualization function. And now we will talk a bit about magnetic information of the Earth. So we have this function called geomagnetic model data. We have another one called geogravity model data that reports data about the gravitational field. So this is about the magnetic field of the Earth. So we have recent data about the model for the magnetic field. This is something that is updated quite frequently every few years because the magnetic field of the earth keeps moving, keeps changing. And so for a given location and date, we can report the magnitude of the magnetic field, its various components, the value of the magnetic potential at your location, etc. So we see that for example, at my location there is an angle of -3 degrees of, of magnetic north at this location with respect to geographic north. And so we can get that represented as a geo vector. This follows the same notation as before. So location goes to values. So that's the magnetic field at my location represented as magnitude angle with respect to north is a bearing angle. So you see minus 3 degrees as before. And that is the vertical component. We can represent it in a map and that would be at my location where so the direction of the magnetic lines here. So the magnetic poles are changing quite fast. And so this is a computation we can perform. So there are two things we can compute about the magnetic pole. There is the so called north magnetic pole, which is the north pole of an average dipole that would produce more or less the same magnetic field as the Earth. So this is some sort of average computation. And then we have what we call the deep pole. The deep pole is the location of the Earth at which the magnetic field lines are actually hitting the earth vertically. And that's a much harder computation because we have to analyze in real time the shape of the magnetic field and find where that geometric property happens. And so this is, it takes quite a lot of time, you see, like more than four minutes to do the computation. So I have it here pre computed. And so we are going to do this. So in red we have the position changing by decades of the average magnetic pole. And here again we have by decades the positions of the deep pole. And you see how in recent decades it's moving very fast. We can compute the shape of the magnetic field in that area. And we get something like this. This is a harder computation. So it takes 10 seconds or so. And so you see how the lines are accumulating here. This is, this is the pole, the point of the deep pole that we were discussing before. Okay, so let's see, that's the shape of the magnetic pole magnetic field currently around the north pole. So that's geographic north pole, that's magnetic north pole, at least the deep pole. Right. So you have the two, the two possibilities, the average one, the deep pole. Yeah. So by knowing the positions of these points, you can correct and compute the directions with respect to these various notions of north pole. We can do the same thing for the south pole, of course. Okay, any other thing about magnetic fields here? So the next function we are going to be looking at is geohistogram. Geo histogram is a way of performing histograms. And we have various shapes. By default we use hexagons, but you can use rectangles or you can do histograms over the geographic regions, states or whatever. So here we have data, this collection of more than 4,000 locations for breweries in the U.S. and now we say that we want a histogram. And with this we control how many of these hexagons we get the sizes effectively. And that's what we get. And here you see with a tooltip we have how Many of these breweries fall inside each of these hexagons. We can also do a geo smooth histogram. You see how now this is a bit like this density plots that we had before. Okay, so that's histograms. What else we have now? Geograph plot. So this is about representing connectivity. So for example, imagine that we have these collections of edges and we use the same notation that graph uses, right? So we have entity, arrow, entity, entity, arrow, entity. So each of these represents one of the edges of the graph. So that's a geograph plot and connecting many of these CITIES in the U.S. the state, the capitals of the states. And again, as usual in the graphics capabilities of the PERFORM language, we have much freedom on how to style the results. So now we are going to be using a different vertex shapes, different size, etc. And again, as before, we use a vector monochrome background to avoid distractions. And you see we also use a different geo projection. All these options of geographics are inherited by all the geovisualization functions so you can control how the map is going to be looking. Another thing I haven't mentioned, all the maps in Wolfram language have this tooltip at the bottom reporting the sources of the data, right? So in this case will be map tiler. That's where we get the vector data. OpenStreetMap for various other sources of data and of course always evolve from knowledge base where we get all the information about the entities. There is a graph layout option that allows you for example to compute rather than straight lines or geodesics. We compute driving, so this takes now longer because it has to do travel directions computation between each of these two locations. So these are lines following the roads of the United States. And while that computes, by default this is using driving instructions, but we don't have information on how to go from one continent to another. If you just have to go, I don't know, across a small sea or something like that, we will add ferry information, but we don't have information about how to cross the Atlantic. So we add just a geodesic. Okay, Color functions. This is also very interesting freedom. And here the example is about the moon. So we have elevation information about the Earth, of course, the moon, Mercury, Mars and some other celestial bodies. So this is about the moon and we are using our relief map that's using the GEO elevation information. And notice that we will be using two different color functions for the visible side of the moon and the hidden side of the moon. So we control that with geocenter so you see Geocenter goes to zero. That would be here, that's at the center of the visible side of the Moon. And we do here geocenter 180. So that goes to the opposite side. Notice the difference in the amount of craters. So the visible side is protected by the Earth and so it receives less impacts than the opposite side of the Moon. And so here by default, that's the color function we use for the Moon and imitates what NASA does. So yes, so these colors are imitating the default choice of color function that NASA uses. And here we use gray levels. And so here we see the two sizes of the Moon. So this is using the orthographic projection, which can show up to half of the body. And yes, we can control zoom levels. The larger the zoom level, more data, the more precise it will look. But the longer it will take to download, the longer it will take to process. Okay, We don't have geo specific functions to do 3D visualization yet. We will have them in the future. But we can of course produce our own 3D visualizations by using the standard Wolfram language functions for 3D visualization. So for example, let's take geoelevation data for Alaska. Choosing an appropriate projection. Something very important here is that we have to worry about conventions. So the convention used by GEO elevation data is reversed with respect to the Convention used by Lisp3D. So it's very important that we add this, otherwise this will look reversed, like flipped on a mirror. So again, because we don't have a geospecific function, we have to control the relative sizes of the axis. And so in this case we add this number just to control how tall this box is. And so that's the 3D result that we got for the area around Alaska. You see how shallow this area is. When there was ice long ago, it was possible to cross from one side to the other. And this is a 3D object, right, that you can rotate. We can do the same thing around the North Pole. For example, that's a 500 by 500 matrix of elevation data around the pole. And now we can use a color function again. There is a specific color function called hypsometric tints that changes very fast color when reaching zero. So this is very useful to distinguish the sea part from the, from, from, from the land part. Right? And so this is the area around the North Pole where here, here we have the Canada, that's Russia, that's Norway and Sweden, Finland, etc. Greenland and Iceland. Okay. And we're getting close to the end. So here I have a collection of nice examples that some of our users have posted in the Wolfram community page. So, for example, let's look at some of those. So this is. Okay, I need to. Okay, so this, this is a post by Greg in which he was analyzing the. The four colors theorem in geography. So this takes a bit to load. Has many maps. And so he was analyzing places in the US and all over the world where we have exceptions of these places where four or more places meet. And it's all very interesting. And you see there are some places with very interesting geometries or something like that. So just by zooming it a bit more, you see that it doesn't really get to the end, etc. So it's a lot of fun to read about all these geographic and administrative configurations. So that's one. What else do we have here? That's another beautiful one. And so this is using travel directions to compute directions from lots and lots of cities. I think it's like several thousand, 30,000, actually. That's quite a lot. Let's keep waiting. Yes, so here it's a beautiful map constructed with Wolfram language and geographics. And you see the roads from multiple cities all over Europe accumulating around Rome. So yes, so there are multiple. And there are more. This is just a selection. And these are nice examples on how to compute things. And. And you have here full code on how to reproduce these for other areas, for example, and. Well, this is my last slide, so let me review. We have seen how to represent and manipulate data using quantity, data, object, entity and geoposition. Those are the four fundamental blocks to work with the geographic functionality. We have seen a collection of examples about geocomputation involving computations about distances, directions, areas, travel directions and projections. Also working with geo elevations and the magnetic field of the earth. And then we have seen a collection of geovisualization functions that allows you to place and to represent data on top of those maps. We have seen things like geo histogram, geo region value plot, geostream plot, geograph plot, and more as well. This makes Warframe language a very powerful system where to produce maps and perform geographic computations. And for those of you who are interested in knowing more about it, I invite you to visit this page about the Warframe geography product. Here we have an imitation of this nice map that Bernard produced. Accumulating round drawn. And here we discuss and have links to the collections of functions that are relevant for that area. So we have multiple backgrounds Geovisualization. Here we have another example of vector visualization, examples of computation data. Again, information about projections and I haven't looked at. But we also have a nice collection of functions to perform statistical computations. And the last section is dedicated to maps of celestial bodies. This is taken from a post by our local expert in astronomy and he computed here the path that the protagonist in the movie the Martian followed from one place to another. Okay, so you have lots of information about it, some links to courses and more videos, etc. And related core areas like geometry visualization, etc. Okay, so that's all. Let's see if there are more questions. Any plans to be able to load products like geodatabases or shape files? Okay, yes, so our import functionality is quite powerful and we can use it to load shape files, for example. So let's see. So we can go to. So let's do, let's go to help info that would be easier. And now we look for Shape files. So here we go to this import format and here we we see how to use some of these SHP files. Import them and they automatically come back as a geographics. You can import various fields about them, right? You can extract the actual data information about, I don't know, the job projection, the datum, the reference model, et cetera. Right. So yes, if import can currently import that data format, then we can get that data into the Geo functionality. Well, thank you all for your nice words and I hope you enjoy using the Geo functionality. You can always contact me for suggestions and yeah, we would love to hear about them. So, any other question? Well, if not, let's stop here. As I said, you can contact me at the company or contact tech support. They will know how to reach me. And thank you very much for attending the talk and for your questions. Bye.
More from Guy

Cheryl Strauss Einhorn | The Human Edge: Smarter Decisions in the Age of AI | Talks at Google

Rachel Glennerster | Innovation and the Center for Global Development | Talks at Google

Rebecca Winthrop | Rethinking the Purpose of Education in the Age of AI | Talks at Google

Dr. Robert Wachter | A Giant Leap: How AI Is Transforming Healthcare... | Talks at Google






