Skip to content

michellemao0224/govhackaustralia.github.io

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the source for the govhack-science website highlighing sciency datasets at govhack-science.github.io

Content served by Jekyll, with layout and nice bits stolen shamelessly from Rasmus Andersson

Planning

GovHack Data Model

Documentation

Requirements

  • Ruby
  • RubyGems
  • NodeJS
  • Python
  • Jekyll

Installation

https://jekyllrb.com/docs/installation/ https://jekyllrb.com/docs/github-pages/

Our friends at GitHub have provided the github-pages gem which is used to manage Jekyll and its dependencies on GitHub Pages. Using it in your projects means that when you deploy your site to GitHub Pages, you will not be caught by unexpected differences between various versions of the gems. To use the currently-deployed version of the gem in your project, add the following to your Gemfile

The best way to install Jekyll is via RubyGems. At the terminal prompt, simply run the following command to install Jekyll:

$ gem install github-pages

All of the GitHub pages flavour of Jekyll, and its gem dependencies are automatically installed by the above command, so you won’t have to worry about them at all.

Run

https://jekyllrb.com/docs/usage/

jekyll serve

If you receive a message like:

Could not find gem 'github-pages (= 67)' in any of the gem sources listed in your Gemfile or available on this machine. (Bundler::GemNotFound)

Then it means GitHub has upgraded their github-pages gem version, so just run bundle install from the root directory to upgrade to the latest set of deps GitHub is using.

Python Tools

We have a few Python tools to help us manage the ingest of data, and generating a static JSON API.

To setup a virtual environment run (from the root directory):

virtualenv --system-site-packages venv
. venv/bin/activate
pip install -r python/requirements.txt

Mentors Ingest

This script takes a .csv file exported from FormStack and generates a set of new .md files.

To run:

. venv/bin/activate
python python/mentors.py

The script tries its best to auto-populate the mentor files based on what exists in Jabberwocky (events, organisations, et cetera), but you should still read the output of the script to check for any WARNINGS you might need to fix up.

Prizes Ingest

This script takes a directroy of .csv file downloaded from Google Drive and generates a set of new .md files.

To run:

. venv/bin/activate
python python/prizes.py

The script tries its best to auto-populate the prize files based on what exists in Jabberwocky (events, organisations, et cetera), but you should still read the output of the script to check for any WARNINGS you might need to fix up.

Datasets Ingest

This script takes a .csv file exported from FormStack and generates a set of new .md files.

To run:

. venv/bin/activate
python python/datasets.py

The script tries its best to auto-populate the dataset files based on what exists in Jabberwocky (events, organisations, et cetera), but you should still read the output of the script to check for any WARNINGS you might need to fix up.

Static API

This script need to be run everytime we change the frontmatter of an .md file so that we always serve the latest content to govhack.org. This generates one .json. file for each Markdown file thanks to the magic of python-frontmatter.

At this stage it's a straight conversion from one to the other - with no magic to compose the full entity object, include links to and from it, yet.

To run:

. venv/bin/activate
python python/frontmatter-to-json.py

Tip: If importError: No module named yaml, try this SO. Otherwise the virtualenv --system-site-packages venv command should have imported the usual suspects like pyyaml.

About

Project Jabberwocky: The data portal and handbook for GovHack

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 60.8%
  • CSS 23.8%
  • Python 8.0%
  • JavaScript 5.8%
  • CoffeeScript 1.6%
  • Ruby 0.0%