Coder Social home page Coder Social logo

survey-reporting's Introduction

survey-reporting

a rmarkdown to generate automatic survey data reporting.

Starting with Docker

  1. Start with Steps 1-2 above
  2. Build Docker container: docker-compose.exe build
  3. Start Docker container docker-compose.exe up
  4. Open Jupyter Lab notebook by typing localhost:8888/lab/ in the browser. RStudio is avaliable at port 8787.

Overview

This folder repository contains tools and templates for creating Caltrans Styled PDF or HTML factsheets in R Markdown. Despite the RMarkdown filename, you can use this to create reports with Python, R, and Julia code.

We borrow heavily from the Urban Insitute guide and repo. For more information, read Iterated fact sheets with R Markdown and Iterated PDFs with R Markdown.

Getting started

LaTeX distribution

Creating PDFs with R Markdown requires a LaTeX distribution. In the past, this too often meant installing and maintaining the large and clunky MiKTeX. Fortunately, Yihui Xie created TinTeX, a custom LaTeX distribution based on TeX Live that is lightweight and can be managed in R.

Submit the following code in R to install TinyTex (full instructions here):

  install.packages(c("tinytex", "rmarkdown"))
tinytex::install_tinytex()

Note: If you installed MiKTeX in the past, uninstall it before installing TinyTex.

Use

preamble.tex contain settings and code to put R Markdown PDFs into the City of LA factsheet title.

  • To build the report in an Rstudio session, open report.Rmd and click "knit".
  • To build the report from the command line, run make report

If you a building an iterated report (ie, multiple sheets per LA City neighborhood), use the included iterate.R.

Iteration

The template (for example, simple-factsheet.Rmd) is iterated with the iterate.R script.

iterate.R takes an index, creates a data frame with outfile names and parameters, and iterates the template across each row of the data frame.

survey-reporting's People

Contributors

hunterowens avatar amymapsmith avatar

Stargazers

Elizabeth Sall avatar

Watchers

Kurtis Rainbolt-Greene avatar Elizabeth Sall avatar James Cloos avatar  avatar Vyki Englert avatar

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.