Context Diagram & System Design Specification Document Assignment

Your Week 3 Assignment has two required parts: (1) to make a context diagram, and (2) to create and complete the System Design Specification document for your project.

Part 1 :

  1. Use a tool to make a context diagram, there are tools such as Lucidchart and others in the market for making a diagram.
  2. Develop a Context Diagram for the case system using Lucidchart or another to create the context diagram.
  3. Criteria: Full credit for use of the appropriate shapes, with appropriate labeling on the shapes and the lines.
  4. Take a screenshot of your diagram, and paste it into a Word document.

Part 2 :

  1. Create your project’s System Design Specification document. You may conduct research to find a template or use a blank Word document.
  2. Criteria: Complete the System Design Specification document for your project.
  3. Include:
  4. title page,
  5. project name,
  6. table of contents,
  7. references, and
  8. detailed information about each component listed in your table of contents.
  9. Also, include the Context Diagram form Part 1 at the end of your System Design Specification document.

Python Code

Question 1 (10 points)

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Find the sum of all the multiples of 3 or 5 below 1000.

Do this using 2 methods.

  • Explicility testing if 3 or 5 is a divisor inside the comprehension.
  • Using a udf called inside the comprehension to test if 3 or 5 is a divisor.

Print the resulting sum each time.

Question 2 (10 points)

The below snippet of code will download daily closing prices for SPY, which is an ETF that tracks the price S and P 500.

Using a for loop and enumerate, create a list of 5 period moving averages. For instance, the first 5 values of the list are [321.56, 319.12, 320.34, 319.44, 321.14] and the average is 320.32. This means the first entry in our new list would be 320.32.

Make your own udf to calculate the mean and use this in the for loop.

Print last 5 items of the list and the sum of the list of 5 period moving averges.

In [89]:

import yfinance as yf
SPY = yf.download('SPY')
SPY = yf.Ticker('SPY')
spy_lst = SPY.history(start="2020-01-01", end="2020-02-01")["Close"].tolist()
print(spy_lst[0:5])
print(sum(spy_lst[0:5])/5)
[*********************100%***********************]  1 of 1 completed
[321.56, 319.12, 320.34, 319.44, 321.14]
320.32

Question 3 (10 points)

Consider the list of transactions, where each inner list item is a line item on a recipt. For instance, the first inner list ["A", "item_a"] indicates "A" bought "item_a". Iterate the list and return a dictionary where the key is the user id (A, B, C, D) and the values are a list of items the user bought.

The desired output for "A" can be seen in the sample_dct.

Do not include the first item in the list, ["User", "Item"], which can be considered a header.

Be sure your solution is scalable, meaning it should be sustainable for a list of transactions of any size.

Print the dictionary out at the end.

In [13]:

transactions = [
   ["User", "Item"],
   ["A", "item_a"],
   ["B", "item_a"],
   ["C", "item_a"],
   ["C", "item_b"],
   ["C", "item_c"],
   ["B", "item_c"],
   ["D", "item_b"],
   ["D", "item_b"]
]
sample_dct = {
   "A": ["item_a"]
}

Question 4 (10 points)

A string can be sliced just like a list, using the bracket notation. Find the 3 consecutive numbers and their index positions that have the greatest sum in the number 35240553124353235435234214323451282182551204321.

As an example, the the string "1324" has 2 three number windows, 132 and 324. The first sums to 6 and the later sums to 9. Thus the 3 numbers would be [3,2,4] and the indices would be [1,2,3].

Print out the 3 numbers, the 3 indices where they occur and their sum.

In [14]:

sample = "1324"
# results should be
numbers = [3,2,4]
max_val = 9
index_vals = [1,2,3]

In [15]:

a = "35240553124353235435234214323451282192551204321"

Quesiton 5 (15 points)

The sum of the squares of the first ten natural numbers is

  • 1^2 + 2^2 + … + 10^2 = 385

The square of the sum of the first ten natural numbers is

  • (1 + 2 + … + 10) = 3025

Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is

  • 3025 – 385 = 2640.

Write a function, or collection of functions, that find the difference between the square of sums and sum of squares from 1 to n. Note, to solve the problem you have to:

  • find the sum of squares
  • the square of sums
  • the difference

This can be broken up into smaller functions, with one function making use of the smaller ones, or all be done in one function.

Add an assert statement to your function, to make sure the input is a positive int.

Test the function using n=12 and n=8 and print the results.

Question 6 (20 points)

Make a function, or group of functions, to find outlier datapoints in a list. The outlier should be based on the standard deviation, giving the user some ability to control the outlier threshold. For instance, setting 2 standard deviations or 3 from the mean should be possible. Note, to solve this problem you will have to:

  • find the mean of a list
  • find the standard deviation fo a list
  • convert the list of zscores using (x-mean)/std
  • find the indices of where the outlier datapoints are, using the zscores
  • return the outlier values and the indicies they occur at.

Test your data using the below stock price data for TSLA. Keep the same data range as is coded in below.

The standard deviation can be calculated as such (https://numpy.org/doc/stable/reference/generated/numpy.std.html):

  • std = sqrt(mean(abs(x - x.mean())**2))

Print out the average, standard deviation, outliers and the index position of where the outliers occur.

Again, this can be done in one big function or a collection of smaller ones that are then used inside a final function to find the outliers.

NOTE: ASIDE FROM CHECKING WORK, THE ONLY PIECE OF IMPORTED CODE TO BE USED IS sqrt from math and the imported data from yfinance.

In [73]:

import yfinance as yf
from math import sqrt
TSLA = yf.download('TSLA')
TSLA = yf.Ticker('TSLA')
tsla_lst = TSLA.history(start="2019-01-01", end="2020-04-01")["Close"].tolist()
[*********************100%***********************]  1 of 1 completed

Question 7 (25 points)

Make a class to profile a list of data. Include methods to do the below:

  • Initialize and create an attribute data that is a list of data.
  • Converts the list to a zscore scale. Note, no data is returned here, instead is bound to the class using self and overrides the value of the data attribute.
  • Returns an n period moving average.
  • Returns an n period cumulative sum.
  • Returns the standard deviation.
  • Returns the range as a tuple.
  • Returns the mean.
  • Returns the median.

The standard deviation can be calculated as such (https://numpy.org/doc/stable/reference/generated/numpy.std.html):

  • std = sqrt(mean(abs(x - x.mean())**2))

Zscore conversions can be checked using the below:

Test a few of your methods on the SPY data from yfinance above.

NOTE: ASIDE FROM CHECKING WORK, THE ONLY PIECE OF IMPORTED CODE TO BE USED IS sqrt from math and the imported data from yfinance.

Mining

 

Using search engines, find two different recent  articles involving data mining. Describe the role of “data mining” in  the story using your own words.

Here is an example of an article:

12:00 AM, January 07, 2018 / LAST MODIFIED: 12:00 AM, January 07, 2018 New police unit to check cyber crime
Social media users to face stringent watch; police can detect users quickly 

Be sure to cite your sources.  Initial posts should contain at least one APA reference and associated in-text citation.

DS-3

In 500 words or more, discuss the risk and costs of compromised data integrity breaches. Focus on integrity not confidentiality. Look at military, education, science, medicine, finance, utilities, municipalities, etc.

Use at least three sources.  Use the Research Databases available from the Danforth Library, not Google.   Include at least 3 quotes from your sources enclosed in quotation marks and cited in-line by reference to your reference list.  Example: “words you copied” (citation) These quotes should be one full sentence not altered or paraphrased. Cite your sources using APA format. Use the quotes in your paragaphs.

Write in essay format not in bulleted, numbered or other list format. 

Reply to two classmates’ posting in a paragraph of at least five sentences by asking questions, reflecting on your own experience, challenging assumptions, pointing out something new you learned, offering suggestions. These peer responses are not ‘attaboys’.   

It is important that you use your own words, that you cite your sources, that you comply with the instructions regarding length of your post and that you reply to two classmates in a substantive way (not ‘nice post’ or the like).  Your goal is to help your colleagues write better. Do not use spinbot or other word replacement software. Proof read your work or have it edited. Find something interesting and/or relevant to your work to write about. Please do not submit attachments unless requested.

Data collection technique

Background: As noted by Kirk (2016), working with data is one of the four stages of the visualization workflow.  According to Kirk (2016), “A dataset is a collection of data values upon which a visualization is based.” In this course, we will be using datasets that have already been collected for us. Data can be collected by various collection techniques.

Reference: Kirk, Andy. Data Visualisation: A Handbook for Data Driven Design (p. 50). SAGE Publications.

Assignment: Summarize 3 data collection techniques (Interviews, Surveys, Observations, Focus Groups, etc.). Compare and contrast the 3 data collection techniques you selected. Lastly, what collection techniques do you prefer and why?

Your research paper should be at least 3 pages (800 words), double-spaced, have at least 4 APA references, and typed in an easy-to-read font in MS Word (other word processors are fine to use but save it in MS Word format). Your cover page should contain the following: Title, Student’s name, University’s name, Course name, Course number, Professor’s name, and Date.

Briefly respond to all the following questions. Make sure to explain and backup your responses with facts and examples. This assignment should be in APA format and have to include at least two references.

 

System  architecture is the descriptive representation of the system’s  component functions and the communication flows between those  components.  

My definition immediately raises some important questions. 

• What are “components”? 

• Which functions are relevant? 

• What is a communication flow?   

research writing

 1) Write and submit a paper on the topic “Cryptography and the Internet of Things” 2) The submission should be written in IEEE Proceedings Manuscripts style: two columns, single-spaced. You may find a template file at URL: http://www.ieee.org/web/publications/authors/transjnl/index.htm1. It should not be more than 2 pages long (including references and figures) and should contain an Abstract, Introduction, Main Body and Conclusion section at the minimum. 3) Anyone who reads the paper should be able to find answers to the following questions. a. What is the Internet of Things (IoT) and how does it change the dynamics of security in cyberspace? b. What are the classes of devices that run on the IoT and what are their security needs? c. What are lightweight cryptographic algorithms and why are they needed in the IoT space? d. What are the classes and approaches for creating lightweight cryptographic algorithms? e. How to evaluate lightweight cryptographic algorithm? Provide a brief evaluation of at least 3 lightweight cryptographic algorithms. 4) Your paper should also have a. At least 4 references b. At least 2 of the following, a graph, a table or a figure. If you choose to include a graph or a figure you must create them yourself. Do not copy images directly from another source 5) Copying the sentences directly from your references or other sources into your paper is plagiarism. Ensure that you write your paper using your own words. 6) Your submission will be judged based on the following criteria: Format/Organization Content Clarity Technical Depth Originality