Giter Site home page Giter Site logo

headcount's Introduction

headcount's People

Contributors

brantwellman avatar theobtuseautodidact avatar jcasimir avatar joshcheek avatar

Watchers

James Cloos avatar  avatar  avatar

headcount's Issues

Parser Class

Takes in csv file - future needs data directory input. Create instance inside of parser inside DistrictRepo

Output - properly formatted data for DR class

This is functionally the DISTRICT Parser. Needs to be renamend

it2_statewide_objects

WIP
Created initial StatewideTest object and StatewideTestRepository objects. Initial tests started.

Going to store data on Statewide tests as @DaTa = hash.

Need to determine structure of data hash on the object before continuing.

EnrollmentRepository Cleanup

file assignment needs to be modified to accept full hash

Instance of parser may change depending on final parse

Tests look ok

statey_parser_b

New statewide parser.
Should be able to be adjusted to handle all 5 file types. Look at hashyhash method.
Includes truncated float values! - Move forward with this.
Deals with oddball values for data. Converts anything not a float to N/A. Will throw errors that we will need to deal with in future methods.

integrate_dr_with_swtest_objects

Create relationship layer between District Repo and Statewide Objects. Loading data to the DR will trigger the creation of a SWTRepo, SWTobjects, tie them with district objects

final_file_cleanup

Clean up files
Remove bindings
Remove comments
Remove running code at the bottom of files

Enrollment Parser

The parser needs to be finished/completed
Use headers to grab data instead of splitting on strings

Tests need to be written

Modify Parser Class

  1. Rename as DistrictParser Class
  2. Rename ParserTest to DistrictParserTest
  3. Change "split" method to use headers to access data => line[:Location], line[:Data], etc

district_rep_tests

Needs new tests to cover refactored methods and methods for statewide test repo objects

Enrollment Repository Class

Input - csv file (for now)
Methods -> find_by_name - case insensitive search
Creates instances of enrollments for each district name.

it0_tests

District could use more tests. High_school_grad data

District_rep - tests showing adding high school data

Enrollment parser - Needs 1 test for file_converter.
Rename NA method to nil. Needs test for convert_na - Nil functionality. and additional functionality - floats to strings

Enrollment - Test names need to be adjusted for not rounding
Kindergarten changed to Kgt_participation
Needs tests showing High school grad data

Create Relationship layer

  1. Creation of DR initiates creation of ER.
  2. ER automatically creates Enrollmnts
  3. Enrollments are placed in District objects when Districts are instantiated. Stored as instance variables inside each District as @enrollment

Cleanup District Repo Class

redefine file variable to accept full hash

create district call needs to change - this should be created from Enrollment collection. only need name.
After Districts are created....add enrollment instance varable to each district instance

Test class should be ok?

District Repository

Function - Collection Districs
Input - through dr.load_data(:key_value => csv file)
Creates Parser instance
sends file to parser - output
receives parsed data from Parser - format?
Iterates through collection creates new instance of district for each District name

find_by_name
find_all_matching

Enrollment class

An Enrollment instance holds the enrollment data for a single district

init like so:
e = Enrollment.new({:name => "ACADEMY 20", :kindergarten_participation => {2010 => 0.3915, 2011 => 0.35356, 2012 => 0.2677})

def kindergarten_participation_by_year
returns a hash of key: years and values: percentage

def kindergarten_participation_in_year(year)
returns percentage (fixnum)

District Class

district instantiates:
d = District.new({:name => "ACADEMY 20"})
def name

returns upcased string name of district

instances generated my district repo

enrollment_parser_truncate

Change enrollment parser to deal with truncation instead of rounding.

All tests will need to be adjusted as well in multiple files.

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.