diff --git a/makerules.mk b/makerules.mk index ca0d2d5..15674fb 100644 --- a/makerules.mk +++ b/makerules.mk @@ -144,6 +144,17 @@ $(CACHE_DIR)organisation.csv: @mkdir -p $(CACHE_DIR) curl -qfs "https://raw.githubusercontent.com/digital-land/organisation-dataset/main/collection/organisation.csv" > $(CACHE_DIR)organisation.csv + +# download organisation-lpa relationships +$(CACHE_DIR)local-authority.csv: + @mkdir -p $(CACHE_DIR) + curl -qfs "https://raw.githubusercontent.com/digital-land/organisation-collection/main/data/local-authority.csv" > $(CACHE_DIR)local-authority.csv + +# download lpa geometry +$(CACHE_DIR)lpa-geometry.csv: + @mkdir -p $(CACHE_DIR) + curl -qfs "https://datasette.planning.data.gov.uk/entity.csv?sql=select+geometry%2C+reference+from+entity+where+%22dataset%22+%3D+%3Ap0+order+by+entity+limit+101&p0=local-planning-authority&_size=max" > $(CACHE_DIR)lpa-geometry.csv + init:: config config::; diff --git a/pipeline.mk b/pipeline.mk index d0f0de5..9cfc7fb 100644 --- a/pipeline.mk +++ b/pipeline.mk @@ -139,6 +139,11 @@ clean:: # local copy of the organisation dataset init:: $(CACHE_DIR)organisation.csv +# local copy of local-authority for organisation-lpa relationship +init:: $(CACHE_DIR)local-authority.csv + +init:: $(CACHE_DIR)lpa-geometry.csv + makerules:: curl -qfsL '$(SOURCE_URL)/makerules/main/pipeline.mk' > makerules/pipeline.mk