Data mining voter data - Import data from a CSV file or excel file into mysql using PHP front end.
Data mining required:? Ranking the? voters based on past election data.? ? Combine user and data.? Data multiplication, filtering, sorting and exporting data in to csv, ? excel or labels for printing.
Stats of import and Ranking
? First import data from a CSV or Excel file in to mysql using PHP front end.
Second I want to the application to detect the election dates based on the user selecting which field is the election date field.? The user then selects what past election dates to use and then rank the voters.?
Ranking system reports
? Report 1 (Recent voting activity)
? Ranking is based on:
How many total times the user has voted over the dates selected. Starting from the most recent
For example say there were the following elections selected
May 6, 2008
May 2, 2006
July, 20, 2004
September 10, 2002
Person A voted in May6, 2008 and July 20, 2004 but not in any of the others.
Person B voted in May6, 2008, May2, 2006 but not in any of the others.
Person C voted in All.
Person D voted in September 10, 2002 and July 20, 2004, but none of the others
Person E voted in May6, 2008, May2, 2006, July, 20 2004 but not in any of the others.
Person F Voted May 6, 2006 only
Person G Voted May 2, 2006, July 20, 2004, and September 10, 2002
Person H Voted May 6, 2008, July 20, 2004 and September 10, 2002
Person I Voted May 6, 2008, September 10, 2002
Rules for calculations
1. ? People who voted most frequently form the consecutive date total get a higher rating.
2.? People who have not voted recently or have skipped get lower ratings.
Details ? scoring:
Total of 100 points
Maximum points for voting (in this example) in 1 election is ??" 25 (100 points / 4 election dates)
if you voted consecutively then you get the full 25 points. starting from latest date to oldest date. ?
If you didn’t vote consecutively then you subtract 20% of total point each time you missed for the 1st one
If you didn’t vote in the latest election then you subtract 30% of the total points.
If you didn’t vote for 2 consecutive elections then subtract 30%.for the second one and any other ones that are consecutive.
Person gets zero if there are not election inbetween (i.e. they didn’t vote or were not registered will give sample xls) ?
In the above example I would expect the ranking as follows
Person C - Total points 100
Person E - Total points 75
Person G ??" Total Points 67.5
Person B - Total points 50
Person A - Total Points 45
Person D - Total points 35
Person F - Total points 25
From the results:? Select how many records (i.e. I want to top 1000, or anyone with some score(i.e ? 76% or higher) or voters from only a specifc zip code or Precinct? )
? I need to view the results, edit records, search, delete sort by multiple fields (ranking, last name, street), Select what fields to export and the order.? Export to xls or cvs. Or labels. Remove first time voters (must check registration date to election dates)
? I need to be able to specific from the data imported what fields are which to do this data analysis.? For example say what field is the election dates. Registration date, mailing address, City, state, zip, voting type (in-person, poxy, etc) voting Precinct, etc..
Note: on importing the data 1 person will have 1 record per day they voted…
On import user must select if they want duplicate records or skip.? Let user determine what field to use to determine duplicate records.? Default is the combine field “ Last,First,Middle??? but user should be allowed to pick which filed to use.
User should be able to update text case ??" Normal all data is in upper case.? Cases to support
- all upper Case
-First letter of each work upper (Example “122 Home Street??)
- Just First Letter upper Case (Example “122 Home street??)
-All lower Case
Need ability to separate the combine field in to First, Middle, fields and imported data.
Need ability to search imported database, edit, delete or add records
Must have error logs and tell users number of records in the databases and when listing results.
Must provide install scripts to setup MYSQL through PHP scripts.? Users should input basic information about the mysql server (admin user name, password, dbasename) setup should create any tables, etc.. for a clean install…
You must log in to use site
Need 3 types of tusers:?
Admin area - Can do anything
Power user - Can view, edit and delete, but can no go in to Admin area.
User - Can do view, run reports, etc.. but can not delete or modify.
? On the delete I will need the ability to delete more that one at a time....? For example I might search on street, last name etc.. and Would want to go through the list and select which ones to delete.
Other items to note:
there are 2 types of duplicate records?
? -Exact same data in the record
Second Type:? (this is needed to determine the ranking)
? -The data is mostly the same except the “Election Date??? ?
The one thing I want to protect against is when you are ranking/scoring the people that we don’t give someone a higher score because a duplicate record (type 1).? ? I will? need some function to insure that we could review the dups and remove all type 1.? (this can be done at imports or post import.?
Under admin I need a function that deletes all records on the mysql side. To start with a blank database...?