Skip to content

NYCPlanning/ae-cd-needs-statements-generator

Repository files navigation

Introduction

This is an app designed to create the annual Community District Needs statements. They were previously generated using the CD Needs platform, a PHP/Symfony application. The functionality of that platform has been broken up into ae-cdneeds-alchemer for collecting the form submissions, and this tool for creating the statements.

In the template files, where appropriate, there are comments indicating which file(s) in the old repo the new files are based upon, and there may be commented-out snippets of that code at the bottom of some template files.

Getting Started

Install the node modules

npm install

First, run the development server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

This is a Next.js project bootstrapped with create-next-app.

Exporting the data

You will need to export the data for both the Needs Statements and the Budget Request forms. To do so, in Alchemer select the corresponding survey, and go to Results -> Exports -> CSV / Excel -> Download All Data Now!

Editing the CSVs

  • Use variablenamelookups.xlsx to replace the variable names in the csvs
    • Any blanks should be removed
  • Add in boro, boardNumber, and agencyAcronym columns
  • In the budget requests, remove items where:
    • Status is not Complete
    • isDeleted is TRUE

When done, convert them to json and put them in /public/jsondata

Errors

Console error "Warning: Expected server HTML to contain a matching <i> in <a>." is related to implementing FontAwesome with Next.js that doesn't need to be fixed. I assume that is what is causing the other issues which are about hydration.

Usage

Open the site in Safari (the links in the Table of Contents do not work if exporting from other browsers). If there is a toast notification in the bottom left about errors, close it before hitting print or there will be shading at the top of each page. Select the community district from the drop-down and hit the "Print" button at the bottom of the page. At the bottom of the print menu, make sure PDF is selected, and then hit print.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published