forked from earthlab-education/ea-lidar-uncertainty-review
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmarowitz_robyn_lidar_uncertainty.py
More file actions
90 lines (53 loc) · 1.56 KB
/
marowitz_robyn_lidar_uncertainty.py
File metadata and controls
90 lines (53 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env python
# coding: utf-8
# <img style="float: left;" src="earth-lab-logo-rgb.png" width="150" height="150" />
#
# # Earth Analytics Education
# # LiDAR Uncertainty at SOAP and SJER NEON sites
# ## The Soap Site
# 
# Image Credit: National Ecological Observation Network, available at https://www.neonscience.org/field-sites/soap
# ## The SJER Site
# 
# Image Credit: National Ecological Observation Network, available at https://www.neonscience.org/field-sites/sjer
# In[3]:
import os
import pathlib
import earthpy as et
import pandas as pd
import geopandas as gpd
import matplotlib.pyplot as plt
import rasterstats as rs
import xarray as xr
import rioxarray as rxr
import seaborn as sns
import clean
# download the data from EarthPy
et.data.get_data('spatial-vector-lidar')
# set home directory
home_dir = os.path.join(
pathlib.Path.home(),
'earth-analytics',
'data',
'spatial-vector-lidar'
)
os.chdir(home_dir)
# In[7]:
class SOAPDataLoader(clean.NEONDataLoader):
site_name = 'SOAP'
id_col_name = 'ID'
formatting_dict = {'seperator':'-', 'plot': ''}
def id_modifier(self, id):
return 'SOAP' + str(id)
soap_data_loader = SOAPDataLoader()
# In[8]:
class SJERDataLoader(clean.NEONDataLoader):
site_name = 'SJER'
id_col_name = 'Plot_ID'
formatting_dict = {'seperator':'_', 'plot': '_plot'}
sjer_data_loader = SJERDataLoader()
# In[9]:
sjer_data_loader.plots()
# In[10]:
soap_data_loader.plots()
# In[ ]: