diff --git a/.gitignore b/.gitignore index 04d2954..ebb86ed 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ target/ layers/tmp_* layers/input layers/output -all_schemes_geojson_prep/data __pycache__ !layers/input/README.md stats19/input diff --git a/all_schemes_geojson_prep/README.md b/all_schemes_geojson_prep/README.md deleted file mode 100644 index a4e67f2..0000000 --- a/all_schemes_geojson_prep/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This takes a version of the all_schemes_data.geojson file which contains a list of scheme objects that contain information about schemes which have already bid for ATF funding. -It converts these objects into objects that can contain either a BrowseScheme or a PipelineScheme object allowing multi-scheme geojson files to be used more generally across the app, and particularly in scheme Sketcher. -You will need to download all_schemes_data.geojson from ATE sharepoint and put it in `data/input` \ No newline at end of file diff --git a/all_schemes_geojson_prep/index.ts b/all_schemes_geojson_prep/index.ts deleted file mode 100644 index 60c375f..0000000 --- a/all_schemes_geojson_prep/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -const { readFileSync, writeFileSync } = require("fs"); - -const allSchemes = JSON.parse(readFileSync("./data/input/all_scheme_data.geojson")); - -const resultingSchemeDictionary = {}; -Object.keys(allSchemes.schemes).forEach((browseSchemeKey) => { - const scheme = allSchemes.schemes[browseSchemeKey]; - const result = { - scheme_name: browseSchemeKey, - scheme_reference: browseSchemeKey, - browse: scheme - } - resultingSchemeDictionary[browseSchemeKey] = result; -}); - -allSchemes.schemes = resultingSchemeDictionary; -const outputPath = "./data/output/all_scheme_data.geojson"; - -try { - writeFileSync(outputPath, JSON.stringify(allSchemes)); - console.log(`Data successfully output to ${outputPath}`) - -} catch (error) { - console.log(`Error writing new all schemes geojson: ${error}`) -} \ No newline at end of file diff --git a/all_schemes_geojson_prep/package.json b/all_schemes_geojson_prep/package.json deleted file mode 100644 index 4893a3a..0000000 --- a/all_schemes_geojson_prep/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "all_schemes_geojson_prep", - "version": "1.0.0", - "description": "", - "main": "index.ts", - "scripts": { - "transform": "node index.ts", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "Peter York", - "license": "ISC" -}