Git Product home page Git Product logo

retriever-recipes's Introduction

Retriever-Recipes

Python package Documentation Status Join the chat at https://gitter.im/weecology/retriever NumFOCUS

The Data Retriever earlier used a simple CLI for developing new dataset scripts. This allowed users with no programming experience to quickly add most standard datasets to the Retriever by specifying the names and locations of the tables along with additional information about the configuration of the data. The script is saved as a JSON file, that follows the DataPackage standards.

This functionality has been moved to this repository to separate the scripts from the core retriever functionalities to help with organization, maintenance, and testing. The retriever-recipes repository thus holds all the scripts which were earlier shipped with retriever and also all the script adding/editing functionalities.

To facilitate the use of recipes as a command-line utility, the user can simply clone the repository and install it. The installation steps are mentioned in the next section.

Installation

    git clone https://www.github.com/weecology/retriever-recipes.git
    cd retriever-recipes
    python setup.py install

Using the Command Line

To see the full list of command line options and datasets run retriever-recipes --help. The output will look like this:

    usage: retriever-recipes [-h] {new_json,edit_json,delete_json,help} ...

    positional arguments:
      {new_json,edit_json,delete_json,help}
                            sub-command help
        new_json            CLI to create retriever json script
        edit_json           CLI to edit retriever json script
        delete_json         CLI to remove retriever json script
        help

    optional arguments:
      -h, --help            show this help message and exit

Examples

Some example usages of the CLI interface are:

  1. Add a new JSON script:
    retriever-recipes new_json
  1. Delete an existing JSON script:
    retriever-recipes delete_json dataset
  1. Edit an existing JSON script:
    retriever-recipes edit_json dataset`

Website

For more information, see the Data Retriever website.

retriever-recipes's People

Contributors

apoorvaeternity avatar ashishpriyadarshicic avatar dassaniansh avatar dumbmachine avatar ethanwhite avatar harshitbansal05 avatar henrykironde avatar kadam-tushar avatar kkothari2001 avatar mohitkumar6122 avatar pri1311 avatar zhangcandrew avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

retriever-recipes's Issues

Add dataset with python script

I encountered ModuleNotFoundError: No module named 'retriever' when I added a script named 'west_nile.py' to scripts folder to download a dataset although it is normally imported via python shell.

retrr
ss

Notes on failing data packages https://dashboard.data-retriever.org

Write out retriever-recipes location on setup

We should try to write out the retriever-recipes location on setup so that retriever can use it. This is assuming most people won't move their retriever-recipes folder. In the README we could probably note that the folder should not be moved if possible, or if moved to re-run setup.py.

Version Number for version.txt

Let's add a version number for version.txt! This should be separate (i.e. starting from 1.0.0 or 0.0.1 or beta or however you want to do it) from the one in retriever, since now the two version.txts will be referencing different sets of files.

Guide to adding and testing spatial data packages

Creating a script

  1. Use the retriever autocreate tool to read the data and create a starting script. Update the script as described in the docs

Testing a script
Make sure you have Postgres server up and running
Install Pgadmin
install QGiS

  1. Install the new data into Postgres under the default database postgres. retriever install postgres new-data-pakage
  2. Open QGIS and connect to the Postgres database (make sure you only select one layer at a time not to run out of memory)
  3. Open the raw data folder ~/.retriever/raw_data/ and open the raw image with QGIS to confirm that the raw image matches the image

Example:
Output from QGIS after retriever installation.

image

No working - troubleshooting

  1. Incase no data is being rendered, close QGIS and open pgadmin to check if the tables were created and they are not empty.
  2. Open the raw data folder ~/.retriever/raw_data/ and open the raw image with QGIS to confirm that the raw data can be rendered

Link broken of Data Retriever website in Readme .

Currently the link of the Data Retriever website in the readme page of retriever-recipes.

IMAGE

To fix this issue we need to change the link of retriever org to its official docs as stated in Retriever readme.

Old script remains when the name of a script is changed

With edit_json, where if we edit a script and change its name, it outputs a new script with the new name, but keeps the old script with the old name. The correct functionality should be to replace the old script with the new name script, leaving no trace of the old script.

coronavirus-belgium: Error while installing

INSERT INTO coronavirus_belgium.cases_muni ( record_date, nis5, tx_descr_nl, tx_descr_fr, tx_adm_dstr_descr_nl, tx_adm_dstr_descr_fr, tx_prov_descr_nl, tx_prov_descr_fr, tx_rgn_descr_nl, tx_rgn_descr_fr, cases ) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)

value too long for type character varying(5)

Update all scripts changed

Some scripts have been changed or added to retriever master. Could we update them in retriever-recipes and also in retriever(branch retriever-recipes-dev)

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.