Skip to content

Commit 65a0b02

Browse files
committed
Update data for MA DOER release 5-15-2024
retrieved from https://www.mass.gov/doc/building-energy-code-adoption-by-municipality/download Also pushed out enddate for timeline on map.
1 parent 0e1d37a commit 65a0b02

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

code_dates.dat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,15 @@ Montgomery 819 X
199199
Mount Washington 160 X
200200
Nahant 3,334 7/1/2018
201201
Nantucket 14,255 9/1/2019
202-
Natick 37,006 1/1/2011 1/1/2025
202+
Natick 37,006 1/1/2011 7/1/2025
203203
Needham 32,091 7/1/2019 7/1/2024
204204
New Ashford 250 X
205205
New Bedford 101,079 7/1/2017
206206
New Braintree 996 1/1/2018
207207
New Marlborough 1,528 X
208208
New Salem 983 7/1/2011
209209
Newbury 6,716 1/1/2021
210-
Newburyport 18,289 7/1/2011
210+
Newburyport 18,289 7/1/2011 7/1/2025
211211
Newton 88,923 7/1/2010 1/1/2024
212212
Norfolk 11,662 1/1/2018
213213
North Adams 12,961 7/1/2011
@@ -316,7 +316,7 @@ Warren 4,975 1/1/2017
316316
Warwick 780 7/7/2015
317317
Washington 494 7/1/2018
318318
Watertown 35,329 7/1/2011 7/1/2023
319-
Wayland 13,943 7/1/2011
319+
Wayland 13,943 7/1/2011 1/1/2025
320320
Webster 17,776 1/1/2018
321321
Wellesley 29,550 1/1/2012 1/1/2024
322322
Wellfleet 3,566 1/1/2015 1/1/2024

docs/MA_energy_codes_town.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/MA_energy_codes_town_future.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

make_maps.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
# Downloaded data is passed to https://mapshaper.org/
1010
# and simplified to > 5 % of the original file size, fixing any line crossings.
1111
# The resulting data is saved as MA_towns.json into this repository.
12+
13+
# Date a which the timeline ends. Needs to be later than the last date in the data
14+
# but it's eaiser to update here by hand than to search through the data to find it.
15+
enddate = "01/02/2026"
16+
1217
with open('MA_towns.json') as f:
1318
data = json.load(f)
1419

@@ -77,13 +82,22 @@ def USdate_to_ISO(datestr, subtractdays=0):
7782
# Special case for towns that left the stretch code program
7883
if name == 'Essex':
7984
feature['properties']['stretchcode'] = '1/1/2015 - 5/8/2023'
80-
dates = [('01/01/2009', 0), ('01/01/2015', 1), ('05/08/2023', -1), ('01/02/2025', None)]
85+
dates = [
86+
("01/01/2009", 0),
87+
("01/01/2015", 1),
88+
("05/08/2023", -1),
89+
(enddate, None),
90+
]
8191
elif name == 'Rochester':
8292
feature['properties']['stretchcode'] = '1/1/2019 - 5/22/2023'
83-
dates = [('01/01/2009', 0), ('01/01/2019', 1), ('05/22/2023', -1), ('01/02/2025', None)]
93+
dates = [
94+
("01/01/2009", 0),
95+
("01/01/2019", 1),
96+
("05/22/2023", -1),
97+
(enddate, None),
98+
]
8499
else:
85-
86-
dates = [('01/01/2009', 0), ('01/02/2025', None)]
100+
dates = [("01/01/2009", 0), (enddate, None)]
87101
if name in stretch_code:
88102
dates.append((stretch_code.get(name), 1))
89103
if name in specialized_opt_in:

0 commit comments

Comments
 (0)