Skip to content

Commit

Permalink
28 preprocess raster pop (#44)
Browse files Browse the repository at this point in the history
* chore: pulled in pop requirements and package CI

* feat: added pop class skeletons

* feat: added skeleton of plot method

* feat: filepath defences; read crs

* feat: added read and clip

* feat: aoi bounds crs conversion

* feat: added rounding preprocess step

* feat: added threshold preprocess step

* refactor: swapped argument order in get_pop

* feat: added NotImplementedError to VectorPop

* feat: added vectorize to geopandas

* feat: added pop var_name

* feat: added cell id

* feat: added centroid location and dataframe

* refactor: mangaled round var

* feat: added within urban centre classification

* feat: added interative plot basis

* feat: added aoi to interactive plot

* feat: save interactive to file

* docs: add folium plot docstring

* feat: added kwargs to plot folium

* refactor: within urban centre var name

* feat: plot method logic control added

* docs: added attributes and raises to class docstring

* feat: added output to get_pop

* feat: added matplotlib plot

* fix: dropped boundary column after sjoin

* feat: added kwargs to matplotlib plot; added kwargs docs help

* feat: skelton of cartopy plot func

* feat: added save to cartopy plot

* feat: added figsave kwarg to cartopy plot

* feat: added kwargs to cartopy plot; location of attr modifiable

* refactor: popu classes into respective modules

* refactor: var_gdf to pop_gdf

* test: started TestRasterPop

* test: added fixtures for aoi and uc

* test: added interl methods test; tweak aoi and uc polygons

* refactor: _read_and_clip sets xds internally

* test: fixed floating point rounding

* test: added _read_and_clip test

* refactor: moved round var from private into _to_geopandas()

* test: added geopandas conversion pop check

* test: added _within_urban_centre asserts

* test: centroid gdf crs

* chore: added pytest lazy fixture

* test: added round and threshold tests

* refactor: removed unnecessary exists defence

* test: added raises tests

* feat: added uc crs conversion

* test: aoi and uc crs conversion

* chore: removed utils placeholder

* test: updated file docstring

* test: added light geometry and centroid tests

* docs: reviewed docsrings/comments in RasterPop

* docs: reviewed docsrings/comments in RasterPop test

* chore: Add rioxarray to reqs

* refactor: Move copied helper function to src

* refcator: Rm unneeded import statement

---------

Co-authored-by: r-leyshon <[email protected]>
  • Loading branch information
ethan-moss and r-leyshon authored Aug 9, 2023
1 parent d90381a commit 6d0f265
Show file tree
Hide file tree
Showing 7 changed files with 1,299 additions and 57 deletions.
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ cartopy
folium
geocube
mapclassify
pytest-lazy-fixture
seaborn
rioxarray
-e .
4 changes: 4 additions & 0 deletions src/transport_performance/population/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"""`transport_performance.population`.
See `README.md` for more details.
"""
Loading

0 comments on commit 6d0f265

Please sign in to comment.