""" Spyder Editor This is a temporary script file. """ # Imports import pandas as pd import deutils as de import numpy as np # weights Sparta_Core = 'WghtUniversal_Core' # Read DE16 data de16 = de.read_sparta_survey(7) de16_meta = de.meta(7) # CR_DEVCNT2 for DE16 cr_devcnt2_16 = de.dist(de16, de16_meta, 'CR_DEVCNT2', 'WghtUniversal_Core') cr_devcnt2_16.to_clipboard() # Professionals - what do you think? # Filter on any dev who is professional in at least one sector de16['Prof'] = (de16[[ 'CR2b_1_1', 'CR2b_2_1', 'CR2b_3_1', 'CR2b_4_1', 'CR2b_5_1', 'CR2b_6_1', 'CR2b_7_1', 'CR2b_8_1', 'CR2b_9_1', 'CR2b_10_1' ]].any(axis=1)).astype(float).replace(0, 2) pros_only = de.dist(de16[de16.Prof == 1], de16_meta, 'CR_DEVCNT2',
Spyder Editor This is a temporary script file. """ # Imports import pandas as pd import deutils as de import numpy as np # weights Sparta_Core = 'WghtUniversal_Core' ################## # Read DE16 data de16 = de.read_sparta_survey(7) de16_meta = de.meta(7) ################## #Crosstab all devs geographical regions against development area regions=de.crosstab(de16, de16_meta, 'RegionCode8','CR2a', 'WghtUniversal_Core') regions.to_clipboard() #Crosstab professionals only in geographical regions against development area de16['Prof'] = (de16[['CR2b_2_1']].any(axis=1)).astype(float).replace(0,2) regions=de.crosstab(de16[de16.Prof==1], de16_meta, 'RegionCode8','CR2a', 'WghtUniversal_Core') regions.to_clipboard()
Granny-Clanger:~ stichbury$ /Users/stichbury/anaconda/envs/py3/bin/spyder ; exit; This is a temporary script file. """ # Imports import pandas as pd import deutils as de import numpy as np # weights Sparta_Core = 'WghtUniversal_Core' # Read DE15 data de15 = de.read_sparta_survey(6) de15_meta = de.meta(6) # Read DE14 data de14 = de.read_sparta_survey(5) de14_meta = de.meta(5) # Read DE13 data de13 = de.read_sparta_survey(4) de13_meta = de.meta(4) #GAM1: What types of platform do you develop games for? gam1 = de.dist(de15, de15_meta, 'GAM1', 'WghtUniversal_Game') gam1pc = de.calc_pct(gam1) gam1pc.to_clipboard()
Spyder Editor This is a temporary script file. """ # Imports import pandas as pd import deutils as de import numpy as np # weights Sparta_Core = 'WghtUniversal_Core' ################## # Read de14 data de14 = de.read_sparta_survey(5) de14_meta = de.meta(5) ################## #Non professionals de14['nonprof'] = (de14[['CR2_2_2', 'CR2_2_3']].any(axis=1)).astype(float).replace(0, 2) npros_only = de.dist(de14[de14.nonprof == 1], de14_meta, 'MOB4', 'WghtUniversal_Mob') npros_onlypc = de.calc_pct(npros_only) npros_onlypc.to_clipboard() # Mobile professionals only de14['Prof'] = (de14[['CR2_2_1']].any(axis=1)).astype(float).replace(0, 2) pros_only = de.dist(de14[de14.Prof == 1], de14_meta, 'MOB4', 'WghtUniversal_Core')
Spyder Editor This is a temporary script file. """ # Imports import pandas as pd import deutils as de import numpy as np # weights Sparta_Core = 'WghtUniversal_Core' ################## # Read de15 data de15 = de.read_sparta_survey(6) de15_meta = de.meta(6) ################## #Non professionals de15['nonprof'] = (de15[['CR2_2_2', 'CR2_2_3']].any(axis=1)).astype(float).replace(0, 2) npros_only = de.dist(de15[de15.nonprof == 1], de15_meta, 'MOB2', 'WghtUniversal_Mob') npros_onlypc = de.calc_pct(npros_only) npros_onlypc.to_clipboard() # Mobile professionals only de15['Prof'] = (de15[['CR2_2_1']].any(axis=1)).astype(float).replace(0, 2) pros_only = de.dist(de15[de15.Prof == 1], de15_meta, 'MOB_POP2', 'WghtUniversal_Core')
@author: stichbury """ # Imports import pandas as pd import deutils as de import numpy as np # weights Sparta_Core = 'WghtUniversal_Core' ################## # Read de13 data de13 = de.read_sparta_survey(4) de13_meta = de.meta(4) ################## #MOB3: What programming languages? mob3 = de.dist(de13, de13_meta, 'MOB3', 'WghtUniversal_Mob') mob3pc = de.calc_pct(mob3) mob3pc.to_clipboard() # Mobile professionals only de13['Prof'] = (de13[['CR2_2_1']].any(axis=1)).astype(float).replace(0,2) pros_only = de.dist(de13[de13.Prof==1], de13_meta, 'MOB3', 'WghtUniversal_Core') pros_onlypc = de.calc_pct(pros_only) pros_onlypc.to_clipboard()
Granny-Clanger:~ stichbury$ /Users/stichbury/anaconda/envs/py3/bin/spyder ; exit; @author: stichbury """ # -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ # Imports import pandas as pd import deutils as de import numpy as np # weights Sparta_Core = 'WghtUniversal_Core' ################## # Read de14 data de12 = de.read_sparta_survey(3) de12_meta = de.meta(3) ################## # CR6: experience levels over survey cr6 = de.dist(de12, de12_meta, 'CR6', 'WghtUniversal_Core') cr6_pc = de.calc_pct(cr6, pct_type='row') cr6_pc.to_clipboard()