Project

heydan

0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Use HeyDan to download, munge and manage data for jurisdictions
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0
>= 0
>= 0

Runtime

~> 2.0
~> 0.7.5
~> 2.5
~> 1.2
~> 0.10
~> 3.3
~> 1.1
~> 1.4
~> 0.19
 Project Readme

HeyDan

Why HeyDan? I wrote it to help answer questions. Every time you have a question about governments, I imagine you turning around and saying 'Hey Dan! how many governments have x or y?''

At every civic company I've worked at, I needed to build some sort of government data munging tool set. I wrote HeyDan, partly for myself, and partly to share.

The goal is to create an easy versino controlled data import and processing tool for single variables, attributes, properties, etc and an ultra fast http server backed by ElasticSearch with extreme filter capabilities and data extendability. This is not a data catalogue, its middleware to pull data from data catalogues and process it.

##Build Status

Build Status

Installation

You will need git & ruby for the core library

$ gem install heydan

If you would like to leverage the server & search functionality, you will need elasticsearch

http://elastic.co/downloads

Command Line Usage

HeyDan is meant to be used in a shell:

$ heydan help
#returns a list of commands you do

$ heydan setup
#sets up heydan in the current directory

$ heydan build --type optional
#creates the jurisdiction files in the jurisdictions folder

$ heydan sources sync
#pulls down sources into sources folder leveraging git

$ heydan sources build 
#builds through each source in the sources folder, optional parameters
#include --fromsource, --type, and FOLDER NAME VARIABLE

$ heydan sources add github_http_link.git
#clones a source from git repo and adds to settings file under sources

$heydan sources new FOLDER SOURCENAME VARIABLE
#creates or adds a new variable under sources/folder/sourcename and sources/folder/scripts/sourcenamevariable.rb

$ heydan import
#bulk imports the jurisdictions folder into elasticsearch for extreme search goodness

$ heydan server
#starts a sinatra server at localhost:4567/entities

$ heydan upload
#uploads contents of the datasets folder to aws as specified in the settings file.

Adding Data

You can contribute to HeyDan by creating a new source folder on github. Look at https://github.com/danmelton/heydan_sources as an example.

To create a new directory for data:

$ heydan sources new example example_source example_variable_name

This will create a folder 'example' in sources/ with a json file name example_source and a ruby file inside example/script/example_variable_name.rb

You can update json file with metadata about the source. Each variable also has metadata too.

The script file has three methods in it. A version, which defaults to 1; a type, which defaults to 'dataset'; and a build method with some sample code.

At the end of the build method, you should have a 2 to multiple column @data variable with the first row as headers.

You can add pry in the build method to help you troubleshoot:

  require 'pry'
  binding.pry

Contributing

Bug reports and pull requests are welcome on GitHub Issues. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.