Skip to content

Commit

Permalink
Merge branch 'production' into content-congestion-pricing
Browse files Browse the repository at this point in the history
  • Loading branch information
mmontesanonyc committed Dec 11, 2024
2 parents 63c9b5d + 4923f41 commit e4ea491
Show file tree
Hide file tree
Showing 15 changed files with 1,525 additions and 624 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ You will need the following things properly installed on your computer.
- [Git](https://git-scm.com/)
- [npm](https://www.npmjs.com/)
- [Hugo](https://gohugo.io/)
- [Grunt](https://gruntjs.com/)

To browse a local version of the site, in your local development environment, start the server by typing `hugo serve --environment development --disableFastRender` into the terminal.
With this repository cloned onto your machine, you can browse a local version of the site. In your local development environment, start the server by typing `hugo serve --environment development --disableFastRender` into the terminal.
- `hugo serve` starts the server - you can then browse the site at http://localhost:1313/EH-dataportal
- `--environment development` specifies that it will serve the site for the development environment, using content from `/config/development/config.toml`
- `--disableFastRender` turns off fast render mode, so more small changes are rapidly served.
Expand All @@ -29,10 +28,10 @@ You can browse the site at [http://localhost:1313/EH-dataportal](http://localhos
To build the source code, simply enter the command `hugo`. This assembles the site’s files, building to `/docs` (this build-to destination can be specified in `config.toml`).

### Start developing
To begin work:
- Branch off of production
- Give the branch a unique name. We name branches: hotfix-[FIXNAME], content-[CONTENTNAME], or feature-[PROJECTNAME].
- Keep branch work focused on discrete, unique tasks
Our internal workflows are to begin work by:
- Branching off of production
- Giving the branch a unique name. We name branches: hotfix-[FIXNAME], content-[CONTENTNAME], or feature-[PROJECTNAME].
- Keeping branch work focused on discrete, unique tasks

After committing, working branches can be merged into `development` for testing then merged into `production` for deployment.

Expand Down Expand Up @@ -76,12 +75,14 @@ Generally, Hugo works by combining content (in markdown, located in `/content`)
- And, a file with another name, `name.md`, will receive `single.html` layout
- A file with `layout: custom` in the frontmatter will get a layout called `custom.html` (all in the corresponding layouts folder).

Templates can include Hugo code (which you can identify by {{ curly brackets }}. When Hugo serves or builds the site, it runs code, inserts content into the HTML, and produces static HTML pages. Any template is actually an assembly of other templates.
Generally, a page constructed with `index.md` will be the final item in that directory structure that Hugo builds; `_index.md` is required for a content item to have child pages.

Templates can include Hugo code (which you can identify by {{ curly brackets }}. When Hugo serves or builds the site, it runs code, inserts content into the HTML, and produces static HTML pages. Any template is actually an assembly of other templates, including partials, which are re-usable template blocks.

### Creating a new data story
- First create the markdown file with the terminal command `hugo new data-stories/TITLE/index.md`.
- Add a banner image to the same folder.
- Copy, paste, and edit the frontmatter from pre-existing data stories. You will need these fields:
- Copy, paste, and edit the frontmatter from pre-existing data stories. You will need these fields (as well as others):
- `title`, `date`, and `draft`
- `seo_title` and `seo_description`
- `categories`: this determines what Key Topics this data story is associated with
Expand All @@ -92,10 +93,8 @@ Templates can include Hugo code (which you can identify by {{ curly brackets }}.
- To publish, set `draft: false`. The data story will be a part of the site when you serve or build it, and it will appear on the related pages if it's been tagged properly via `categories`.

### Key Topics
Key Topics associate different content types by theme, and they also host their own child pages (such as the Air Quality Explorer, or the interactive Heat Vulnerability Index). Each Key Topic page is an `_index.md` file in a titled folder.

To create a new Key Topic:
- Create a markdown file with `hugo new key-topics/TITLE/_index.md`
- Create a markdown file with `hugo new key-topics/TITLE/index.md`
- Copy, paste, and edit the frontmatter from pre-existing Key Topic files. In particular, you will need the following frontmatter fields:
- `keyTopic` (for example, `keyTopic: airquality`). This associates this Key Topic with any other content that has `airquality` as one of its `categories`.
- `layout: single` to give it the correct template
Expand All @@ -115,6 +114,9 @@ To publish a new neighborhood report, you'd need:
---
## Special functions

### Related content
Related content and related data are managed through frontmatter fields; partials that ingest related content or related data are set to default to things that match on Key Topic / `categories`, if those frontmatter fieldsdo not exist.

### Templates and partials
Templates are stored in `themes/dohmh/layouts`, in the folder for their corresponding content area. A template includes:
- The base template, in `layouts/_default/baseof.html`, and components referenced in that file (like `header.html`, `footer.html`, etc)
Expand Down
144 changes: 80 additions & 64 deletions content/data-features/rat-mitigation-zones/311-complaints.csv
Original file line number Diff line number Diff line change
@@ -1,65 +1,81 @@
Date,zoneID,RMZ,ComplaintType,Number
6/30/22,2,Bronx: Grand Concourse,Condition attracting rodents,114
6/30/22,2,Bronx: Grand Concourse,Mouse sighting,80
6/30/22,2,Bronx: Grand Concourse,Rat sighting,509
6/30/22,2,Bronx: Grand Concourse,Signs of rodents,59
6/30/22,1,Brooklyn: Bed Stuy and Bushwick,Condition attracting rodents,178
6/30/22,1,Brooklyn: Bed Stuy and Bushwick,Mouse sighting,50
6/30/22,1,Brooklyn: Bed Stuy and Bushwick,Rat sighting,810
6/30/22,1,Brooklyn: Bed Stuy and Bushwick,Signs of rodents,127
6/30/22,4,Manhattan: Harlem,Condition attracting rodents,168
6/30/22,4,Manhattan: Harlem,Mouse sighting,129
6/30/22,4,Manhattan: Harlem,Rat sighting,1145
6/30/22,4,Manhattan: Harlem,Signs of rodents,501
6/30/22,3,Manhattan: East Village and Chinatown,Condition attracting rodents,70
6/30/22,3,Manhattan: East Village and Chinatown,Mouse sighting,40
6/30/22,3,Manhattan: East Village and Chinatown,Rat sighting,268
6/30/22,3,Manhattan: East Village and Chinatown,Signs of rodents,38
12/31/22,2,Bronx: Grand Concourse,Condition attracting rodents,124
12/31/22,2,Bronx: Grand Concourse,Mouse sighting,102
12/31/22,2,Bronx: Grand Concourse,Rat sighting,481
12/31/22,2,Bronx: Grand Concourse,Signs of rodents,56
12/31/22,1,Brooklyn: Bed Stuy and Bushwick,Condition attracting rodents,159
12/31/22,1,Brooklyn: Bed Stuy and Bushwick,Mouse sighting,32
12/31/22,1,Brooklyn: Bed Stuy and Bushwick,Rat sighting,699
12/31/22,1,Brooklyn: Bed Stuy and Bushwick,Signs of rodents,94
12/31/22,4,Manhattan: Harlem,Condition attracting rodents,202
12/31/22,4,Manhattan: Harlem,Mouse sighting,99
12/31/22,4,Manhattan: Harlem,Rat sighting,1112
12/31/22,4,Manhattan: Harlem,Signs of rodents,575
12/31/22,3,Manhattan: East Village and Chinatown,Condition attracting rodents,61
12/31/22,3,Manhattan: East Village and Chinatown,Mouse sighting,30
12/31/22,3,Manhattan: East Village and Chinatown,Rat sighting,301
12/31/22,3,Manhattan: East Village and Chinatown,Signs of rodents,30
6/30/23,2,Bronx: Grand Concourse,Condition attracting rodents,98
6/30/23,2,Bronx: Grand Concourse,Mouse sighting,79
6/30/23,2,Bronx: Grand Concourse,Rat sighting,335
6/30/23,2,Bronx: Grand Concourse,Signs of rodents,64
6/30/23,1,Brooklyn: Bed Stuy and Bushwick,Condition attracting rodents,242
6/30/23,1,Brooklyn: Bed Stuy and Bushwick,Mouse sighting,38
6/30/23,1,Brooklyn: Bed Stuy and Bushwick,Rat sighting,763
6/30/23,1,Brooklyn: Bed Stuy and Bushwick,Signs of rodents,137
6/30/23,4,Manhattan: Harlem,Condition attracting rodents,249
6/30/23,4,Manhattan: Harlem,Mouse sighting,104
6/30/23,4,Manhattan: Harlem,Rat sighting,921
6/30/23,4,Manhattan: Harlem,Signs of rodents,469
6/30/23,3,Manhattan: East Village and Chinatown,Condition attracting rodents,56
6/30/23,3,Manhattan: East Village and Chinatown,Mouse sighting,16
6/30/23,3,Manhattan: East Village and Chinatown,Rat sighting,217
6/30/23,3,Manhattan: East Village and Chinatown,Signs of rodents,43
12/31/23,2,Bronx: Grand Concourse,Condition attracting rodents,122
12/31/23,2,Bronx: Grand Concourse,Mouse sighting,86
12/31/23,2,Bronx: Grand Concourse,Rat sighting,407
12/31/23,2,Bronx: Grand Concourse,Signs of rodents,68
12/31/23,1,Brooklyn: Bed Stuy and Bushwick,Condition attracting rodents,180
12/31/23,1,Brooklyn: Bed Stuy and Bushwick,Mouse sighting,36
12/31/23,1,Brooklyn: Bed Stuy and Bushwick,Rat sighting,663
12/31/23,1,Brooklyn: Bed Stuy and Bushwick,Signs of rodents,91
12/31/23,4,Manhattan: Harlem,Condition attracting rodents,260
12/31/23,4,Manhattan: Harlem,Mouse sighting,138
12/31/23,4,Manhattan: Harlem,Rat sighting,870
12/31/23,4,Manhattan: Harlem,Signs of rodents,1130
12/31/23,3,Manhattan: East Village and Chinatown,Condition attracting rodents,66
12/31/23,3,Manhattan: East Village and Chinatown,Mouse sighting,28
12/31/23,3,Manhattan: East Village and Chinatown,Rat sighting,262
12/31/23,3,Manhattan: East Village and Chinatown,Signs of rodents,39
6/30/2022,2,Bronx: Grand Concourse,Condition attracting rodents,114
6/30/2022,2,Bronx: Grand Concourse,Mouse sighting,80
6/30/2022,2,Bronx: Grand Concourse,Rat sighting,509
6/30/2022,2,Bronx: Grand Concourse,Signs of rodents,59
6/30/2022,1,Brooklyn: Bed Stuy and Bushwick,Condition attracting rodents,178
6/30/2022,1,Brooklyn: Bed Stuy and Bushwick,Mouse sighting,50
6/30/2022,1,Brooklyn: Bed Stuy and Bushwick,Rat sighting,810
6/30/2022,1,Brooklyn: Bed Stuy and Bushwick,Signs of rodents,127
6/30/2022,4,Manhattan: Harlem,Condition attracting rodents,168
6/30/2022,4,Manhattan: Harlem,Mouse sighting,129
6/30/2022,4,Manhattan: Harlem,Rat sighting,1145
6/30/2022,4,Manhattan: Harlem,Signs of rodents,501
6/30/2022,3,Manhattan: East Village and Chinatown,Condition attracting rodents,70
6/30/2022,3,Manhattan: East Village and Chinatown,Mouse sighting,40
6/30/2022,3,Manhattan: East Village and Chinatown,Rat sighting,268
6/30/2022,3,Manhattan: East Village and Chinatown,Signs of rodents,38
12/31/2022,2,Bronx: Grand Concourse,Condition attracting rodents,124
12/31/2022,2,Bronx: Grand Concourse,Mouse sighting,102
12/31/2022,2,Bronx: Grand Concourse,Rat sighting,481
12/31/2022,2,Bronx: Grand Concourse,Signs of rodents,56
12/31/2022,1,Brooklyn: Bed Stuy and Bushwick,Condition attracting rodents,159
12/31/2022,1,Brooklyn: Bed Stuy and Bushwick,Mouse sighting,32
12/31/2022,1,Brooklyn: Bed Stuy and Bushwick,Rat sighting,699
12/31/2022,1,Brooklyn: Bed Stuy and Bushwick,Signs of rodents,94
12/31/2022,4,Manhattan: Harlem,Condition attracting rodents,202
12/31/2022,4,Manhattan: Harlem,Mouse sighting,99
12/31/2022,4,Manhattan: Harlem,Rat sighting,1112
12/31/2022,4,Manhattan: Harlem,Signs of rodents,575
12/31/2022,3,Manhattan: East Village and Chinatown,Condition attracting rodents,61
12/31/2022,3,Manhattan: East Village and Chinatown,Mouse sighting,30
12/31/2022,3,Manhattan: East Village and Chinatown,Rat sighting,301
12/31/2022,3,Manhattan: East Village and Chinatown,Signs of rodents,30
6/30/2023,2,Bronx: Grand Concourse,Condition attracting rodents,98
6/30/2023,2,Bronx: Grand Concourse,Mouse sighting,79
6/30/2023,2,Bronx: Grand Concourse,Rat sighting,335
6/30/2023,2,Bronx: Grand Concourse,Signs of rodents,64
6/30/2023,1,Brooklyn: Bed Stuy and Bushwick,Condition attracting rodents,242
6/30/2023,1,Brooklyn: Bed Stuy and Bushwick,Mouse sighting,38
6/30/2023,1,Brooklyn: Bed Stuy and Bushwick,Rat sighting,763
6/30/2023,1,Brooklyn: Bed Stuy and Bushwick,Signs of rodents,137
6/30/2023,4,Manhattan: Harlem,Condition attracting rodents,249
6/30/2023,4,Manhattan: Harlem,Mouse sighting,104
6/30/2023,4,Manhattan: Harlem,Rat sighting,921
6/30/2023,4,Manhattan: Harlem,Signs of rodents,469
6/30/2023,3,Manhattan: East Village and Chinatown,Condition attracting rodents,56
6/30/2023,3,Manhattan: East Village and Chinatown,Mouse sighting,16
6/30/2023,3,Manhattan: East Village and Chinatown,Rat sighting,217
6/30/2023,3,Manhattan: East Village and Chinatown,Signs of rodents,43
12/31/2023,2,Bronx: Grand Concourse,Condition attracting rodents,122
12/31/2023,2,Bronx: Grand Concourse,Mouse sighting,86
12/31/2023,2,Bronx: Grand Concourse,Rat sighting,407
12/31/2023,2,Bronx: Grand Concourse,Signs of rodents,68
12/31/2023,1,Brooklyn: Bed Stuy and Bushwick,Condition attracting rodents,180
12/31/2023,1,Brooklyn: Bed Stuy and Bushwick,Mouse sighting,36
12/31/2023,1,Brooklyn: Bed Stuy and Bushwick,Rat sighting,663
12/31/2023,1,Brooklyn: Bed Stuy and Bushwick,Signs of rodents,91
12/31/2023,4,Manhattan: Harlem,Condition attracting rodents,260
12/31/2023,4,Manhattan: Harlem,Mouse sighting,138
12/31/2023,4,Manhattan: Harlem,Rat sighting,870
12/31/2023,4,Manhattan: Harlem,Signs of rodents,1130
12/31/2023,3,Manhattan: East Village and Chinatown,Condition attracting rodents,66
12/31/2023,3,Manhattan: East Village and Chinatown,Mouse sighting,28
12/31/2023,3,Manhattan: East Village and Chinatown,Rat sighting,262
12/31/2023,3,Manhattan: East Village and Chinatown,Signs of rodents,39
6/30/2024,2,Bronx: Grand Concourse,Condition attracting rodents,102
6/30/2024,2,Bronx: Grand Concourse,Mouse sighting,48
6/30/2024,2,Bronx: Grand Concourse,Rat sighting,435
6/30/2024,2,Bronx: Grand Concourse,Signs of rodents,60
6/30/2024,1,Brooklyn: Bed Stuy and Bushwick,Condition attracting rodents,175
6/30/2024,1,Brooklyn: Bed Stuy and Bushwick,Mouse sighting,18
6/30/2024,1,Brooklyn: Bed Stuy and Bushwick,Rat sighting,651
6/30/2024,1,Brooklyn: Bed Stuy and Bushwick,Signs of rodents,102
6/30/2024,4,Manhattan: Harlem,Condition attracting rodents,292
6/30/2024,4,Manhattan: Harlem,Mouse sighting,66
6/30/2024,4,Manhattan: Harlem,Rat sighting,849
6/30/2024,4,Manhattan: Harlem,Signs of rodents,1205
6/30/2024,3,Manhattan: East Village and Chinatown,Condition attracting rodents,60
6/30/2024,3,Manhattan: East Village and Chinatown,Mouse sighting,14
6/30/2024,3,Manhattan: East Village and Chinatown,Rat sighting,189
6/30/2024,3,Manhattan: East Village and Chinatown,Signs of rodents,39
Loading

0 comments on commit e4ea491

Please sign in to comment.