I was finally able to add two new columns to my data by using various try and for loops. Some of the data, rather than numbers, lists just a “d”, so I had to catch those and pass them in the except piece of a try and except. Figuring out the CSV module has taken a lot of my time, but I have learned a lot. I still haven’t finished up everything I planned to do for Tuesday, but I started thinking through what I had planned for Thursday. After providing numbers for five major categories for each county, the next set of rows provides specific county inflow or outflow information to that county. I’ll use the county destination code to use a startswith to find the needed rows. Luckily, what I had planned the last week is less busy than this week.
Milestones
Already Completed
- Create main menu with 5 options: main menu, using module data, add data, help, and exit
- Create functions for each of the 5 options
- Create while loop for cycling through options
- Handle bad file name input
- Allow user to select county
For Tuesday
- Handle bad input for selected county
- Create working function to calculate household size: Exemptions/Returns
- Create working function to calculate AGI per Return: (AGI * 1000)/Returns
- Find a method to print just inflow categories (US & Foreign; US; Same State; Different State; Foreign; Non-Migrants)
- Find a method to print just outflow categories (US & Foreign; US; Same State; Different State; Foreign; Non-Migrants)
- Calculate net migration information by subtracting inflow and outflow returns and exemption numbers
- Create working function to calculate AGI for net migration
- Print out numbers neatly for inflow, outflow, and net for selected county
For Thursday
- Devise method to find top three counties flowing into selected county that have a matching outflow counties
- Print out inflow, outflow, and net migration numbers for top three inflow counties with matching outflow counties
For Tuesday (4/25)
- Visualization for county net migration
- Visualization for top county inflow
Until 4/29
- Add Census API to bring in basic info about county (population, households, median income)
- Make sure code is clean, commented