Closed donbowen closed 1 year ago
Here is the attempted code for minorities - we just need to change it based off of the variable html noted in the notebook. Also noted what each variable used was in this one. We can most certainly change which ones we want to use, but now we hopefully know how to. @donbowen could I join with zoom tomorrow? Should be able to join at 3:20ish. If not no worries I tried to write a lot of comments at the beginning of the MinoritiesMap notebook.
I've updated the todo-list with some extra comments.
@annakharv46 Good job re:map code. Vic had similar stuff on her branch and we were able to put together a working file on main.
CC: @esd223 @vrg223 @mromano224 @jum223 @XiaozheZhangLehigh @isaacgrodin @SebastianStoneham @tws223
@donbowen Professor Bowen, in the first step in my section, we need to merge banktract clean and census clean, do you mean the state_AZ_CA_mini and the census_clean? or you already did on as I see one called "bank_tract_clean_WITH_CENSUS"
@tws223 Did you finish the first task above?
@donbowen Professor Bowen, in the first step in my section, we need to merge banktract clean and census clean, do you mean the state_AZ_CA_mini and the census_clean? or you already did on as I see one called "bank_tract_clean_WITH_CENSUS"
@XiaozheZhangLehigh You're right, you can just use bank_tract_clean_WITH_CENSUS.csv
.
@donbowen Professor Bowen, I am just not sure what do you mean by majority poor to groupby. Here is what I did for the minority group, I do feel like we are looking for a similar table like this
Please replace your "bank_tract_clean_WITH_CENSUS.csv " file so that your code uses the latest and greatest. You can download it here.
@XiaozheZhangLehigh @isaacgrodin @SebastianStoneham @mromano224
data = data.eval('pct_White = Tot.WhitePop / Tot.Pop * 100,
pct_Black = Tot.BlackPop / Tot.Pop * 100,
pct_AmericIndian = Tot.AmericIndianPop / Tot.Pop * 100,
pct_Asian = Tot.AsianPop / Tot.Pop * 100,
pct_NativeHawaiianPacific = Tot.NativeHawaiianPacificPop / Tot.Pop * 100,
pct_OtherRaceAlone = Tot.OtherRaceAlonePop / Tot.Pop * 100,
pct_TwoOrMoreRace = Tot.TwoOrMoreRace / Tot.Pop * 100,
pct_TwoOrMoreRace(Some other race) = Tot.`TwoOrMoreRace(Some other race)` / Tot.Pop * 100,
pct_Hispanic/Latino = Tot.`Hispanic/Latino` / Tot.Pop * 100,
pct_NotHispanic/Latino = Tot.`NotHispanic/Latino` / Tot.Pop * 100
)
Everyone should create and work in new branches, so that you're working based on the current state of the folder. And your code files should be inside the "code" folder, naturally.
majorminority
groupby(majormin)[['var1','var2']].mean()
where the variables are the hdma based variables.