UCDavisLibrary / ava

American Viticultural Areas
https://ucdavislibrary.github.io/ava/
Creative Commons Zero v1.0 Universal
62 stars 56 forks source link

Fix cfr_revision_history for multiple files #873

Closed kurtishouser closed 2 years ago

kurtishouser commented 2 years ago

Some notes:

The revision history has a very specific and consistent format but the TTB occasionally makes mistakes. It's mostly just typos such as forgetting a period, comma, space, etc. It's probably best to not just copy what they provided. So if you see something wrong/missing I would go ahead and fix it. They sometimes catch their errors and correct them when updating the eCFR. (or I contact them with the errors).

To account for these upstream TTB typos the current R code strips all the punctuation and spacing before making the comparison. I would avoid doing this. Some of the errors that I corrected with this PR were flagged by my script because I don't alter any of the data first.

CFR update available for 9.270 Alisos Canyon -> ./avas/alisos_canyon.geojson
  CURRENT: [T.D TTB 1611, 85 FR 52273, Aug. 25, 2020]
  UPDATED: [T.D. TTB 1611, 85 FR 52273, Aug. 25, 2020]
CFR update available for 9.273 Tehachapi Mountains -> ./avas/tehachapi_mountains.geojson
  CURRENT: [T.D. TTB-164, 85 FR 73619, Nov, 19, 2020]
  UPDATED: [T.D. TTB-164, 85 FR 73619, Nov. 19, 2020]
CFR update available for 9.283 West Sonoma Coast -> ./avas/west_sonoma_coast.geojson
  CURRENT: [T.D TTB-179, 87 FR 31180, May 23, 2022]
  UPDATED: [T.D. TTB-179, 87 FR 31180, May 23, 2022]

Walla Walla Valley is the only remaining false positive on the list. I've contacted them and expect that it will be fixed in the near future.

Fetching latest eCFR XML document from govinfo.gov (large file!)...
CFR update available for 9.59 Arroyo Seco -> ./avas/arroyo_seco.geojson
  CURRENT: [T.D. ATF-131, 48 FR 16246, Apr. 15, 1983, as amended by T.D. TTB-49, 71 FR 34527, June 15, 2006; T.D. TTB-153, 83 FR 64276, Dec. 14, 2018]
  UPDATED: [T.D. ATF-131, 48 FR 16246, Apr. 15, 1983, as amended by T.D. TTB-49, 71 FR 34527, June 15, 2006; T.D. TTB-153, 83 FR 64276, Dec. 14, 2018; T.D. TTB-172, 86 FR 47379, Aug. 25, 2021; 86 FR 52825, Sept. 23, 2021]
CFR update available for 9.95 Clarksburg -> ./avas/clarksburg.geojson
  CURRENT: [T.D. ATF-166, 49 FR 2759, Jan. 23, 1984]
  UPDATED: [T.D. ATF-166, 49 FR 2759, Jan. 23, 1984, as amended by T.D. TTB-178, 87 FR 13159, Mar. 9, 2022]
CFR update available for 9.99 Clear Lake -> ./avas/clear_lake.geojson
  CURRENT: [T.D. ATF-174, 49 FR 19468, May 8, 1984]
  UPDATED: [T.D. ATF-174, 49 FR 19468, May 8, 1984, as amended by T.D. TTB-182, 87 FR 33645, June 3, 2022]
CFR update available for 9.139 Santa Lucia Highlands -> ./avas/santa_lucia_highlands.geojson
  CURRENT: [T.D. ATF-321, 57 FR 20764, May 15, 1992, as amended by T.D. TTB-49, 71 FR 34527, June 15, 2006]
  UPDATED: [T.D. ATF-321, 57 FR 20764, May 15, 1992, as amended by T.D. TTB-49, 71 FR 34527, June 15, 2006; T.D. TTB-172, 86 FR 47379, Aug. 25, 2021]
CFR update available for 9.91 Walla Walla Valley -> ./avas/walla_walla_valley.geojson
  CURRENT: [T.D. ATF-165, 49 FR 4376, Feb. 6, 1984, as amended by T.D. ATF-249, 52 FR 5960, Feb. 27, 1987; T.D. ATF-441, 66 FR 11542, Feb. 26, 2001]
  UPDATED: [T.D. ATF-441, 66 FR 11542, Feb. 26, 2001]