Skip to content

Commit

Permalink
update developer.md
Browse files Browse the repository at this point in the history
  • Loading branch information
weiqi-tori committed Jul 30, 2024
1 parent 14d51ad commit 77037d6
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions docs/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The `city_metrix` library allows users of geospatial data to collect and apply z
It provides two main functionalities:
1. Extracting geospatial `layers` based on specific areas of interests (defined as geodataframe)' These data layers are collected from any cloud source (Google Earth Engine, AWS S3 public buckets, Public APIs). Two formats of data layers are handled in `city_metrix`: Rasters and vectors.
- Rasters data are collected and transformed into _arrays_ using `xarray` (GEE images collections are converted also into `arrays` using `xee`).
- Vectors adata are stored as `GeoDataFrame`.
- Vectors data are stored as `GeoDataFrame`.
2. Measuring `indicators` using the extracted `layers` by implementing zonal statistics operations

The main package source code is located in the `city_metrix` directory.
Expand Down Expand Up @@ -81,9 +81,11 @@ Hopefully we already have the layers you need in `city_metrix/layers/` and you c

5. Add a test to [tests/layers.py](../tests/layers.py) to ensure the new layer is working as expected.

6. Add a section to the get layers.ipynb notebook to demonstrate how to use the new layer.
6. Add new dependencies to [setup.py](../setup.py) and [environment.yml](../environment.yml).

7. Create a PR to merge the new layer into the main branch with these in the PR description:
7. Add a section to the get layers.ipynb notebook to demonstrate how to use the new layer.

8. Create a PR to merge the new layer into the main branch with these in the PR description:
- Link to Jira ticket (if any)
- A brief description of the new layer
- A link to the Airtable record for the new layer
Expand All @@ -101,6 +103,16 @@ Once you have all the data layers you need as inputs, here is the process to cre

Define a function for new indicator with the input of the calculation zones as a `GeoDataFrame` and output of the calculated indicators as a `GeoSeries`.

3. Add a test to [tests/metrics.py](../tests/metrics.py) to ensure the new indicator is working as expected.

4. Add new dependencies to [setup.py](../setup.py) and [environment.yml](../environment.yml).

5. Create a PR to merge the new indicator into the main branch with these in the PR description:
- Link to Jira ticket (if any)
- A brief description of the new indicator
- A link to the Airtable record for the new indicator
- Explain how to test the new indicator


## Adding Cities
You can always have users just provide their own boudary files, but if you are working on a project where you want to provide access to a common set of city boundaries, the best option is to add them to the API
Expand Down

0 comments on commit 77037d6

Please sign in to comment.