The code behind http://data.okfn.org.
Core is an ultra-lightweight Data Hub running off data packages.
-
Very simple. Just one or two simple web pages
-
DataStore and API
- May be optional for MVP?
- SQL-backed (Use "SqlStore" stuff from CKAN?)
- JSON RESTful API
- Refine reconciliation support
- Build on CKAN DataStore ...
-
Web interface
- Big list on the front page
- per-datasets page /{dataset-name}-{id}/...
- Scrollable table of the data with search (?)
- Links to download of CSV and full API instructions
- (?) URL for each element /{dataset}/id/{element-id}/
- Add .json, .{...} for each item
How to implement?
-
Pure JS (or Node or Flask?)
-
Why Not Use CKAN?
- We may use CKAN at some point BUT to start with ...
- Want very simple structure (just a few pages)
- Preference for JS only (lots of browser JS)
- Don't need CKAN's full power
- CKAN somewhat more complex to deploy
Requires NodeJS (>= v0.8).
Install the requirements (in package.json):
npm install .
Run the web application locally:
node app.js
If you want to customize the catalog file you run off set the environment variable:
export CATALOG_URL={url-to-your-data-package-catalog}
Note that you will need to install the Heroku toolbelt to carry out the heroku
commands below.
Skip this step if the application is already deployed
This is heavily based on this tutorial.
# replace {app-name} with the name of your app
heroku create {app-name}
git push heroku master
# now point at our config
heroku ps:scale web=1
Push to heroku git repo:
git push heroku master
Note: if didn't do the create you will need to add the heroku remote:
git remote add heroku git@heroku.com:{app-name}.git
heroku sharing:add joe@example.com
Do the following:
heroku domains:add {your-domain-name}
Now CNAME your domain to {myapp}.herokuapp.com