Coder Social home page Coder Social logo

pebsconsulting / iati-query-builder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iati/iati-query-builder

0.0 2.0 0.0 155 KB

Simple form to help people build queries for the IATI datastore API

License: Other

PHP 67.86% CSS 19.63% HTML 11.89% Shell 0.62%

iati-query-builder's Introduction

IATI-Query-Builder

License: MIT

About

A simple form that will build a query string that can then be used to fetch data from the IATI Datastore API.

See it in action here - http://datastore.iatistandard.org/query/index.php

Requirements

A webserver running php and php-curl. PHP dependencies are managed using Composer.

Installation

# Clone the repository and enter into the root folder
git clone https://github.com/IATI/IATI-Query-Builder.git
cd IATI-Query-Builder

# Install dependencies
composer install

# If running for the first time, prepare the helper script that enables you to get data for current IATI publishers
# This involves copying the file to a filename of your choice and uncommenting the code
cp helpers/refresh_group_data.example.php helpers/YOUR_FILENAME.php
nano helpers/YOUR_FILENAME.php

# Run the script to get data for current IATI publishers using the CKAN API
php helpers/YOUR_FILENAME.php

# You may wish to ensure that the included codelists are up-to-date (optional)
./update-codelists.sh

# Run a webserver
php -S localhost:8000

# Open a browser and visit localhost:8000

Helper scripts

Getting the latest IATI publishers

The /helpers directory has a script refresh_group_data.example.php that will enable you to get data relating to current IATI publishers.

Running this script will generate a .json file of 'groups' (i.e. publishers) in use on the IATI registry, and this in turn will populate the 'Reporting Organisation' multi-select element in the form.

Getting the latest IATI publishers

The script update-codelists.sh will re-download latest versions of the required codelists.

Automating updates

To automate regular updates, you could set-up both of these scripts as a cron job on your server.

iati-query-builder's People

Contributors

caprenter avatar dalepotter avatar andylolz avatar allthatilk avatar bjwebb avatar hayfield avatar

Watchers

James Cloos avatar  avatar

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.