Skip to content
Snippets Groups Projects
Commit 2288e9b8 authored by Oliver's avatar Oliver
Browse files

Diseases percentage for every SA2

parent c2d4491b
No related branches found
No related tags found
No related merge requests found
SA2_MAINCODE_2011,arthritis,asthma,circulatory_system_diseases,copd,diabetes_t2,high_cholestral,hypertension,respiratory_system_diseases
203021037,14.376249392911900,11.863531296319700,17.114506693711900,1.990333522577840,3.621095638401750,34.793751130116900,9.417185587778180,29.753269909522500
203021038,17.850005714571100,12.424971667568600,17.965641246159600,2.486118670115010,8.424310004142390,32.695682671664200,11.141735794677000,29.849253139366300
203021039,14.376249392911900,11.863531296319700,17.114506693711900,1.990333522577840,3.621095638401750,34.793751130116900,9.417185587778180,29.753269909522500
203021040,15.028217152628700,11.949927678527700,18.077309975269100,2.106186764005320,3.774885527578830,33.319508602319800,10.592554875264200,30.053010288722600
203021041,14.014443636654900,12.190387602835900,17.299746363249900,1.912487818572950,3.560774909601300,33.916075557681400,10.104466404033500,31.514887915895600
203021042,13.516038105989700,11.701240254232900,14.920308613104400,1.862033512745440,3.369331266826620,33.490201863957600,9.857636995138950,29.741695361315600
203021043,14.176736411799000,13.576412681341500,17.405070208312400,2.064392105098170,3.634842905704030,32.336646595673600,10.399339790514700,30.556354773469400
203021044,14.332261177539000,14.051666669796700,17.099565570455100,1.927442074984310,3.543657342285330,33.188829834364000,10.037590428433400,30.655580487610000
203021045,17.191095391626800,11.879944186774500,17.178226078097300,2.333891702885220,4.608792750831970,32.630190163140100,9.864856060915300,31.048807128769000
203021046,13.516038105989700,11.701240254232900,14.920308613104400,1.862033512745440,3.369331266826620,33.490201863957600,9.857636995138950,29.741695361315600
203021047,15.675617956451900,10.291516382732900,16.665330272057200,1.793627693401410,6.544821311966120,32.756211100741400,9.427819006125570,28.318053655321400
203031048,14.539261614377700,14.286567951702700,17.287016600565000,2.023675728523240,3.502428190863480,32.938410273072800,9.793956173292150,30.766962265104700
203031050,13.919878265919700,14.582845932213000,15.251895944219600,1.880614055353090,3.212177226916100,33.945876246168200,9.819857047991850,31.004171721514100
203031051,17.476708286944700,14.329079078803900,17.583716768913700,2.126711656660280,4.077092790558270,32.894743329299200,10.013222617315200,31.602591337793800
203031052,13.919878265919700,14.582845932213000,15.251895944219600,1.880614055353090,3.212177226916100,33.945876246168200,9.819857047991850,31.004171721514100
204011061,14.562402917968500,13.009023398393000,17.257903181334700,2.066774672039220,3.559479970440660,34.250436192464600,9.691076275002090,30.592328768164300
205011077,13.961741714841700,13.000410748005900,15.519580167890000,2.045831548430360,3.423188358372440,36.486009988042100,8.669851083532080,29.237963559934400
205011078,13.961741714841700,13.000410748005900,15.519580167890000,2.045831548430360,3.423188358372440,36.486009988042100,8.669851083532080,29.237963559934400
205031090,14.669407452505900,12.650047557496700,17.616275815349700,1.945568635978660,3.452643989035400,35.416314460207900,9.920466053404970,29.656181032288900
205041094,16.682022399212400,12.645427576464300,17.320198512981300,2.045786500940900,3.810987050407160,36.839470656997900,10.269349362976900,30.443263938008500
205041095,17.222016383865600,14.339052731221700,17.554654165797100,2.427476771510730,5.026729566722340,32.924335773216100,9.888302165199760,31.166319518772700
205041096,17.222016383865600,14.339052731221700,17.554654165797100,2.427476771510730,5.026729566722340,32.924335773216100,9.888302165199760,31.166319518772700
205041097,14.338234925664700,13.550501258690400,16.527028443767700,2.103926248917370,3.777632178013030,32.419654204450600,9.898534890515710,29.167012947707700
205041098,14.338234925664700,13.550501258690400,16.527028443767700,2.103926248917370,3.777632178013030,32.419654204450600,9.898534890515710,29.167012947707700
206021110,13.017653951837600,9.378824398851850,16.540156936760000,1.729575003245990,5.831483831560920,32.280882646267900,9.729080930968820,33.066435129472000
206021111,13.017653951837600,9.378824398851850,16.540156936760000,1.729575003245990,5.831483831560920,32.280882646267900,9.729080930968820,33.066435129472000
206021112,13.607202026564800,10.624098967719800,17.372378119418100,1.762388123900880,6.301701900777690,32.164560344186500,10.181261577838600,30.772339634014400
206071139,11.887086591773100,10.636318207561400,16.235096476715300,1.698303407451640,4.908314289323410,32.130385932897000,9.738800428616580,28.513069573123100
206071140,13.076741759486200,9.939637425157130,16.818179029188600,1.759218116906240,5.173174885408390,32.217763743197500,9.744160533569750,29.680528099834300
206071141,12.622448327288900,9.006184498939790,18.366365705982200,2.168374986878040,6.142721397154850,32.132882494393000,9.555319500430310,28.532676044360800
206071142,12.622448327288900,9.006184498939790,18.366365705982200,2.168374986878040,6.142721397154850,32.132882494393000,9.555319500430310,28.532676044360800
206071143,13.076741759486200,9.939637425157130,16.818179029188600,1.759218116906240,5.173174885408390,32.217763743197500,9.744160533569750,29.680528099834300
206071144,11.995682388394800,9.005692872818030,16.872313752635200,1.971666858524470,6.023124941523950,32.260946860755500,9.760016919329430,27.292551708120700
206071145,11.887086591773100,10.636318207561400,16.235096476715300,1.698303407451640,4.908314289323410,32.130385932897000,9.738800428616580,28.513069573123100
209021205,13.699652533410800,7.217199314919030,17.306030096015800,1.673206955774990,4.886169081660020,34.202431436151400,11.112430947470700,26.003883316888400
209021206,15.852271066433300,10.131079160215600,17.728049902162000,1.886345892218280,7.058511873059060,31.717006525798300,10.074729031679600,26.302117303902600
209021207,16.238956181157700,10.273461177317800,17.706446567181600,2.137683908177100,7.103536804811070,32.750514457995100,10.084873258535400,29.050310695097100
209021208,16.199114241516400,9.337111281378380,17.573762887008300,1.831584728301790,7.474769367124330,32.178993031752800,9.879020447175830,25.743270068661900
211011255,12.369535826810900,9.789153249289020,16.308518768789800,1.572762453019960,4.439441012800790,32.222009458799500,10.348458671853600,28.775609006389600
211021262,12.334205680564300,11.410891936312200,14.657464860462000,1.613080461829430,3.442352801402070,34.881858073545500,9.689208461635880,30.309199402925500
211051274,12.935443199769800,11.496548593346300,14.525755719903400,1.795129557071540,3.300868454308390,33.767347578276000,10.279983689094700,30.478768523807400
211051275,13.601121335064500,11.395066184682200,15.844250780928400,1.923588555394540,3.522334154318660,33.573044082435100,9.860024098406300,30.148236438409700
211051276,14.053358761897100,13.527046170942700,16.457906203833400,2.072679042152880,3.450453120135110,32.632412349626500,9.644627943917300,30.306681647586000
211051277,14.498060606852900,11.552616484768600,17.052270558282800,1.917754675049350,3.478610267776420,37.080322966577700,9.699014741888680,30.458270202084300
211051278,13.775590635942300,11.651663964641200,16.696472691387800,1.871215420871820,3.605446724248960,32.802908680479000,10.369250603407400,30.054993649687500
211051279,13.622161288243000,11.604883289425900,16.512875516943000,1.815501908373540,3.477070306076710,32.674973065842000,10.552980558697100,30.807004310243700
211051280,13.601121335064500,11.395066184682200,15.844250780928400,1.923588555394540,3.522334154318660,33.573044082435100,9.860024098406300,30.148236438409700
211051281,13.601121335064500,11.395066184682200,15.844250780928400,1.923588555394540,3.522334154318660,33.573044082435100,9.860024098406300,30.148236438409700
211051282,12.935443199769800,11.496548593346300,14.525755719903400,1.795129557071540,3.300868454308390,33.767347578276000,10.279983689094700,30.478768523807400
211051283,13.622161288243000,11.604883289425900,16.512875516943000,1.815501908373540,3.477070306076710,32.674973065842000,10.552980558697100,30.807004310243700
211051284,12.935443199769800,11.496548593346300,14.525755719903400,1.795129557071540,3.300868454308390,33.767347578276000,10.279983689094700,30.478768523807400
211051285,13.775590635942300,11.651663964641200,16.696472691387800,1.871215420871820,3.605446724248960,32.802908680479000,10.369250603407400,30.054993649687500
211051286,14.286670253098500,12.737479538200300,17.573847849527900,1.961068977114340,3.565386289207720,32.197053356248300,9.801821425848730,29.984491846881200
212011289,13.283324692569900,11.450435279242900,14.571520298902100,1.802390413572470,3.410016153135250,32.889938587005100,10.039746305378000,29.331357835301700
212041311,15.659355782026000,7.822862426286850,15.661461950759200,1.953004683851460,9.643488337611080,31.879830970664500,9.696922005906160,26.404491951139700
212041312,14.856834191013500,8.763300663588980,16.474810921146700,1.754142052283610,6.756548847049820,32.019228176415600,10.107073999105800,30.023333790448400
212041314,11.172071030494800,8.367091628149020,19.564201911977500,1.565329290844160,6.529302955271800,31.525140637815700,10.637960170607700,29.413438359596500
212041315,13.550098680792600,8.479155568132440,15.737056847047700,1.917481459921820,7.358617899375740,32.084808567718900,9.751512958858400,26.489611755061600
212041316,14.856834191013500,8.763300663588980,16.474810921146700,1.754142052283610,6.756548847049820,32.019228176415600,10.107073999105800,30.023333790448400
212041317,12.944198759805600,6.844007638722860,17.677256817741500,1.711160721650980,10.803141288035400,32.136140020325900,10.058605750637300,26.771557347159200
212041318,12.944198759805600,6.844007638722860,17.677256817741500,1.711160721650980,10.803141288035400,32.136140020325900,10.058605750637300,26.771557347159200
213021341,13.486924100619500,11.084781340243200,17.575601109787800,2.044792888556410,3.900442186439220,33.244027680670200,9.206190362697830,32.517264952707200
213021342,14.995817577553500,9.779328036361760,16.806960549124900,1.742079451032400,6.084182949864540,32.542150750634600,10.395675096109200,29.900200584488500
213021343,16.056559868098200,6.926233012198640,17.887012805263500,1.839041166423440,7.520694509191100,31.917482087309200,9.876609194170450,28.679717157918900
213021344,12.965321923825700,11.792959854638700,16.696785811640800,1.850606319586770,5.055747750234720,32.552992528001100,9.620785650485650,32.749410100926100
213021345,12.488404707052700,9.890966401969610,19.084611535881200,1.713595478812370,5.719305802262560,31.957498404220400,10.611748587165600,30.890879974452400
213021346,12.965321923825700,11.792959854638700,16.696785811640800,1.850606319586770,5.055747750234720,32.552992528001100,9.620785650485650,32.749410100926100
213031347,13.843459957499000,8.624808435261200,19.826357359163200,2.086602968810200,8.895887623776490,32.288258912837500,10.252619001506300,24.204697737530000
213031348,11.955179228855500,7.771686293107790,17.547319619129800,1.750646696391470,6.670565513472870,32.229116441253200,9.489436058338920,24.155404216501000
213031349,11.436195540197000,7.114287230000480,19.165438527958200,1.540436561598520,6.016662443915470,32.009607576372100,10.247325219768100,24.998536953878500
213031350,12.557119380792000,11.075759494098700,17.289087939051300,1.763780014611720,6.014059982444300,32.026627131811900,9.996570408365330,27.109923392290100
213031351,11.955179228855500,7.771686293107790,17.547319619129800,1.750646696391470,6.670565513472870,32.229116441253200,9.489436058338920,24.155404216501000
213031352,12.557119380792000,11.075759494098700,17.289087939051300,1.763780014611720,6.014059982444300,32.026627131811900,9.996570408365330,27.109923392290100
213051363,16.101488791781200,9.075590274996890,16.683330523085600,2.062445134008670,7.762244147257760,32.433721983881400,10.769097691749100,25.350557009800500
import pandas as pandas
df = pandas.read_csv("SA2_diseases_percentage_vic.csv", dtype = "string")
sa2s = set(pandas.read_csv("SA2_to_LGA.csv", dtype = "string")["SA2_MAINCODE_2011"].unique())
df = df[df["area_code"].isin(sa2s)]
df = df.drop("area_name", axis = 1)
df = df.rename(columns = {"area_code": "SA2_MAINCODE_2011", "arthritis0": "arthritis", "asthma_me0": "asthma",
"circ_me_2_": "circulatory_system_diseases", "copd_me_2_": "copd", "diabetes_0": "diabetes_t2", "hg_choles0": "high_cholestral",
"hypertens0": "hypertension", "respirtry0": "respiratory_system_diseases"})
df = df.sort_values(["SA2_MAINCODE_2011"])
df.to_csv(path_or_buf = "SA2_DISEASES.csv", index = False)
\ No newline at end of file
...@@ -5,7 +5,7 @@ df = pandas.read_csv("2011_SA2_to_LGA_vic.csv", dtype = "string") ...@@ -5,7 +5,7 @@ df = pandas.read_csv("2011_SA2_to_LGA_vic.csv", dtype = "string")
# Keep only Victorian LGAs # Keep only Victorian LGAs
#df = df[df["LGA_CODE_2011"].str[0] == "2"] #df = df[df["LGA_CODE_2011"].str[0] == "2"]
# Only ones in AQ_to_LGA.csv # Only ones in AQ_to_LGA.csv
lgas = set(pandas.read_csv("AQ_to_LGA.csv", dtype = "string")["LGA_CODE"].unique()) lgas = set(pandas.read_csv("AQ_to_LGA.csv", dtype = "string")["LGA_CODE_2011"].unique())
print(lgas) print(lgas)
df = df[df["LGA_CODE_2011"].isin(lgas)] df = df[df["LGA_CODE_2011"].isin(lgas)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment