You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/courses/earth-analytics-python/02-intro-to-lidar-and-raster/interactive-maps/2018-02-05-maps02-interactive.md
+23-23Lines changed: 23 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ topics:
24
24
25
25
{% include toc title="In This Lesson" icon="file-text" %}
26
26
27
-
This tutorial walks you through how to create interactive maps with `Python` in `Jupyter Notebook` using the `folium` package and how to overlay a raster on an interactive map created with `folium`.
27
+
This tutorial walks you through how to create interactive maps with `Python` in `Jupyter Notebook` using the `folium` package and how to overlay a raster on an interactive map created with `folium`.
28
28
29
29
<div class='notice--success' markdown="1">
30
30
@@ -33,7 +33,7 @@ This tutorial walks you through how to create interactive maps with `Python` in
33
33
After completing this tutorial, you will be able to:
34
34
35
35
* Create interactive map in `Jupyter Notebook` using the `folium` package for `Python`
36
-
* Overlay a raster on an interactive map created with `folium`
36
+
* Overlay a raster on an interactive map created with `folium`
37
37
38
38
## <i class="fa fa-check-square-o fa-2" aria-hidden="true"></i> What You Need
39
39
@@ -43,33 +43,33 @@ You will need a computer with internet access to complete this lesson.
43
43
44
44
## Why Use Interactive Maps
45
45
46
-
Interactive Maps are useful for earth data science because they:
46
+
Interactive Maps are useful for earth data science because they:
47
47
48
48
* Clearly convey complex information
49
-
* Are more engaging for viewers than static maps
50
-
* Can be seamlessly integrated into `Jupyter Notebooks`
49
+
* Are more engaging for viewers than static maps
50
+
* Can be seamlessly integrated into `Jupyter Notebooks`
51
51
52
-
There are two great `Python` packages for creating interactive maps: `folium` and `mapboxgl`. Both of these packages are build on top off the `javascript` library called `leaflet.js`.
52
+
There are two great `Python` packages for creating interactive maps: `folium` and `mapboxgl`. Both of these packages are build on top off the `javascript` library called `leaflet.js`.
53
53
54
-
This lesson will focus on `folium`, which has been around longer than `mapboxgl` and thus, is well-documented by the `Python` community.
54
+
This lesson will focus on `folium`, which has been around longer than `mapboxgl` and thus, is well-documented by the `Python` community.
55
55
56
56
One major difference between the two packages is that `mapboxgl` requires a MapBox Access Token. If you are interested in exploring `mapboxgl` on your own, note that the MapBox Access token is free to use, but does require making an account with MapBox. You can find more information on the <a href="https://github.com/mapbox/mapboxgl-jupyter" target="_blank">Github page for this package</a>.
57
57
58
58
59
59
## What is an API?
60
60
61
-
An API (or application programming interface) is an interface that opens a computer-based system to external requests and simplifies certain tasks, such as extracting subsets of data from a large repository or database.
61
+
An API (or application programming interface) is an interface that opens a computer-based system to external requests and simplifies certain tasks, such as extracting subsets of data from a large repository or database.
62
62
63
-
For example, web-based APIs allow you to access data available using web-based interfaces that are separate from the API that you are accessing. Thus, web APIs are a way to avoid the extraneous visual interfaces that you do not need and get the desired data into the tool that you want to use.
63
+
For example, web-based APIs allow you to access data available using web-based interfaces that are separate from the API that you are accessing. Thus, web APIs are a way to avoid the extraneous visual interfaces that you do not need and get the desired data into the tool that you want to use.
64
64
65
-
Often, you access data from web-based APIs using a URL that contains sets of parameters that specifies the type and particular subset of data that you are interested in. You will learn more about using APIs later in this course.
65
+
Often, you access data from web-based APIs using a URL that contains sets of parameters that specifies the type and particular subset of data that you are interested in. You will learn more about using APIs later in this course.
66
66
67
-
For this lesson, you simply need to know that the basemaps that you will access to create your interactive maps come from APIs that are provided by various organizations such as OpenStreetMap, MapBox, Stamen, Google, etc.
67
+
For this lesson, you simply need to know that the basemaps that you will access to create your interactive maps come from APIs that are provided by various organizations such as OpenStreetMap, MapBox, Stamen, Google, etc.
You can make an interactive map with `folium` using just one line of code!
87
+
You can make an interactive map with `folium` using just one line of code!
88
88
89
89
You can use the `Map()` function from `folium` and providing a latitude and longitude to center the map. The map is created using the default basemap from OpenStreetMap.
90
90
@@ -110,7 +110,7 @@ m
110
110
111
111
### Change Basemap
112
112
113
-
You can change the basemap for the map by providing a value for the `tiles` parameter of the `Map()` function.
113
+
You can change the basemap for the map by providing a value for the `tiles` parameter of the `Map()` function.
114
114
115
115
There are many different options including `Stamen Terrain`, `Stamen Toner` and `cartodbpositron`. More details and basemaps names available on the <a href="http://python-visualization.github.io/folium/modules.html#folium.map.Layer" target="_blank">Folium Documentation</a> for the `Map()` function.
116
116
@@ -137,12 +137,12 @@ m
137
137
138
138
### Add Markers
139
139
140
-
You can also add markers to label specific points on top of a `folium` basemap, such as the coordinates that are being used to center the map. You can even add a pop-up label for the marker that is activated when you click on it.
140
+
You can also add markers to label specific points on top of a `folium` basemap, such as the coordinates that are being used to center the map. You can even add a pop-up label for the marker that is activated when you click on it.
141
141
142
142
{:.input}
143
143
```python
144
144
# Create a map using Stamen Terrain, centered on Boulder, CO
145
-
m = folium.Map(location=[40.0150, -105.2705],
145
+
m = folium.Map(location=[40.0150, -105.2705],
146
146
tiles = 'Stamen Terrain')
147
147
148
148
# Add marker for Boulder, CO
@@ -169,20 +169,20 @@ m
169
169
170
170
## Raster Overlay on Interactive Map
171
171
172
-
You can also overlay rasters on `folium` basemaps.
172
+
You can also overlay rasters on `folium` basemaps.
173
173
174
-
The default coordinate system and projection for web-based basemaps is WGS84 Web Mercator. To overlay data on web-based basemaps, the overlay data needs to be in the WGS84 coordinate system (<a href= "http://spatialreference.org/ref/epsg/wgs-84/" target="_blank">see this link for more information on this coordinate system</a>).
174
+
The default coordinate system and projection for web-based basemaps is WGS84 Web Mercator. To overlay data on web-based basemaps, the overlay data needs to be in the WGS84 coordinate system (<a href= "http://spatialreference.org/ref/epsg/wgs-84/" target="_blank">see this link for more information on this coordinate system</a>).
175
175
176
176
Thus, to overlay a raster on a basemap, you first need to project the raster to WGS84 (EPSG 4326).
177
177
178
178
### Project Raster
179
179
180
-
You can use the `rasterio` package, which you imported as rio, to project a raster. In this example, you will use a raster for a post-flood digital terrain model (DTM) in the Northwest Boulder area: `post_DTM.tif`.
180
+
You can use the `rasterio` package, which you imported as rio, to project a raster. In this example, you will use a raster for a post-flood digital terrain model (DTM) in the Northwest Boulder area: `post_DTM.tif`.
181
181
182
182
{:.input}
183
183
```python
184
184
# Create variables for destination coordinate system and the name of the projected raster
## <iclass="fa fa-ship"aria-hidden="true"></i> Welcome to Week {{ page.week }}!
@@ -51,22 +52,19 @@ You can also download the data using the link below.
51
52
52
53
### The Homework Assignment for This Week Can Be Found on Github
53
54
54
-
55
55
<ahref="https://github.com/earthlab-education/ea-python-2020-03-spatial-vector-template"target="_blank">Click here to view the GitHub Repo with the assignment template. </a>
56
56
57
57
The lessons for this week have been moved to our <ahref="https://www.earthdatascience.org/courses/use-data-open-source-python/">Intermediate Earth Analytics Textbook. </a>
58
58
59
59
Please read the following chapters to support completing this week's assignment:
60
-
* <ahref="https://www.earthdatascience.org/courses/use-data-open-source-python/courses/use-data-open-source-python/intro-vector-data-python/">Chapters 5-6 - Introduction to vector data- spatial data in open source python </a>
60
+
* <ahref="https://www.earthdatascience.org/courses/use-data-open-source-python/intro-vector-data-python/">Chapters 2-3 - Introduction to vector data- spatial data in open source python </a>
61
61
62
62
</div>
63
63
64
64
65
65
66
66
67
67
68
-
69
-
70
68
{:.output}
71
69
Downloading from https://ndownloader.figshare.com/files/12459464
72
70
Extracted output to /root/earth-analytics/data/spatial-vector-lidar/.
Copy file name to clipboardExpand all lines: _posts/courses/earth-analytics-python/04-raster-vector-extract-data/2018-06-15-lidar-remote-sensing-uncertainty-landing-page.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ category: courses
4
4
title: "Lidar Remote Sensing Uncertainty - Compare Ground to Lidar Measurements of Tree Height in Python"
@@ -43,7 +43,7 @@ The lessons for this week have been moved to our <a href="https://www.earthdatas
43
43
44
44
Please read the following chapters to support completing this week's assignment:
45
45
* <ahref="https://www.earthdatascience.org/courses/use-data-open-source-python/spatial-data-applications/lidar-remote-sensing-uncertainty/">NEW: Raster / Vector Spatial Data Applications: Compare Lidar to Human Measured Tree Heights -- Uncertainty</a>
46
-
* <ahref="https://www.earthdatascience.org/courses/use-data-open-source-python/courses/use-data-open-source-python/intro-vector-data-python/">REVIEW: Intro to Vector Spatial Data in Open Source Python</a>
46
+
* <ahref="https://www.earthdatascience.org/courses/use-data-open-source-python/intro-vector-data-python/">REVIEW: Intro to Vector Spatial Data in Open Source Python</a>
0 commit comments