A customizable data catalog for users of the EDI Data Repository
ezCatalog is inspired by the PASTA-JavaScript-Search-Client developed by Tim Whiteaker for the Long-Term Ecological Research Network (LTER).
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.
research-site) from the main branch. Do all your configuration and deployment on this branch. This keeps your main branch clean, allowing you to easily pull in future updates from the original ezCatalog repo without overwriting your work.research-site) and the /root folder.'&fq=keyword:"Carey Lab"' returns all their data.'&q=id:edi.23+id:edi.101+id:edi.845'returns the newest versions of data packages: edi.23, edi.101, and edi.845.'&fq=scope:knb-lter-cap' returns all data of the Central Arizona-Phoenix LTER.Add the filter query directly to /public/pasta.js by editing the filter property in the PASTA_CONFIG object. For example:
const PASTA_CONFIG = {
"filter": '&fq=keyword:"Carey Lab"', // Replace with your filter query
...
};
PASTA_CONFIG block near the top of /public/pasta.js (for example showBanner, hideMapView, facetVisibility, showAbstracts, and abstractLimit).build_catalog workflow.
<iframe loading="lazy" src="https://samrblackburn.github.io/MCMezCatalog/public/demo.html" scrolling="no" allow="fullscreen" width="100%" height="2700px"></iframe>
Runs main.py to update public/pasta.js and this README based on your PASTA_CONFIG settings, then commits those changes to your branch.
public/pasta.js and README.md.To pull in the latest features or fixes from the main ezCatalog repository:
main branch with the upstream repository.main branch into your research-site branch.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.
The success of search queries depends upon the metadata provided when submitting data to the EDI Data Repository.
Please contact support@edirepository.org for help setting up your catalog or resolving issues.
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.
This project uses Jest for unit testing JavaScript code.
To run all tests:
npm test
To run tests with real PASTA API requests:
RUN_REAL_REQUESTS=true npm test
Test files should be named with .test.js and placed alongside the code they test (e.g., public/sample.test.js).
For more information, see the Jest documentation.