Module 5

Beginner:

This is one of two homework assignments you can complete for this week (you must do two, you may do all three for extra credit). This is geared towards those of you who have never worked with javascript before. Your assignment should be in the form of an HTML page, which I will be able to run locally. Refer to the file ‘js_in_webpage.html’ on the github page for instructions on setting up javascript to run on an HTML page, and how to run/debug. You should complete both of these in 2 (or more) functions on one HTML page

(1) Create a function to reverse any word that you type in.

This can be typed into either an input box or an alert box, and then print the result in a box or on the webpage.

(2) Create a function that takes an input number, and prints a table with the first 20 multiples of the number, in order 5x4

example: type in 2 and it results in:
2 4 6 8
10 12 14 16
18 20 22 24
26 28 30 32
34 36 38 40

Intermediate:

This is one of two homework assignments you can complete for this week (you must do two, you may do all three for extra credit). This is geared towards those of you who have have worked with javascript before. Your assignment should be in the form of an HTML page, which I will be able to run locally. Refer to the file ‘js_in_webpage.html’ on the github page for instructions on setting up javascript to run on an HTML page, and how to run/debug. You should complete both of these in 2 (or more) functions on one HTML page

Write a function to load the presidents.csv data and display the data as an html table

(you may use a cdv parser from any available library, though I encourage you to try the d3 one). Now that you have the presidents data loaded, write a function that will return that president’s height & weight when you type it in. This can be typed into either an input box or an alert box, and then print the result in a box or on the webpage. Deployment: Your apps from parts 1 and 2 must be deployed. There are a lot of options for deploying javascript apps, however I would recommend using github pages. Read more about how github pages work here: https://pages.github.com/

SOLUTION APPROACH

  1. Used Brackets to create html file (with Javascript) that met the assignment requirements
  2. Used GitHub Pages to deploy the html file on my GitHub.io account
  3. Used Shiny HTMLTemplate functionality to render the HTML page
  4. Used Rpubs to deploy

Shiny Server

CUNY : DATA 608 - Module 5

Part 1 - Beginner:

1. Reverse A String

Please Enter A Word/Sentence And Click GO!



2. First Twenty Multiples

Please Enter A Number And Click G0!:



Part 2 - Intermediate:

Presidents CSV File

Enter President Name: