Giter Site home page Giter Site logo

okfn / opendatasurvey Goto Github PK

View Code? Open in Web Editor NEW
139.0 39.0 94.0 12.72 MB

The Open Data Survey application

Home Page: http://census.okfn.org

License: Other

JavaScript 73.58% Shell 0.02% CSS 16.67% HTML 6.31% Makefile 0.08% Dockerfile 0.03% Less 0.45% SCSS 2.85% Procfile 0.01%
opendata survey census

opendatasurvey's Introduction

Deprecation notice

OKFN no longer maintains this app

Open Data Census

Build

Open Data Census is a web application that supports a submission and reviews workflow to collect information on the state of open data.

Some presentation of data is supported, along with partitioning results by year. The code base supports multiple censuses in a multi-tenant configuration, where each tenant runs a census from a subdomain.

Tenant administrators can customize parts of the app, from look and feel to key texts on various views.

Demo Site

If you want to check out what an Open Data Census site looks like we have a demo site running at:

http://demo.census.okfn.org/

Overview

See: http://census.okfn.org/

Getting started

Open Data Census is a Node.js app, running Express v4 and Postgres 9.4 for the database.

Get a local server setup with the following steps:

NOTE: If you need to prefix your commands in your local environment with sudo, then do that.

  1. Install Postgres 9.4 on your machine.
  2. Setup to appropriate credentials on Google and Facebook so they are OAuth providers for your app.
    • For Google: follow these steps
      • The callBack url for Google+ API is: http://id.dev.census.org:5000/google/callback
    • For Facebook: follow these steps
      • The callBack url for Facebook is: http://id.dev.census.org:5000/facebook/callback
  3. Ensure you are running the supported version of Node.js, which is declared in the 'engines' section of package.json.
  4. Create a database with createdb opendatacensus.
  5. Add this line to your hosts file: 127.0.0.1 demo.dev.census.org global.dev.census.org id.dev.census.org system.dev.census.org.
  6. Create a local directory called opendatasurvey and move into it with cd opendatasurvey.
  7. Clone the code with git clone https://github.com/okfn/opendatasurvey ..
  8. Install the dependencies with npm install.
  9. Create a copy of settings.json.example file and name it settings.json changing any values as required.

Now we should be ready to run the server:

  1. Run the app with npm start (the server will be run on the 5000 port)
  2. Log in at http://id.dev.census.org:5000/login with your admin account (the same that was setup on the settings.json file)
  3. Load registry and config data at http://system.dev.census.org:5000/control
  4. Load the data for a specific site, e.g.: http://demo.dev.census.org:5000/admin
  5. Visit the site: http://demo.dev.census.org:5000/

Other things you can do:

  • Run the test suite with npm test
  • Check your code style with npm run lint using the eslint config /.eslintrc.

Configuration Sheets

Most of the site configuration is taken from config sheets in Google Sheets. You can use this registry sheet and its linked sheets as examples and clone them as necessary.

NOTE: Ensure your registry and all other config sheets have been published as CSV in Google Sheets (click File, Publish to the Web).

Deployment

We run deployments on Heroku. The app should run anywhere that you can run Node.js and Postgres. The important thing to remember for deployments is that the settings.json file you are using for local development is not available, and therefore you need to configure several settings via environment variables. The key settings you should ensure are set:

  • SESSION_SECRET
  • BASE_DOMAIN
  • DATABASE_URL
  • SYS_ADMIN
  • FACEBOOK_APP_ID
  • FACEBOOK_APP_SECRET
  • GOOGLE_APP_ID
  • GOOGLE_APP_SECRET

i18n For Templates and core code

When templates or strings in core code change, the translations have to be changed. Extract strings to the messages.pot file by running this command:

./node_modules/.bin/gulp pot

You will need the GNU gettext commands. See here for more information.

To update the existing .po files, run:

./node_modules/.bin/gulp update-po

To add a new language, create the directory locale/[language-code]/LC_MESSAGES and create the translation files (*.po). Alternatively, you can copy the locale/en directory to locale/[language-code] and change existing files.

To update the translations cache, run:

./node_modules/.bin/gulp compile-po

i18n For Config

Any column can be internationalised by adding another column with @locale after it. For example, the description column can be translated to German by adding a column of description@de. Only languages which have template translations created for them are valid. The locales setting in the config document can be used to restrict the number of locales available. The first locale in the list is the default locale.

Removing a user

A script is provided to remove users by provider id. Removing a user will update entries where the user is a submitter or reviewer (changing the user id to the anonymous user), then remove the user.

$ npm run anonymize_user -- <provider-id>

Use -d to perform a dry run, which will print the user id, and entry ids which will be affected (where the user is either a submitter or reviewer).

Running Tests

createdb opendatacensus_test
npm test

opendatasurvey's People

Contributors

andylolz avatar autofunk avatar avdata99 avatar borysyuk avatar brew avatar clkao avatar dannylammerhirt avatar diraol avatar jae-huh avatar johnmartin avatar kleanthisk10 avatar lauriej avatar longhotsummer avatar mattfullerton avatar mihi-tr avatar mk270 avatar morchickit avatar mwleeds avatar nickstenning avatar ondrae avatar pudo avatar pwalsh avatar roll avatar rufuspollock avatar smth avatar stefanw avatar tlacoyodefrijol avatar vlevit avatar wombleton avatar zerberio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opendatasurvey's Issues

Move current /census/ to /country/ (?)

For consistency with city. We will also need a redirect (js / http only i guess ...)

Plus we should also settle on whether the form / questions go at the base URL or a sub url.

Also update navbar and add City to navbar ...

catalogs page not loading

http://dashboard.opengovernmentdata.org/catalogs/ is not loading for me.

Ie, the 'Loading' message with spinning thingy does not disappear.

The console log tells me:

"Can't add the same model to a set twice,bcccde06-dc97-49ad-bffa-39a05933cb80"

Logged from backbone.js, line 586.

The same error is logged in Chrome (latest, 24.0.1312.52 m) and Firefox (latest, 18.0)
It's also not working in IE9 but I can't figure out how to check the console because it doesn't seem to show me any messages. All of this is on Windows 7.

Re-instate tabular overview for census

This is really useful for people adding to the census ...

Would also be nice to have a list of countries and datasets for which we do not yet have information

Contribute page

Explicit instructions on contributing:

  • Use the data
    • Instructions on getting the data
  • Contribute to the country census
  • Contribute to the city census

Workflow and curation process for City and Country answers

This is a discussion issue with connections to several other issues.

Current workflow

See the README

New Workflow

  • Submit => [Review] => Approved
    • [Flagged for Review => Review => Update]
  • Update => Review => Approved / Not Approved
    • [Comment]

Related

  • #85 - de-dupe data better in backend + #54 (double-entries)
  • #58 - show datasets description in city form
  • #45 - improved descriptions in country census
  • #62 - add a census year
  • #77 - clearer definition of key datasets
  • #87 - require link to an official data source
  • #80 - link machine readable to a proper definition
  • #79 - rephrase bulk option

Front page content

  • count number of datasources in datacatalog.org
  • count of other stuff ...?
  • rankings

Improvements to the Tabular Presentation

  • simplify names so you have more space and nicer …
  • Add a total column (just add up for the time being!)
  • New issue for better score computation
  • Fixed header (???)
  • Sort by total and country name … (Forget this … ?)
    • cf #33 (rankings presentation)

spam entries

On the map here: http://dashboard.opengovernmentdata.org/catalogs/ ...first thing I did was zoom in on central London. Right on the London label there's a marker for "Cyber world uk store" "Cyber world uk ltd is one of the UK’s Top Upcoming Suppliers of Mobile Phone Accessories UK 2012 online." ....where'd that come from?? Looks like spam

Country Census Table Usability Issues

@rgrp please Rufus have a look at these and decide which ones are relevant. (these are just some thoughts I had to make the table look more appealing and easier to understand)

@juliakloiber great suggestions. I've categorized a bit ...

  • sort the table by default by score (makes more sense for the user than alphabetical order. the user immediately sees what rank his country has)
  • First column after "country" should be "total score". When the table is sorted by rank the color gradient (spectrum) of the "total score" shows the user that this is a scale.
  • only using 5 colors (green, yellow, red, black, white) .. or maybe even different shades of one color because of allochromasia (e.g. blue in different shades, CD)
  • completed fields (7/7) get a tick-symbol. to show that those are complete.

Not sure about yet

  • legend for the colors (we have the numbers)
  • no numbers in the boxes, the numbers could be on the color legend. (explaing that green=7 to 5, yellow=5 to 3, red=3 to 0, black= data is not available, white="?" no info).
  • The numbers only show when you hover a field (that makes the table look more tidy)

Not sure i understand

These items have been done already - why would be soliciting more info?

  • In the pop-up with "more info" you should have a button saying "add data to the census" to immediately give users the opportunity to add data or information. (this is the place where they can take action!

Design / UX for Census results (discussion)

@stefanw we should think about this. What do we want to show?

  • tabular overview
  • map
  • rank list
  • by dataset / topic (e.g. show just for this dataset or for transport)
  • slice & dice: e.g. show ranking just for this particular dataset

how do we show gradations of goodness (e.g. on map)? How do we deal with missing values?

Infobox on census map view is not very informative [discussion]

Infoboxes (modals) on http://census.okfn.org/census/ are not very informative.

Decision

  • Popover (below?)
  • Rows with the 7 qus + name (linked if link) + link to dataset
  • Maybe open data icon if it could fit and open data! (link to opendefinition)

Thoughts for discussion:

  • Do we want this as a modal
  • Show info on closed datasets as well as the open one
  • This might be less of an issue once #32 is done (tabular summary ...)

create about page....

  • List sources of data and download links for bulk versions ...
  • Further info
  • How to contribute

Double Entries: Avoiding and dealing with it.

Right now there are 3 different Berlins. I suppose they are all referring to the same city.

There should be a way to avoid double entries or to flag them as double.
Subsequently a few feature are needed

Dataset entry form gives false error message

Although I have the field "publicly available" set to yes, I get an error report when submitting the form.

This actually blocks me from adding datasets.

Using Google Chrome.

screenshot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.