Skip to content

LianeHughes/covid-portal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COVID-19 Data Portal Sweden

COVID-19 Data Portal Sweden

This is the source code for the Swedish Covid-19 Data Portal: https://www.covid19dataportal.se/

The website is the Swedish node for the European Covid-19 Data Portal project. The main European site can be seen at https://www.covid19dataportal.org/

Introduction

This website is developed for Vetenskapsrådet by the SciLifeLab Data Centre. It is intended to provide a central place to provide information about:

  • Available COVID-19 datasets
  • Support services for COVID-19 researchers
  • Information and support for publishing and sharing COVID-19 datasets
  • Ongoing research projects and funding opportunities for COVID-19 research

The site is built using the Hugo static web site generator. It uses the Bootstrap framework. In addition, it uses Vega-Lite, DataTables, Select2, OpenLayers, plotly, ImJoy.

Development

All website content is written in Markdown, and so relatively easy to edit.

Step 1: Access the code

The code is hosted on GitHub, so you'll need an account.

Next, visit the code repository: https://github.com/ScilifelabDataCentre/covid-portal

In the top right, you'll see a button that says "Fork". Click this, then select your username. This makes a copy of the repository under your personal account that you can edit.

Step 2a: Edit the files (online)

This is best if you only want to make one or two minor tweaks. If you want to make more substantial edits over a longer time frame, we recommend editing locally (Step 2b).

The easiest way to edit the website files is on the GitHub website.

On the web page of your forked copy of the repository, look in the content/ directory. Each subdirectory contains the website contents in English or Swedish.

The filenames correspond to the website URL:

Go to the markdown file that you want to edit, then click the Pencil icon ✏️ in the top right. This opens a web-based editor where you can add and edit content.

When you're finished, scroll to the bottom and fill in / submit the "Commit changes" form.

You're nearly done - you can now skip to Step 3.

Step 2b: Edit the files (locally)

Git setup

If you prefer, you can edit the website files on your computer in your favourite text editor. Just fork the repository to your machine:

git clone git@github.com:[YOUR-USERNAME]/covid-portal.git
cd covid-portal

To make it easier to pull in changes made by others, you can add the main repository as a remote:

git remote add upstream https://github.com/ScilifelabDataCentre/covid-portal.git

Then you can fetch changes at any time from this remote:

git pull upstream develop

When you have finished editing, commit and push to your fork:

git add .
git commit -m "My changes"
git push

Testing locally

To view your changes as they will appear in the final website, you need to install Hugo. You can find instructions on the Hugo website: https://gohugo.io/

If you're using Mac OSX, it's recommended to use Homebrew - if homebrew is already set up, installing Hugo is just a case of:

brew install hugo

Once Hugo is installed, simply run the following command in the repository root directory:

$ hugo serve

                   | EN | SV
-------------------+----+-----
  Pages            | 34 | 34
  Paginator pages  |  0 |  0
  Non-page files   |  0 |  0
  Static files     | 26 | 26
  Processed images |  0 |  0
  Aliases          |  1 |  0
  Sitemaps         |  2 |  1
  Cleaned          |  0 |  0

Built in 123 ms
Watching for changes in /Users/philewels/GitHub/covid-portal/{archetypes,content,layouts,static}
Watching for config changes in /Users/philewels/GitHub/covid-portal/config.yaml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Use the URL printed at the bottom of this message (here, it's http://localhost:1313/) to view the site. Every time you save a file, the page will automatically refresh in the browser.

Docker

If you would prefer not to use Hugo, you can use the provided Dockerfile to build and run a container.

Step 3: Make a pull request

Once you're finished with your edits and they are committed and pushed to your forked repository, it's time to open a pull request.

You can find full documentation on the GitHub help website, however in short:

  • Visit the main repository: https://github.com/ScilifelabDataCentre/covid-portal
  • Click the button that reads "New Pull Request"
  • Click the text link near the top that says "compare across forks"
  • In the right-hand "head repository" drop down, select your username / fork.
  • If you're happy with the list of commits shown, and the diff in the "Files Changed" tab, fill in a title and description and click "Create pull request"

Once created, a member of the website team will review your changes. Once approved, they will be merged and deployed.

Using ImJoy Plugins

This website supports ImJoy plugins which can be used to visualize, annotate, run analysis directly from the website. Please see the file DOCUMENTATION/ImJoy.md for examples of usage.

How to get help

If in doubt, you can ask for help on the #covid-19-data-portal channel on the SciLifeLab Slack, or email datacentre@scilifelab.se.

Credits

The website was built by SciLifeLab Data Centre with the help of some additional SciLifeLab volunteers.

The primary contributors have been:

About

The Swedish COVID-19 Data Portal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 97.3%
  • CSS 2.6%
  • Dockerfile 0.1%