Giter Club home page Giter Club logo

ezcatalog's Introduction

ezCatalog

A customizable data catalog for users of the EDI Data Repository

Live demo

ezCatalog is based on the PASTA-JavaScript-Search-Client developed by Tim Whiteaker for the Long-Term Ecological Research Network (LTER).

Motivation

Researchers and organizations publishing data in the EDI Repository may wish to create a searchable data catalog on their website. This project includes code supporting such functionality.

Usage for Your Site

  1. Fork this GitHub repository.
  2. Once the repository is forked, go to Actions and enable GitHub Actions for your repository. This is a security requirement imposed by GitHub on forked repositories that include GitHub Action workflows.
  3. Initialize GitHub Pages for your fork. Go to Settings > Pages and select Source to be "Deploy from a branch" and Branch to be /root of the main branch.
  4. Construct a filter query to identify your data in the EDI Repository and to be listed in your catalog using one of the following options:
    • Unique Keyword - A unique keyword identifying your research group and published in the metadata of each of your EDI data packages can be used as a filter. For example, the research lab of Cayelan Carey publishes data with the keyword "Carey Lab" and the filter query '&fq=keyword:"Carey Lab"' returns all their data.
    • Data Package Identifiers - A list of data package identifiers in the form id:scope.identifier. For example, '&q=id:edi.23+id:edi.101+id:edi.845'returns the newest versions of data packages: edi.23, edi.101, and edi.845.
    • Scope - For LTER only. The scope identifying your LTER site. For example, '&fq=scope:knb-lter-cap' returns all data of the Central Arizona-Phoenix LTER.
  5. Add the filter query to config.txt and commit the changes.
  6. Use GitHub Actions to build your catalog with the build_catalog workflow. Go to Actions and under Workflows select Build catalog, then Run workflow. Wait for the workflow to complete, then click the Live demo page to see your catalog (it may take a few minutes to update). Subsequent pushes to your fork will automatically rerun the build_catalog workflow.
  7. Copy the HTML snippet below and paste it into the body of your webpage. This will reference the catalog hosted on GitHub Pages from within your website.
<iframe loading="lazy" src="https://EDIorg.github.io/ezCatalog/public/demo.html" scrolling="no" allow="fullscreen" width="100%" height="2700px"></iframe>
  1. If you would like your catalog to reference data packages in the EDI staging environment, search for the string pasta.lternet and replace with pasta-s.lternet in the files:
    • /harvester/pasta_harvester.mjs
    • /public/pasta.js

To see an example of how to embed the catalog in a web page <iframe>, view the page source code of the Jornada Basin LTER Data Catalog or experiment using the W3Schools HTML Tryit editor.

Features

Autocomplete

Autocomplete is currently supported for the creator and taxonomy input fields. Try typing a couple of characters into the creator box of the demo page and see what happens.

Autocomplete requires creating a list of possible choices, which is automatically generated each time the GitHub Actions workflow build_catalog runs.

Pagination

ezCatalog allows you to limit the number of results returned per page. If you do not wish to use pagination, set the limit parameter in config.txt to a number higher than the number of datasets available for your group.

Caveats

The success of search queries depends upon the metadata provided when submitting data to the EDI Data Repository.

Support

Please contact [email protected] for help setting up your catalog or resolving issues.

Scope

ezCatalog is a basic data catalog. If interested in developing a more feature rich catalog, we recommend checking out the video on Using the PASTA+ Search API to Create a Local Data Catalog.

Acknowledgments

CSV export uses uselesscode's JS CSV serializer (MIT Licensed): http://www.uselesscode.org/javascript/csv/

We use Pixabay's autocomplete plugin. Thanks Pixabay!

ezcatalog's People

Contributors

actions-user avatar clnsmth avatar servilla avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

ezcatalog's Issues

Add script to update pasta.js when the catalog page is loaded

Configuration parameters such as pagination are set outside of /public/pasta.js and /harvester/pasta_harvester.mjs'. That way, commits to pasta.js` can purely be about improving functionality rather than changing settings.

That can be done in a script that calls pasta.js if the window.onload function in pasta.js was replaced with a regular function definition, and then the calling function (either in a separate script or inline in the HTML) would modify settings as desired (either inline or from a config file) and call the function to initiate the catalog.

Extend support to other repositories

It's very likely that users of the EDI Repository have data archived else where. Consider extending the scope of ezCatalog to provide users a single interface for showcasing their data.

If a forked is renamed the live demo.html link will not work

When a forked repository is renamed from ezCatalog the live Demo.html and the iframe link will not have the correct repository name.

To solve this issue I edited build_catalog.yml to include
sed -i 's/ezCatalog/${{github.event.repository.name }}/g' README.md

Jim Laundre

ENHANCEMENT: bold/highlight search terms round in results

Just want to drop this idea here since it relates to how these search results are returned and clicked on by users. Thanks again for sharing this code. I've always been fascinated how Google search has transformed the sharing of information.

from: https://seekingalpha.com/article/4497322-google-is-flourishing

In I'm Feeling Lucky, it is revealed what happened after Google beat out Overture for the AOL contract in May 2002. Google engineer John Bauer increased clickthrough 400% by adding code such that the keyword in the ad tied to the search phrase was changed to bold:

By the end of the contract's first year, we were far above the highest projections. Part of that success may have been attributable to a small shift made by an enterprising engineer. The day after the deal went live, John Bauer added code that boldfaced the keyword a user had searched for when it appeared in an ad, making it obvious that the ad was relevant. That single improvement increased clickthrough rates by four hundred percent. One engineer. One change. Four hundred percent.

[I'm Feeling Lucky Kindle Page: 304]

Error popup when connection to search

I get an Error popup that says "There was an error making the request." when trying to access the search. It occurs on my site Arctic LTER and the live demo.

Filter by "advanced" Solr query

Example queries listed under the Usage for Your Site section of the repository README serve the 3 most typical use cases we encounter. However, edge cases requiring more advanced filtering can be supported. Such edge cases should be demonstrated as a 4th point under the "Construct a filter query" step in the Usage for Your Site section.

Allow option to expand advanced search dropdown by default

Hi there,
Just forked the ezCatalog and love it! Running the Andrews data as a live demo. I'm trying to modify the advanced Search form to show by default. I've made a few changes to the form input in the demo.html but haven't been successful - do you where the controls are for this? Thanks again for sharing this nice work.

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.