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
- 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)
For Thursday
- Create working function to calculate AGI for net migration
- Create working function to calculate household size: Exemptions/Returns
- Create working function to calculate AGI per Return: (AGI * 1000)/Returns
For Tuesday (4/25)
- 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
- Calculate net migration information by subtracting inflow and outflow returns and exemption numbers
- Print out numbers neatly for inflow, outflow, and net for selected county
- 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