Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme #150

Merged
merged 14 commits into from
Feb 1, 2024
65 changes: 33 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,56 @@
[![DOI](https://zenodo.org/badge/487911703.svg)](https://zenodo.org/badge/latestdoi/487911703)
[![codecov](https://codecov.io/gh/IMMM-SFA/naturf/graph/badge.svg?token=SoIfjdS6BL)](https://codecov.io/gh/IMMM-SFA/naturf)
[![build](https://github.com/IMMM-SFA/naturf/actions/workflows/build.yml/badge.svg)](https://github.com/IMMM-SFA/naturf/actions/workflows/build.yml)

# naturf

## naturf
#### `naturf` (Neighborhood Adaptive Tissues for Urban Resilience Futures) is an open-source geospatial Python package for calculating urban building parameters to be compiled and input to the Weather Research and Forecasting model (WRF).

NATURF: Neighborhood Adaptive Tissues for Urban Resilience Futures
levisweetbreu marked this conversation as resolved.
Show resolved Hide resolved
### Purpose
`naturf` was created to:

## Description
- Calculate 132 urban parameters based on building footprints and height,
- Compile the parameters at sub-kilometer resolutions into binary files,
- Prepare binary files to be fed into WRF to understand the effect of building morphology on the urban microclimate.

The Neighborhood Adaptive Tissues for Urban Resilience Futures tool (NATURF) is
a Python workflow that generates data readable by the Weather Research and
Forecasting (WRF) model. The NATURF Python modules use shapefiles containing
building footprint and height data as input to calculate 132 building parameters
at any resolution and converts the parameters into a binary file format.
### Install `naturf`

NATURF was created to:
```bash
pip install naturf
```
### Check out a quickstart tutorial to run `naturf`

- addresses the knowledge gap of the effect of the geometry of a neighborhood on the local meteorology and
- translate neighborhood morphology (building footprints, heights, spacing, etc.) representations to the WRF-readable urban parameters so that meteorological processes at urban scale can interact with the built environment.
Run `naturf` using the quickstart tutorial: [`naturf` Quickstarter](https://immm-sfa.github.io/naturf/quickstarter.html)

## Example Data
### Getting started

The example data provided with this package includes a shapefile containing building footprints and heights for one 3.2km by 3.2km tile of
Washington, D.C. (C-5.shp) and a CSV file that lists the index name for each tile in Washington, D.C. (DC_Indices.csv).
New to `naturf`? Get familiar with what `naturf` is all about in our [Getting Started](https://immm-sfa.github.io/naturf/getting_started.html)

NATURF requires the center latitude and longitude of the study area in order to correctly project the output data,
but these values are already included in `scripts/workflow.py` for the example data.
### User guide

Outputs from the example data should include a binary file named `00065-00096.00065-00096`, an `index` file,
a CSV file with urban parameter values for each building, two NumPy files, several pickle files that are
used in the compilation of the binary file, and a directory of TIF rasters that represent each of the
132 calculated urban parameters.
Our user guide provides in-depth information on the key concepts of `naturf` with useful background information and explanation. See our [User Guide](https://immm-sfa.github.io/naturf/user_guide.html)

## Workflow
### Contributing to `naturf`

1. Example data is provided in this repository in the `example` directory
2. Setup paths and settings in `scripts/workflow.py`
3. Run `scripts/workflow.py` in a Python 3.8 or greater environment
Whether you find a typo in the documentation, find a bug, or want to develop functionality that you think will make `naturf` more robust, you are welcome to contribute! See our [Contribution Guidelines](https://immm-sfa.github.io/naturf/contributing.html)

## Citation
### API reference

> Allen-Dumas, Melissa Ree, Sweet-Breu, Levi, Seals, Matthew, Berres, Andy, Vernon, Chris R., Rexer, Emily, and USDOE Office of Science. NATURF. Computer software. https://www.osti.gov//servlets/purl/1879628. Vers. 0. USDOE Office of Science (SC), Biological and Environmental Research (BER). Earth and Environmental Systems Science Division. 31 Aug. 2022. Web. doi:10.11578/dc.20220803.4.
The reference guide contains a detailed description of the `naturf` API. The reference describes how the methods work and which parameters can be used. It assumes that you have an understanding of the key concepts. See [API Reference](https://immm-sfa.github.io/naturf/modules.html)

### Developer Setup

# Developer Setup
To get started on development, install the pre-commit hooks to format code.
To get started on development, install the pre-commit hooks to format code. Instructions for installation can be found [here](https://pre-commit.com/). Then install the hooks within the repo:

```bash
$ brew install pre-commit
```
Then install the hooks within the repo:
levisweetbreu marked this conversation as resolved.
Show resolved Hide resolved
```bash
$ cd /PATH/TO/NATURF
$ pre-commit install
```

### Code citation

> Allen-Dumas, Melissa Ree, Sweet-Breu, Levi, Seals, Matthew, Berres, Andy, Vernon, Chris R., Rexer, Emily, and USDOE Office of Science. NATURF. Computer software. https://www.osti.gov//servlets/purl/1879628. Vers. 0. USDOE Office of Science (SC), Biological and Environmental Research (BER). Earth and Environmental Systems Science Division. 31 Aug. 2022. Web. doi:10.11578/dc.20220803.4.

### Sample data citation

> OpenDataDC (2021) Open Data DC. URL https://opendata.dc.gov/datasets
Binary file modified paper/paper.pdf
Binary file not shown.