Natasha's Project Update 2

by Natasha Vazquez

15 Jun 2017

Here is my updated trinket:

Since last class I completed the analysis three skeleton code. However, I then decided to go for my stretch goals of allowing multi-region analysis for both percent change and descriptive stats. Being able to successfully implement those, I decided to merge what I had previously defined as analysis two and analysis three so that it’s just one menu option. I was also able to create a custom class (really a class extension of lists) that was helpful in cleaning up my code a bit. Here’s a snapshot of what I have in my custom class so far:

class Data():
  def __init__(self, data):
    self.data = data
  
  def printData(self):
    print(self.data)
  
  def showData(self):
    for i in range(len(self.data)):
      print("\t \t".join(self.data[i]))
  
  def getMaxNum(self):
    var_max = max(self.data)
    return var_max
  
  def append(self, a_value):
    self.data.append(a_value)
  
  def getMinNum(self):
    var_min = min(self.data)
    return var_min
    
  def getAverage(self):
    avg = round(sum(self.data)/len(self.data),2)
    return avg

So far, it looks like I’m on pretty much on time with all my milestones. Moving forward, I still think my major roadblock will be time, and I’d also like to test my program against a third data set to ensure it can really do what I think it can. My goal with the program is for it to be really flexible to support analysis for different types of data as long as regions (or region-like levels of analysis) and years (or other types of time series).

Here’s my updated milestone list:

Already achieved

  • read user file (csv format)
  • read headers in user file
  • pull relevant variable based on user input (based on file headerss)
  • create menu for 3 analysis options
  • create analysis one skeleton code
  • menu/user instructions
  • accept user input for necessary information
  • present available regions from data
  • present available years from data

To be achieved by Wednesday:

  • present available variables from data
  • create analysis two skeleton code
  • create analysis three skeleton code

To be achieved by Monday:

  • create visualization for analysis one

To be achieved by Tuesday:

  • create visualization for analysis two
  • create visualization for analysis three
  • incorporate regular expressions to allow flexibility on user input

Stretch goals:

  • implement capability to do multi-region analysis for percent change
  • make the descriptive statitics analysis flexible to compute either one region or multiple regions so it can be one menu option
  • allow percent change (analysis one) to be computed at the intervening intervals between the user’s chosen end and start date
Natasha is an MS student in information science at UNC Chapel Hill and a public health analyst in the Center for Communication Science at RTI International. She likes traveling and beer-ing. Find Natasha Vazquez on Twitter, Github, and on the web.