Adding a request page to a website
If you are using Template Data Package as a template for your data package, follow the guide on enabling the request feature there instead. The template automates running Propagate, generating the request web app, and inserting it into the data package website.
Building the web app
Use Propagate’s build command to create a web app for a data package, allowing people to request subsets of the data.
The build command takes two inputs:
- The metadata file describing the data package.
- The output folder where the files for the web app will be created.
Building with default arguments
By default, build looks for a datapackage.json file in the current working directory and creates the web app in docs/requests/.
To use the default arguments, open a terminal in the root of your data package folder (i.e., the folder with your metadata file) and run:
Terminal
seedcase-propagate buildBuilding with custom arguments
To use a different metadata file or output directory, provide them as arguments:
Terminal
seedcase-propagate build path/to/metadata/file --output-dir path/to/output/dirThe only metadata file currently supported by Propagate is the datapackage.json file described by the Data Package specification.
Adding the web app to a website
The output generated by Propagate is a self-contained static web application that can be hosted on any service that can serve static files. Simply make the output folder available as part of your website and add a link to it so Requesters can find it.
Adding the web app to a Quarto website
If your data package is set up as a Quarto website, you can easily include the request web app by following the steps below:
List the folder containing the web app under
resourcesin your_quarto.yml. This will make Quarto copy the folder into the final website assets. For example:_quarto.yml
project: resources: - docs/requests/Add a navigation entry pointing to the web app folder in your
_quarto.ymlor link to it from another page on your website. For example:_quarto.yml
website: navbar: left: - text: "Request a data subset" href: docs/requests/
If you generated the web app in docs/requests/ within your data package, it will be available at https://your-website.org/docs/requests/.