Skip to content

CodeWithAloha/Hawaii-Zoning-Atlas

 
 

Repository files navigation

🏖️ 🌋 🌐

Interactive map showing how outdated zoning laws make it hard to build diverse, affordable housing in Hawaii

Developed by Code with Aloha

Note: This project is mainly in maintenance mode, and we are not actively developing new features. We are still maintaining the project and fixing bugs. If you are interested in contributing into issues similar to this project (doing things such as statistical analysis and data visualization), contact Trey Gordner at hawaiizoningatlas@gmail.com.

Philosophy

This interactive map shows how outdated zoning laws make it hard to build diverse, affordable housing, and the provided Jupyter Notebooks are meant to help gain insights into the data (statistical analysis, data visualization, etc).

Zoning laws, adopted by thousands of local governments across the country, dictate much of what can be built in the United States. We need to find better ways of helping people understand what zoning codes say, because they have a tremendous impact on our economy, on the environment, and on our society. A zoning atlas that enables users to visualize the prevalence and nature of regulatory constraints, particularly on housing, can be an important tool to achieve that goal.

Partners, Supporters, and Sponsors

Our data, and many of the other states is also live on the National Zoning Atlas's Atlas.

Resources

News Articles

New Developers Start Here

The code can be seen live at hawaiizoningatlas.com

The process of moving the data from the starting point (the datasheet) to the final destination (the website) involves a series of processes that we are hoping to automate.

Data Pipeline

The goal of the data pipeline is to help decrease the friction between getting data from the spreadsheet to the final form hosted by the website.

In the HZA Research Guide The user can find the starting point for the map which is the datasheet.

This datasheet is manually populated by people going through the various zoning laws (The links for the zoning laws are found in the repo's research guide.) and filling out cells according to the guidelines laid out in How to Make a Zoning Atlas.

After the data sheet is populated, it is then exported to a csv where the following steps need to occur:

  • The county tabs are combined together
  • Validation is run on the data
  • The final csv is given the name hawaii-zoning-data.csv

The hawaii-zoning-data.csv file should then be placed into the data-pipeline folder.

In the data-pipeline folder there is a "gis" folder that holds the output of processing various shape files. These shape files come from the maps given in the HZA Research Guide. The method of processing the shape files is outlined in How to Make a Zoning Atlas.

Data Processing

  1. Open the shape file in the GIS software of your choice, QGIS has been used for this.

  2. Verify the following feature columns are added in addition to the existing columns and match the spreadsheet values

    • Jurisdiction
    • State
    • FullDistrictName

    Note: Do not change the geometry columns

  3. Export the result into a gpkg file (This will get read in by the CombineJurisdictions notebook)

Once the data has been aggregated and in the correct form, it is processed by the CombineJurisdictions Jupyter Notebook. The notebook exports the final.geojson file that is placed in the repository's "data" directory. This is the data the populates the website.

Automation Goals

GitHub Actions is the tool we are using to automate the various parts of the data processing pipeline.

Different GitHub actions will perform the following tasks:

  • Pull the data from the datasheet into a csv that combines the counties
  • Run validation to ensure that the data is correct (prevent mistypings, blank lines, etc)
  • Commit the validated and changed files to the repository
sequenceDiagram
    participant Actions
    participant Spreadsheet

    Actions->>Spreadsheet: Pull data for all the counties (Maui, Oahu, Big Island, Kauai)

    loop Validation
        Actions->>Actions: Validate the pulled data against a schema (prevent mistypings, blank lines, ...etc)
    end

    loop Commit
        Actions->>Actions: Commit the validated and changed files to this repository
    end

Once the data is ready for processing, another set of actions will perform the following tasks:

  • Run the data through the CombineJurisdiction notebook
  • Minimize the final.geojson file
  • Commit the final.geojson file to the repository
    • The name of the final.geojson should include a timestamp and a reference to the original data used to generate it. This will allow us to rollback to different versions if needed.
sequenceDiagram
    participant Actions
    participant Jupyter Notebook

    Actions->>Jupyter Notebook: Execute the Jupyter Notebook with all the prerequisite files (`gis/`, `csv/`, ...etc) 

    Jupyter Notebook->>Actions: Return a `final.geojson` to be served with the map

    loop Commit
        Actions->>Actions: Commit the generated `final.geojson` to the repository
    end

About

Interactive map showing how outdated zoning laws make it hard to build diverse, affordable housing in Hawaii.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages

  • JavaScript 41.6%
  • Jupyter Notebook 30.6%
  • HTML 17.5%
  • Python 8.1%
  • CSS 2.0%
  • Dockerfile 0.2%