<jupyter_start><jupyter_text>USGS 3DEP LiDAR Point Clouds- https://registry.opendata.aws/usgs-lidar/- https://usgs-lidar-stac.s3-us-west-2.amazonaws.com/ept/catalog.json-     aws s3 ls --no-sign-request s3://usgs-lidar-public/<jupyter_code>! aws s3 ls s3://usgs-lidar-public/
#! conda install -y awscli
import requests
stac_catalog_url = 'https://usgs-lidar-stac.s3-us-west-2.amazonaws.com/ept/catalog.json'
r = requests.get('https://usgs-lidar-stac.s3-us-west-2.amazonaws.com/ept/catalog.json')
dir(r)
cat_links = r.json()['links']
links_list=[]
for link in cat_links:
    print (link['href'])
    links_list.append(link['href'])
import os
for ref in links_list:
    bn = os.path.basename(ref)
    if bn.startswith('SD'):
        print(bn)
yankton_list = [ref for ref in links_list if 'Yankton' in ref]
yankton_list
r = requests.get(yankton_list[0])
r.json()
r.json()['geometry']
bb = r.json()['bbox']
bb
c_lon = bb[0]
c_lat = bb[1]
import folium
m = folium.Map(location=[c_lat, c_lon], zoom_start=7, tiles='CartoDB positron')
m
import json
geom_dict = r.json()['geometry']
geoj = json.dumps(geom_dict)
geo_j = folium.GeoJson(data=geoj,style_function=lambda x: {'fillColor': 'orange'})
folium.Popup('Yankton Stuff').add_to(geo_j)
geo_j.add_to(m)
m
r.json()['id']
r.json()['properties']
r.json().keys()
r.json()['assets']
url = r.json()['assets']['ept.json']['href']
url
r = requests.get(url)
r.json().keys()
r.json()
! aws s3 ls s3://usgs-lidar-public/SD_Yankton_County_2012/ept-sources
! aws s3 ls s3://usgs-lidar-public/SD_Yankton_County_2012/ --recursive | grep 001401
! aws s3 ls --no-sign-request s3://usgs-lidar/
url = 'https://s3-us-west-2.amazonaws.com/usgs-lidar-public/SD_Yankton_County_2012/ept-sources/SD_Yankton_County_2012_001401.json'
r= requests.get(url)
r.json().keys()
r.json()
! aws s3 ls --no-sign-request --human s3://usgs-lidar/Projects/SD_Yankton_County_2012/laz/SD_Yankton_County_2012_001401.laz
! wget https://s3-us-west-2.amazonaws.com/usgs-lidar/Projects/SD_Yankton_County_2012/laz/SD_Yankton_County_2012_001401.laz
!aws s3 ls --request-payer=requester usgs-lidar/Projects/SD_Yankton_County_2012/laz/
!aws s3 ls --human --request-payer=requester usgs-lidar/Projects/SD_Yankton_County_2012/laz/SD_Yankton_County_2012_001401
!aws s3 ls --human --request-payer=requester usgs-lidar/Projects/SD_Yankton_County_2012/laz/SD_Yankton_County_2012_001401.laz
! aws s3 cp --request-payer=requester s3://usgs-lidar/Projects/SD_Yankton_County_2012/laz/SD_Yankton_County_2012_001401.laz ~/bigfiles/<jupyter_output>download: s3://usgs-lidar/Projects/SD_Yankton_County_2012/laz/SD_Yankton_County_2012_001401.laz to ../../../../../../../../../home/ec2-user/bigfiles/SD_Yankton_County_2012_001401.laz
{'fraction_non_alphanumeric': 0.17084870848708486, 'fraction_numerical': 0.05904059040590406, 'mean_word_length': 4.932166301969366, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '155951', 'license': 'MIT', 'n_tokens_mistral': 1295, 'n_tokens_neox': 1151, 'n_words': 161, 'path': 'experiments/3dep/notebooks/notebooks/90_aws_lidar_3dep_basics_stac.ipynb', 'repo_name': 'tonybutzer/ajit', 'size': '2710'}