Skip to main content

Build a json file based on FAIRification standard

Project description

logo

Fairmaterials

Fairmaterials is a tool for fairing data. It reads a template JSON file to get the preset data. The user can edit the data by manually inputting or by importing a csv file. The final output will be a new JSON file with the same structure.

Features

  • Importing JSON template as JSON-LD.
  • Display fair data in dataframe format.
  • Automatically notify duplicate names.
  • Modify JSON data.
    • Based on CSV file.
    • Based on keyboard input.
  • Output as standard JSON-LD.
  • CSV-based group input and output.

Setup

  1. Install it at bash
$ pip install fairmaterials
  1. Import it in python
from fairmaterials.fair import fairjson

A quick example

Load a template file

device=fairjson('cots_json_template.json')

Display the data

device.display_current_JSONDF()

Load a CSV file

device.importCsv('data.csv')

Check the detailed description of the key

device.searchKey('scbi')

Change the value of "scbi" to "testvalue"

device.setValue('scbi','testvalue')

Save to JSON file

device.save_to_json('test.json')

Generate a blank CSV file with name "group_input.csv" for group input

device.generate_group_input_csv(3)

Directly convert a group input CSV file to multiple json files

device.convert_group_input_csv_to_json_files("group_input.csv" )

Versions

All notable changes to this project will be documented in this file.

[0.0.212] - 2021-10-1

Added

  • Add group input CSV file generation function.
  • Add directly convert a group input CSV file to multiple json file function.
  • Add Version part in Readme.md file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fairmaterials-0.0.212.tar.gz (5.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page