Skip to content

Commit

Permalink
Merge branch 'main' into compliance_gerrymandering
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt committed Nov 3, 2023
2 parents 0107ab4 + 75e37da commit 2970f51
Show file tree
Hide file tree
Showing 10 changed files with 1,814 additions and 782 deletions.
903 changes: 903 additions & 0 deletions seattle_lidar/anaconda-project-lock.yml

Large diffs are not rendered by default.

64 changes: 27 additions & 37 deletions seattle_lidar/anaconda-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,50 @@
name: seattle_lidar
description: Visualize Lidar Scattered Point Elevation Data in Seattle
examples_config:
created: 2017-04-20
maintainers:
- jbednar
- PeterDSteinberg
labels:
- datashader
- geoviews

user_fields: [examples_config]

channels: [conda-forge, pyviz,defaults] # Previously nodefaults attempt
channels: [conda-forge, defaults]

packages: &pkgs
- python=3.7
- notebook
- cartopy
- datashader
- fastparquet
- geoviews
- holoviews
- python-snappy
- intake
- intake-xarray
- rasterio
- dask
- s3fs
- pandas=1.2.5
- distributed=2021.8.0
- tbb
- xarray-spatial
- param
- python-graphviz
- python=3.9
- notebook >=7.0.6
- cartopy >=0.22
- datashader >=0.16.0
- fastparquet >=2023.10.1
- geoviews >=1.11.0
- holoviews >=1.18.0
- python-snappy >=0.6.1
- intake >=0.7.0
- intake-xarray >=0.7.0
- rasterio >=1.3.9
- dask >=2023.10.1
- s3fs >=2023.10.0
- pandas >=2.1.2
- distributed >=2023.10.1
- tbb >=2021.10.0
- param >=2.0.0
- ipycytoscape # conda-forge
- xarray-spatial >=0.3.7 # conda-forge

dependencies: *pkgs

variables:
INTAKE_CACHE_DIR: data

commands:
notebook:
notebook: Seattle_Lidar.ipynb
test:
unix: pytest --nbsmoke-run -k *.ipynb --ignore envs
windows: pytest --nbsmoke-run -k *.ipynb --ignore envs
env_spec: test
lint:
unix: pytest --nbsmoke-lint -k *.ipynb --ignore envs
windows: pytest --nbsmoke-lint -k *.ipynb --ignore envs
env_spec: test

env_specs:
default: {}
test:
packages: &testpkgs
- nbsmoke=0.2.8
- pytest=4.4.1
dependencies: *testpkgs
notebook: seattle_lidar.ipynb

platforms:
- linux-64
- win-64
- osx-64
- osx-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Seattle Lidar\n",
"Written by Peter Steinberg<br>\n",
"Created: April 20, 2017<br>\n",
"Last updated: August 5, 2021"
"# Seattle Lidar"
]
},
{
Expand Down Expand Up @@ -89,8 +86,7 @@
"metadata": {},
"outputs": [],
"source": [
"from pyproj.transformer import Transformer\n",
"from pyproj.crs import CRS"
"from pyproj.transformer import Transformer"
]
},
{
Expand Down Expand Up @@ -184,8 +180,7 @@
"metadata": {},
"outputs": [],
"source": [
"dask.delayed(convert_coords)(df) \\\n",
" .visualize()"
"dask.delayed(convert_coords)(df).visualize()"
]
},
{
Expand Down Expand Up @@ -220,7 +215,8 @@
"metadata": {},
"outputs": [],
"source": [
"%time dataset = df_merc.compute()"
"%%time\n",
"dataset = df_merc.compute()"
]
},
{
Expand All @@ -246,7 +242,8 @@
"metadata": {},
"outputs": [],
"source": [
"%time small_dataset = small.compute()"
"%%time\n",
"small_dataset = small.compute()"
]
},
{
Expand All @@ -265,7 +262,7 @@
"import geoviews as gv\n",
"import holoviews as hv\n",
"from holoviews import opts\n",
"from holoviews.operation.datashader import datashade, rasterize, rd\n",
"from holoviews.operation.datashader import rasterize, rd\n",
"\n",
"hv.extension('bokeh')"
]
Expand Down Expand Up @@ -336,7 +333,8 @@
"metadata": {},
"outputs": [],
"source": [
"%time display(tiles * plot(small_dataset))"
"%%time\n",
"tiles * plot(small_dataset)"
]
},
{
Expand All @@ -345,7 +343,8 @@
"metadata": {},
"outputs": [],
"source": [
"%time display(tiles * plot(dataset))"
"%%time\n",
"tiles * plot(dataset)"
]
},
{
Expand All @@ -354,7 +353,8 @@
"metadata": {},
"outputs": [],
"source": [
"%time display(tiles * plot(df_merc))"
"%%time\n",
"tiles * plot(df_merc)"
]
},
{
Expand All @@ -372,7 +372,8 @@
"metadata": {},
"outputs": [],
"source": [
"%time raster = plot(dataset, dynamic=False, width=1000, height=1000).data"
"%%time\n",
"raster = plot(dataset, dynamic=False, width=1000, height=1000).data"
]
},
{
Expand Down Expand Up @@ -443,11 +444,24 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"pygments_lexer": "ipython3"
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Binary file removed seattle_lidar/thumbnails/Seattle_Lidar.png
Binary file not shown.
Binary file added seattle_lidar/thumbnails/seattle_lidar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions test_data/seattle_lidar/catalog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sources:
seattle_lidar:
driver: csv
args:
urlpath: "{{CATALOG_DIR}}data/seattle-lidar.zip"
metadata:
crs: State Plane Coordinate System Washington North FIPS 4601
Binary file added test_data/seattle_lidar/seattle-lidar.zip
Binary file not shown.
Loading

0 comments on commit 2970f51

Please sign in to comment.