diff --git a/README.md b/README.md index 34f9e16..9a1ef18 100644 --- a/README.md +++ b/README.md @@ -20,18 +20,32 @@ If you run the server running **geocsv**, the simplest way to add CSV files is s https://geocsv.example.com/ -and the file you want to view is `myfile.csv`, then you would specify this as +and the file you want to view is `myfile.csv`, then you would specify this as the value of `file` in the query part of the URL. https://geocsv.example.com/?file=myfile.csv +### Loading CSV file onto another public server + +If you're not running the **geocsv** server yourself, you can upload the CSV to another server which is accessible by the **geocsv** server. You can then map data from the CSV file by specifying the URL of the file as the value of `uri` in the query part of the URL: + + https://geocsv.example.com/?uri=http://my.other.server/path/to/myfile.csv + ### Using a Google spreadsheet -If you use [Google Sheets](https://www.google.co.uk/sheets/about/), then every sheet has a 'document id', a long string of characters which uniquely identifies that sheet. Suppose your Google spreadsheet has a document id of `abcdefghijklmnopqrstuvwxyz-12345`, then you could pull data from this spreadsheet by specifying: +If you use [Google Sheets](https://www.google.co.uk/sheets/about/), then every sheet has a 'document id', a long string of characters which uniquely identifies that sheet. Suppose your Google spreadsheet has a document id of `abcdefghijklmnopqrstuvwxyz-12345`, then you could pull data from this spreadsheet by specifying this as the value of `docid` in the query part of the URL: https://geocsv.example.com/?docid=abcdefghijklmnopqrstuvwxyz-12345 The spreadsheet **must** be publicly readable. +### Precedence + +Nothing, of course, stops you from specifying multiple arguments in the query part of the URL, but only one will be used. The precedence is in this order: + +1. `docid` is considered first, and overrides anything else; +2. `uri` is considered next, and overrides `file`; +3. the value of `file` is considered only if neither of the other two are present. + ## Not yet working GeoCSV is at an early stage of development, and some features are not yet working. diff --git a/project.clj b/project.clj index fa8b919..b4d1cc9 100644 --- a/project.clj +++ b/project.clj @@ -32,6 +32,7 @@ [org.clojure/tools.cli "0.4.2"] [org.clojure/tools.logging "0.5.0"] [org.webjars.npm/bulma "0.8.0"] + [org.webjars.npm/leaflet "1.6.0"] [org.webjars.npm/material-icons "0.3.1"] [org.webjars/webjars-locator "0.38"] [re-frame "0.10.9"] @@ -43,10 +44,6 @@ [selmer "1.12.18"]] :min-lein-version "2.0.0" - :npm {:dependencies [[bulma "0.8.0"] - [leaflet "1.3.1"] - [material-design-icons "3.0.1"]] - :root "resources/public/js/lib/node_modules"} :source-paths ["src/clj" "src/cljs" "src/cljc"] :test-paths ["test/clj"] @@ -56,7 +53,6 @@ :plugins [[lein-cljsbuild "1.1.7"] [lein-codox "0.10.7"] - [lein-npm "0.6.2"] [lein-release "1.0.5"]] :clean-targets ^{:protect false} diff --git a/resources/docs/docs.md b/resources/docs/docs.md index 34f9e16..9a1ef18 100644 --- a/resources/docs/docs.md +++ b/resources/docs/docs.md @@ -20,18 +20,32 @@ If you run the server running **geocsv**, the simplest way to add CSV files is s https://geocsv.example.com/ -and the file you want to view is `myfile.csv`, then you would specify this as +and the file you want to view is `myfile.csv`, then you would specify this as the value of `file` in the query part of the URL. https://geocsv.example.com/?file=myfile.csv +### Loading CSV file onto another public server + +If you're not running the **geocsv** server yourself, you can upload the CSV to another server which is accessible by the **geocsv** server. You can then map data from the CSV file by specifying the URL of the file as the value of `uri` in the query part of the URL: + + https://geocsv.example.com/?uri=http://my.other.server/path/to/myfile.csv + ### Using a Google spreadsheet -If you use [Google Sheets](https://www.google.co.uk/sheets/about/), then every sheet has a 'document id', a long string of characters which uniquely identifies that sheet. Suppose your Google spreadsheet has a document id of `abcdefghijklmnopqrstuvwxyz-12345`, then you could pull data from this spreadsheet by specifying: +If you use [Google Sheets](https://www.google.co.uk/sheets/about/), then every sheet has a 'document id', a long string of characters which uniquely identifies that sheet. Suppose your Google spreadsheet has a document id of `abcdefghijklmnopqrstuvwxyz-12345`, then you could pull data from this spreadsheet by specifying this as the value of `docid` in the query part of the URL: https://geocsv.example.com/?docid=abcdefghijklmnopqrstuvwxyz-12345 The spreadsheet **must** be publicly readable. +### Precedence + +Nothing, of course, stops you from specifying multiple arguments in the query part of the URL, but only one will be used. The precedence is in this order: + +1. `docid` is considered first, and overrides anything else; +2. `uri` is considered next, and overrides `file`; +3. the value of `file` is considered only if neither of the other two are present. + ## Not yet working GeoCSV is at an early stage of development, and some features are not yet working. diff --git a/resources/html/error.html b/resources/html/error.html index 88103f7..fd31cc5 100644 --- a/resources/html/error.html +++ b/resources/html/error.html @@ -4,7 +4,7 @@