jlibman / a7-collaborative-coding Goto Github PK
View Code? Open in Web Editor NEWWorking HTML file: http://jlibman.github.io/a7-collaborative-coding/
Working HTML file: http://jlibman.github.io/a7-collaborative-coding/
Similarly to your first charting file, you'll write another function (in another file) that accepts a dataset as a parameter and returns a chart.
Once you've completed your project, create a gh-pages branch so that our final product can be posted on the web. Here's the syntax you'll want to use in your terminal:
# Get into your repository
cd YOUR-DIRECTORY-NAME
# Add and commit changes to your current (master) branch
git add .
git commit -m "Commit message goes in here"
# Create and checkout a new branch called 'gh-pages'
git checkout -b gh-pages
# Push all changes (including your new branch) up to GitHub
git push --all
`You should now see your index.html file up on the web at 'your-username.github.io/a5-github-report'.
The first file you should save in your scripts/ directory should contain a function that takes in a dataset as a parameter, and returns a list of information about it. For example:
A function that takes in a dataset and returns a list of info about it: info_function <- function(dataset) { ret <- list() ret$length <- length(dataset) # do some more interesting stuff return (ret) }
We don't expect you to write a generalizable function that detects rows/columns and asks questions of your dataset. Instead, think of this like a simple analysis you would do on this particular dataset, just wrapped in a function. This will allow you to pass your dataset into this function from your index.Rmd file.
Your index.Rmd file will be used to actually generate your report. However, it needs the functions written in other files in order to work (see below). To read in a function you've written in another file, you can use the source function. This is similar to using the library function, but with a file that you've written:
Read in functions from another file:
source("scripts/FILE-NAME.R")
In the Markdown document created, you should leverage the functions written in the other files to do the following:
Write a short summary paragraph that includes information calculated by your summary information function
Render your first chart
Render your second chart
In order to render those charts, you'll need to read in your data in your Readme.md file, and pass your data to those functions. You can read in the file from it's location in the repository (you don't need to copy the file to your repo):
Note, this have been moved to a public repo so you can read it without an access token:
data <- read.csv("https://raw.githubusercontent.com/INFO-498F/a7-survey-data/master/intro_survey_data.csv")
If it isn't clear how to these pieces fit together, reach out to your TA.
In your second .R file, you should write a function that takes in a dataset as a parameter, and returns a visualization of that data. This will allow you to call your charting function from your index.Rmd file, keeping your code much easier to read.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.