Git Product home page Git Product logo

learn's Introduction

Welcome to the RECON learn project

This GitHub project hosts the sources of the RECON learn platform, live at: https://reconlearn.org/.

Running a local copy of the website

To run a local copy of this website, you will need a working version of Hugo installed; git clone this repos, then its submodules (used to pull the Hugo theme), and then run hugo on the website:

git clone https://github.com/reconhub/learn recon-learn
cd recon-learn
git submodule init
git submodule update
hugo serve -D

How to contribute content?

This RECON learn website uses R Markdown (.Rmd) documents to build markdown (.md) content that Hugo then turns into a nifty website (.html).

For practical details, head out to this step-by-step tutorial about creating posts.

Other topics

Contributing top-level pages

To contribute a page that sits outside of the posts category you can make an .md file (or a .Rmd file so long as you render to .md too). This will then be processed by Hugo along with the other files to build the website.

These files should have at minimum:

---
date : 2017-11-01
title : About RECON learn
---

Maintaining package dependencies

This repository has a DESCRIPTION which lists any packages required to manage this package itself, not the packages required to knit the R Markdown files.

To identify and install all the packages needed to build all of the .Rmd files in content/post/, you need to run learn::get_and_update_dependencies(). This will also help find packages on GitHub.

Editing existing content

If you need to change an existing piece of content:

  1. Make the changes to the .Rmd file
  2. Run learn::render_new_rmds_to_md()
  3. Commit and push to the repository

learn's People

Contributors

ammerb avatar avallecam avatar juanvesga avatar kcharniga avatar maelle avatar mhoehle avatar pnouvellet avatar stephlocke avatar thibautjombart avatar zkamvar avatar zmcucunuba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learn's Issues

OZ FETP: Introduction to data management

https://github.com/ArminderD/Data_management

This exercise was developed for the Australian Field Epidemiology Training Program, The Masters of Philosophy (Applied Epidemiology) offered through the Australian National University. This exercise provides an introduction to the RStudio environment including basic commands and the generation of basic graphs. The exercise also serves as an introduction to data management in epidemiology introducing the concepts of data checking, data cleaning, and manipulation of variables.

figure out how to actually render math properly

There have been a lot of problems with math rendering on this site. It looks to be because we started with a blogdown framework, but then moved away from it for some reason.

At the moment, we are being bitten by support (or lack thereof) for mathjax on this platform. There is likely a way around this through hugo, but honestly, I'm not sure what it is and it is super frustrating.

OZ FETP: Case Control Study: Shiga toxin producing E.coli

https://github.com/ArminderD/Case_control

This case study was developed for the Australian Field Epidemiology Training Program, The Masters of Philosophy (Applied Epidemiology) offered through the Australian National University. In this exercise we will use a case control for an outbreak of Shiga toxin producing E. coli infection to conduct a simple descriptive analysis, and estimate measures of association. The study will allow us to interpret findings of a case control study that employs frequency matching of controls. We will also analyse the data employing pair matching of cases and controls.

Remove the bit on distcrete

Remove the section beginning:
Now that you know how to parametrise a discretised Gamma distribution matching

Need better instructions for rendering

The current instructions for rendering documents are without a lot of caveats that I've encountered:

  1. Figures get placed into the content/post/<postname>_files/figure_<something> directory by default and require the contributor to manually move them to static/post/<postname>_files/figure_<something>

  2. Pandoc 2.x (shipped with the preview version of Rstudio) has deprecated markdown_github and now uses gfm for rendering. I've fixed this in 61ac7b7 for the render_new_rmds_to_md(), but it currently means that we can't put the rendering information in the header and expect it to work for everyone.

  3. Due to Hugo, relative paths for figure references will not work, resulting in an error if the document is rendered by clicking the "knit" button. I believe this can be circumvented by using knitr::include_graphics() with here() (i.e. https://github.com/zkamvar/dissertation/blob/master/chapters/00-introduction.Rmd#L157).

  4. I've found myself using the following command a lot:

unlink("content/post/practical-stegen.md"); learn::render_new_rmds_to_md()

contact info

  • Should twittername become "RECONEPI"?

  • There's no dedicated email address for RECON, right?

wishlist new website version

Here are the various things which would be good to improve on or add to the website:

  • a search engine which can be used to find documents by category (e.g. lecture, practical) and tags (i.e. any keyword relating to content)

  • other pages (e.g. "about") linked from the landing page, and instructions on how to add and link new pages

  • a ribbons system indicating the category of documents on the post images of the landing page

  • record license as part of the yaml header of posts, handled as category and tags, and displayed alongside ribbons

  • an option to specify how many posts to display on the landing page, with the rest of the content displayed by following a link 'next'

  • add Disqus support

  • add a post on how to contribute material to the website // unsure about this, to discuss

collapse buttons not working

@zkamvar @maelle @stephlocke
Right, so I start to have a better idea of what is happening on this.

Context

I am using this kind of buttons in a new case study:
https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_collapsible&stacked=h

The issue

They work well when using rmarkdown::render("foo_Rmd"), but not when rendered on the website; I have added the headers of the example above to layout/partials/head.html, so the issue doesn't seem to come from there. If we look at the source file content/post/test-buttons.Rmd:

---
title: "Test collapse button"
author: "Thibaut Jombart"
authors: "Thibaut Jombart"
date: 2018-10-24
licenses: CC-BY
categories: "case study"
slug: button-test
image: img/highres/graduation-1965.jpg
showonlyimage: true
---


Here is an attempt at collapse button, taken from:
https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_collapsible&stacked=h


<div class="container">
  <h2>Simple Collapsible</h2>
  <p>Click on the button to toggle between showing and hiding content.</p>
  <button type="button" class="btn btn-info" data-toggle="collapse" data-target="#demo">Simple collapsible</button>
  <div id="demo" class="collapse">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit,
    sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
  </div>
</div>

After using learn::render_new_rmds_to_md(), the file content/post/test-buttons.md looks like:

Here is an attempt at collapse button, taken from: <https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_collapsible&stacked=h>

<h2>
Simple Collapsible
</h2>
<p>
Click on the button to toggle between showing and hiding content.
</p>
<button type="button" class="btn btn-info" data-toggle="collapse" data-target="#demo">
Simple collapsible
</button>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit,
    sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

The

tags have been stripped out. If I put them back in, then the page renders just fine.

I can foresee more problems ahead if <div> tags are removed from our Rmd. Any thoughts / idea welcome.

Resources

Files are here:
5f05b32

Stegen case study

@AmmerB @zkamvar I am using this issue to discuss work on the Stegen case study. Plan is:

  • take down the current version, which nobody probably used; it is still present on the website but not linked from any page

  • make a new draft of the case study in a new branch, with rough narrative and all the analyses // Thibaut

  • solve technical issues (see below) // Zhian and Thibaut

  • polish narrative // Amrish

  • review code // Zhian

  • once we have the final post, generate files to distribute to Malta's participants (folder containing data, adapted scripts, Rmd, etc.) // Zhian

Use readxl

Use readxl instead of xlsx to avoid Java dependencies

OZ FETP: Logistic Regression Case Study 1: Risk factors for Acute Respiratory Infection in Australia

https://github.com/ArminderD/ReCon_Rcourse

This case study was developed for the Australian Field Epidemiology Training Program, The Masters of Philosophy (Applied Epidemiology) offered through the Australian National University. The case study is based on cross-sectional survey data looking at risk factors for acute respiratory infection in Australia. The case study provides basic principles for understanding logistic regression, demonstrate how to perform a simple multivariable analysis in R, check model fit, and interpret results.

here package in Stegen

worth noting in stegen that there are other packages with a "here" function.
E.g. people later loaded dplyr and lubridate after here, so then couldnt use here::here.
Maybe worth adding a note on semicolon use.... ?

OZ FETP: Logistic Regression Case Study 2: IQ and blood lead levels

https://github.com/ArminderD/Regression_practical

This case study was developed for the Australian Field Epidemiology Training Program, The Masters of Philosophy (Applied Epidemiology) offered through the Australian National University. The case study steps through how to adjust for potential confounders using the example from a study on blood lead levels and IQ. The case study provides basic principles for understanding logistic regression, demonstrate how to perform a simple multivariable analysis in R, check model fit, and interpret results.

get_and_update_dependencies.R error

In a vanilla session at e726125

> source("R/get_and_update_dependencies.R")
── Attaching packages ─────────────────────────────────────── tidyverse 1.2.1 ──
✔ ggplot2 2.2.1     ✔ purrr   0.2.5
✔ tibble  1.4.2     ✔ dplyr   0.7.5
✔ tidyr   0.8.1     ✔ stringr 1.3.1
✔ readr   1.1.1     ✔ forcats 0.3.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
Installing packages into ‘/home/thibaut/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
* Adding knitr to Imports
Next: 
Refer to functions with knitr::fun()
* Adding deSolve to Imports
Next: 
Refer to functions with deSolve::fun()
* Adding epicontacts to Imports
Next: 
Refer to functions with epicontacts::fun()
* Adding incidence to Imports
Next: 
Refer to functions with incidence::fun()
* Adding earlyR to Imports
Next: 
Refer to functions with earlyR::fun()
* Adding EpiEstim to Imports
Next: 
Refer to functions with EpiEstim::fun()
* Adding ggplot2 to Imports
Next: 
Refer to functions with ggplot2::fun()
* Adding ape to Imports
Next: 
Refer to functions with ape::fun()
* Adding outbreaks to Imports
Next: 
Refer to functions with outbreaks::fun()
* Adding epitrix to Imports
Next: 
Refer to functions with epitrix::fun()
* Adding outbreaker2 to Imports
Next: 
Refer to functions with outbreaker2::fun()
* Adding visNetwork to Imports
Next: 
Refer to functions with visNetwork::fun()
* Adding projections to Imports
Next: 
Refer to functions with projections::fun()
Error: "tidyverse" must be installed before you can take a dependency on it
In addition: Warning message:
packages ‘"tidyverse"’, ‘"openxlsx"’, ‘"pbapply"’, ‘"mvtnorm"’ are not available (for R version 3.5.0) 

Stegen Case Study graph correction

Helloo, I noticed a little error in the case study Stegen on RECONLearn. There's a point at which you make a graph of age distribution by gender under "Graphical exploration", and then under "Going further" in the same section label the y axis "Number of cases". But these are not the cases, this is everyone, including cases and non cases. Looks a bit different for cases and non cases separately. Cheers! Savina

render_new_rmds_to_md() broken

At 970c33e after removing content/post/lecture-bag-of-slides.md

> learn::render_new_rmds_to_md()


processing file: lecture-bag-of-slides.Rmd
  |......................                                           |  33%
  ordinary text without R code

  |...........................................                      |  67%
label: options (with options) 
List of 1
 $ include: logi FALSE

  |.................................................................| 100%
  ordinary text without R code


output file: lecture-bag-of-slides.knit.md

/usr/bin/pandoc +RTS -K512m -RTS lecture-bag-of-slides.utf8.md --to markdown_github --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output lecture-bag-of-slides.md --standalone 

Output created: lecture-bag-of-slides.md
Error: [ENOENT] Failed to search directory '/home/thibaut/dev/recon/learn/content/post/lecture-bag-of-slides_files/figure-markdown_github': no such file or directory
> 

However it seems the md file has been produced and no temporary files are left in the folder.

png images in README generate error when serving site

I was re-adding some static images to the README.Rmd (screenshots of PRs), which might help github novices. I am surprised these generate the following error:

> blogdown::serve_site()

Attaching package: ‘testthat’

The following object is masked from ‘package:devtools’:

    setup

Building sites … ERROR 2018/06/06 17:20:45 Failed to read data from img/shot-fork.png/shot-fork.png: Data not supported for extension 'png'
ERROR 2018/06/06 17:20:45 Failed to read data from img/shot-pr-2.png/shot-pr-2.png: Data not supported for extension 'png'
ERROR 2018/06/06 17:20:45 Failed to read data from img/shot-pr.png/shot-pr.png: Data not supported for extension 'png'
Total in 117 ms
Error: Error building site: logged 3 error(s)
To stop the server, run servr::daemon_stop("140025127766648") or restart your R session
Serving the directory /home/thibaut/dev/recon/learn at http://127.0.0.1:3633

I could live without these screenshots, but I'd rather have them there if possible. Any idea what's going on?

mathjax partly broken

in the current version, inline math expressions using $ display normally, but anything with $$ is not rendered; I noticed mathjax.js is not in static/js but not loaded in any of the partials, where it used to be; may that be the origin of the issue? I'm not sure why only some expressions should be rendered though..

css style for code highlight missing

The css file for code highlighting is present in static/css/recon.css but I am not sure how this is now supposed to be used / called in the .Rmd files. It would either:

  1. be applied automatically to all syntax highlighting in all practicals
  2. be applied manually to individual Rmds, e.g. in the yaml header via
    css: path/to/recon.css

My preference goes to 1 (older behaviour) but if only 2 is possible, then it'd be nice to have a working example e.g. on content/post/practical-ebola-response.md
(I can apply changes to other documents)

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.