Skip to content

Commit 697a680

Browse files
committed
Version 1.3.0: Updates for 2025
1 parent c024352 commit 697a680

File tree

8 files changed

+35
-29
lines changed

8 files changed

+35
-29
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: njmunicipalities
22
Type: Package
33
Title: NJ Municipalities data package
4-
Version: 1.2.0
4+
Version: 1.3.0
55
Authors@R:
66
person("Tor", "Gunston", , "tor.gunston@protonmail.com", role = c("aut", "cre"))
77
Description: NJ Municipalities, 2000-2024.

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# njmunicipalities 1.3.0
2+
3+
* Updating for 2024:
4+
* No changes to GEOIDs or names.
5+
* Max year is now 2024.
6+
17
# njmunicipalities 1.2.0
28

39
* Updating for 2024:

R/get_municipalities.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MIN_YEAR <- 2000
2-
MAX_YEAR <- 2024
2+
MAX_YEAR <- 2025
33
YEARS <- MIN_YEAR:MAX_YEAR
44

55
#' Internal function get_municipalities_

R/sysdata.rda

0 Bytes
Binary file not shown.

README.Rmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ knitr::opts_chunk$set(
2020
<!-- badges: end -->
2121

2222
This is a data package for R that contains every county
23-
and municipality in New Jersey, from 2000 to 2024.
23+
and municipality in New Jersey, from 2000 to 2025.
2424

2525
## Installation
2626

@@ -31,9 +31,9 @@ You can install the development version of njmunicipalities from [GitHub](https:
3131
devtools::install_github("tor-gu/njmunicipalities")
3232
```
3333

34-
## Changes in NJ municipalites, 2000-2024
34+
## Changes in NJ municipalites, 2000-2025
3535

36-
Over the period 2000-2024, there have been several changes to
36+
Over the period 2000-2025, there have been several changes to
3737
the list of municipalities in New Jersey:
3838

3939
* In 2005, South Belmar became Lake Como. The US Census assigned
@@ -46,19 +46,19 @@ a new GEOID to Lake Como.
4646
* In 2022, Pine Valley was absorbed by Pine Hill.
4747

4848
This package will return municipality tables for any year from 2000 to
49-
2024, and provides tools for dealing the changes from year to year.
49+
2025, and provides tools for dealing the changes from year to year.
5050

5151
## Examples
5252
#### Get a table of municipalities
5353
Function `get_municipalities` returns a table of municipalities for a
54-
given year. The default is year 2024.
54+
given year. The default is year 2025.
5555
```{r}
5656
library(njmunicipalities)
5757
58-
# Municipality table for 2024
58+
# Municipality table for 2025
5959
get_municipalities() |> head(n=5)
6060
```
61-
If the year is specified (from 2000 to 2024), the table will reflect the names and US Census GEOIDs in effect for that year. Here is the list for 2007.
61+
If the year is specified (from 2000 to 2025), the table will reflect the names and US Census GEOIDs in effect for that year. Here is the list for 2007.
6262
```{r}
6363
# Municipality list for 2007
6464
get_municipalities(2007) |> head(n=5)
@@ -158,7 +158,7 @@ c(PINE_VALLEY_BORO_GEOID, PINE_HILL_BORO_GEOID)
158158

159159
#### County list
160160
For convenience, this package also includes a table of counties and
161-
their GEOIDS. There have been no changes to New Jersey counties from 2000 to 2021.
161+
their GEOIDS. There have been no changes to New Jersey counties from 2000 to 2025.
162162
```{r}
163163
# County list
164164
counties |> head(n=5)

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- badges: end -->
1010

1111
This is a data package for R that contains every county and municipality
12-
in New Jersey, from 2000 to 2024.
12+
in New Jersey, from 2000 to 2025.
1313

1414
## Installation
1515

@@ -21,9 +21,9 @@ You can install the development version of njmunicipalities from
2121
devtools::install_github("tor-gu/njmunicipalities")
2222
```
2323

24-
## Changes in NJ municipalites, 2000-2024
24+
## Changes in NJ municipalites, 2000-2025
2525

26-
Over the period 2000-2024, there have been several changes to the list
26+
Over the period 2000-2025, there have been several changes to the list
2727
of municipalities in New Jersey:
2828

2929
- In 2005, South Belmar became Lake Como. The US Census assigned a new
@@ -43,19 +43,19 @@ of municipalities in New Jersey:
4343
- In 2022, Pine Valley was absorbed by Pine Hill.
4444

4545
This package will return municipality tables for any year from 2000 to
46-
2024, and provides tools for dealing the changes from year to year.
46+
2025, and provides tools for dealing the changes from year to year.
4747

4848
## Examples
4949

5050
#### Get a table of municipalities
5151

5252
Function `get_municipalities` returns a table of municipalities for a
53-
given year. The default is year 2024.
53+
given year. The default is year 2025.
5454

5555
``` r
5656
library(njmunicipalities)
5757

58-
# Municipality table for 2024
58+
# Municipality table for 2025
5959
get_municipalities() |> head(n=5)
6060
#> # A tibble: 5 × 3
6161
#> GEOID county municipality
@@ -67,7 +67,7 @@ get_municipalities() |> head(n=5)
6767
#> 5 3400108710 Atlantic County Buena Vista township
6868
```
6969

70-
If the year is specified (from 2000 to 2024), the table will reflect the
70+
If the year is specified (from 2000 to 2025), the table will reflect the
7171
names and US Census GEOIDs in effect for that year. Here is the list for
7272
2007.
7373

@@ -270,7 +270,7 @@ c(PINE_VALLEY_BORO_GEOID, PINE_HILL_BORO_GEOID)
270270

271271
For convenience, this package also includes a table of counties and
272272
their GEOIDS. There have been no changes to New Jersey counties from
273-
2000 to 2021.
273+
2000 to 2025.
274274

275275
``` r
276276
# County list

data-raw/municipalities.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ gz_2000 <- readr::read_fwf(gz_2000_file,
1919
municipalities <- gz_2000 |>
2020
dplyr::mutate(GEOID_Y2K = GEOID,
2121
first_year = 2000,
22-
final_year = 2024) |>
22+
final_year = 2025) |>
2323
dplyr::relocate(GEOID_Y2K)
2424

2525
municipality_updates <- tibble::tribble(
@@ -36,12 +36,12 @@ municipality_updates <- tibble::tribble(
3636

3737
municipality_inserts <- tibble::tribble(
3838
~GEOID_Y2K, ~GEOID, ~county, ~municipality, ~first_year,~final_year,
39-
"3401309220","3401309250","Essex County", "Caldwell borough", 2010, 2024,
40-
"3402177210","3402163850","Mercer County", "Robbinsville township",2008, 2024,
41-
"3402568670","3402537560","Monmouth County","Lake Como borough", 2005, 2024,
42-
"3402918130","3402973125","Ocean County", "Toms River township", 2007, 2024,
43-
"3403179820","3403182423","Passaic County", "Woodland Park borough",2009, 2024,
44-
"3402160900","3402160900","Mercer County", "Princeton", 2013, 2024,
39+
"3401309220","3401309250","Essex County", "Caldwell borough", 2010, 2025,
40+
"3402177210","3402163850","Mercer County", "Robbinsville township",2008, 2025,
41+
"3402568670","3402537560","Monmouth County","Lake Como borough", 2005, 2025,
42+
"3402918130","3402973125","Ocean County", "Toms River township", 2007, 2025,
43+
"3403179820","3403182423","Passaic County", "Woodland Park borough",2009, 2025,
44+
"3402160900","3402160900","Mercer County", "Princeton", 2013, 2025,
4545
)
4646

4747
municipalities <- municipalities |>

tests/testthat/test-get_municipalities.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
test_that("get_municipalities handles bad year", {
22
expect_error(get_municipalities(1999))
3-
expect_error(get_municipalities(2025))
3+
expect_error(get_municipalities(2026))
44
})
55

66
test_that("get_municipalities handles bad reference year", {
77
expect_error(get_municipalities(2010, 1999))
8-
expect_error(get_municipalities(2010, 2025))
8+
expect_error(get_municipalities(2010, 2026))
99
})
1010

1111

@@ -145,12 +145,12 @@ test_that("get_municipalities handles geoid_ref_as_ref_column", {
145145

146146
test_that("get_geoid_cross_references handles bad years", {
147147
expect_error(get_geoid_cross_references(2000, 1999:2021))
148-
expect_error(get_geoid_cross_references(2000, 2000:2025))
148+
expect_error(get_geoid_cross_references(2000, 2000:2026))
149149
})
150150

151151
test_that("get_geoid_cross_references handles bad reference year", {
152152
expect_error(get_geoid_cross_references(1999, 2010))
153-
expect_error(get_geoid_cross_references(2025, 2010))
153+
expect_error(get_geoid_cross_references(2026, 2010))
154154
})
155155

156156

0 commit comments

Comments
 (0)