Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
max-line-length = 88
ignore = E203, E501, W503, W504
per-file-ignores =
__init__.py: F401
51 changes: 35 additions & 16 deletions examples/nu_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,45 @@
import os

# download some veg structure data
veg = nu.load_by_product(dpid='DP1.10098.001', site=['WREF','RMNP'],
startdate='2022-01', enddate='2023-12',
include_provisional=True, check_size=False,
token=os.environ.get('NEON_TOKEN'))
veg = nu.load_by_product(
dpid="DP1.10098.001",
site=["WREF", "RMNP"],
startdate="2022-01",
enddate="2023-12",
include_provisional=True,
check_size=False,
token=os.environ.get("NEON_TOKEN"),
)
# see what data tables were returned
veg.keys()

# download 30-minute PAR data
par = nu.load_by_product(dpid='DP1.00024.001', site='RMNP',
startdate='2023-06', enddate='2023-07',
timeindex=30, package='expanded',
include_provisional=True, check_size=False,
token=os.environ.get('NEON_TOKEN'))
par = nu.load_by_product(
dpid="DP1.00024.001",
site="RMNP",
startdate="2023-06",
enddate="2023-07",
timeindex=30,
package="expanded",
include_provisional=True,
check_size=False,
token=os.environ.get("NEON_TOKEN"),
)

# download CHM tiles covering the veg structure plots at WREF
pppy = veg['vst_perplotperyear']
east = pppy['easting'].to_list()
north = pppy['northing'].to_list()
pppy = veg["vst_perplotperyear"]
east = pppy["easting"].to_list()
north = pppy["northing"].to_list()

nu.by_tile_aop(dpid='DP3.30015.001', site='WREF', year=2023,
easting=east, northing=north, buffer=20,
include_provisional=True, check_size=False,
savepath='INSERT FILE PATH', token=os.environ.get('NEON_TOKEN'))
nu.by_tile_aop(
dpid="DP3.30015.001",
site="WREF",
year=2023,
easting=east,
northing=north,
buffer=20,
include_provisional=True,
check_size=False,
savepath="INSERT FILE PATH",
token=os.environ.get("NEON_TOKEN"),
)
7 changes: 6 additions & 1 deletion src/neonutilities/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from .citation import get_citation
from .aop_download import by_file_aop, by_tile_aop, list_available_dates, get_aop_tile_extents
from .aop_download import (
by_file_aop,
by_tile_aop,
list_available_dates,
get_aop_tile_extents,
)
from .tabular_download import zips_by_product
from .get_issue_log import get_issue_log
from .read_table_neon import read_table_neon
Expand Down
Loading