Stats

The stats object used for fetching information about full segments of egytech.fyi user data rather than individual responses.

egytech_api.core.Stats(egytech_api.models.StatsQueryParams)

Attributes

Name
Type
Description
Allowed Values

title [Optional]

string

The job title of requested participants.

['ai_automation',

'backend',

'crm',

'data_analytics',

'data_engineer',

'data_scientist',

'devops_sre_platform',

'embedded',

'engineering_manager',

'executive',

'frontend',

'fullstack',

'hardware',

'mobile',

'product_manager',

'product_owner',

'research',

'scrum', 'security',

'system_arch',

'technical_support',

'testing',

'ui_ux']

level [Optional]

string

The career level of requested participants.

['c_level',

'director',

'group_product_manager',

'intern',

'junior', 'manager',

'mid_level',

'principal',

'senior',

'senior_manager',

'senior_principal',

'senior_staff',

'staff',

'team_lead',

'vp']

min_yoe [Optional]

integer

The minimum years of experience for participants to be included in the query results.

Integer between 0 and 20

max_yoe [Optional]

integer

The maximum years of experience for participants to be included in the query results.

Integer between 1 and 26.

gender [Optional]

string

The gender of participants included in the query results.

['male',

'female']

cs_degree [Optional]

boolean

Whether the included participants have a computer science degree or not.

True, False

business_market [Optional]

string

The market scope of the included participants' companies.

['global',

'regional',

'local']

business_size [Optional]

string

The size of the included participants' companies.

['large',

'medium',

'small']

business_focus [Optional]

string

The primary business focus of the included participants' companies.

['product',

'software_house']

business_line [Optional]

string

The business line the participants' companies operate in.

['b2b',

'b2c',

'both']

include_relocated [Optional]

boolean

Include participants who have relocated.

True, False

include_remote [Optional]

boolean

Include participants who work remotely for companies abroad.

True, False

programming_language [Optional]

string

Include participants with knowledge of the following programming language.

['java_script',

'type_script',

'python',

'c_sharp',

'java',

'php',

'c_cplusplus',

'kotlin',

'swift',

'dart',

'go',

'r',

'scala',

'rust']

Note: Attribute ordering on instance creation doesn't matter. Although not recommended, a dictionary can also be used instead of attributes to create a Stats instance.

Note: The supported values for query parameters in the API call differ with cs_degree vs include_relocated and include_remote. Allowed user inputs are boolean, as all of them have 2 possible values. At pydantic model serialization level (the step that produces the dictionary to-be-used for the API call query parameters), this is fixed and only egytech fyi api-supported values are used.

Methods

get_stats()

Returns a python dictionary of the aggregated results from the fetched data.

Parameters

No parameters

Returns

Type
Description

dict

A dictionary of the aggregated data from the results of the API Call.

get_df()

Returns a pandas.DataFrame instance of the fetched bucket data.

Parameters

No parameters

Returns

Type
Description

A pandas.DataFrame instance containing the fetched data as one row per fetched bucket.

save_csv(filename: str)

Parameters

Name
Type
Description
Example

filename

str

The name of the .csv file to dump the fetched bucket data in (without extension). No extension is needed explicitly as it's added during the file-saving process.

"my_awesome_data"

Returns

None

This method is simply a placeholder for the pandas.DataFrame.to_csv() method. It simply saves the generated pandas.DataFrame instance to a .csv file and excludes the index. You can customize your own function parameters for this by simply calling the get_df() method, and manipulating the resulting pandas.DataFrame as you want.

save_excel(filename: str)

Parameters

Name
Type
Description
Example

filename

str

The name of the .xlsx file to dump the fetched bucket data in (without extension). No extension is needed explicitly as it's added during the file-saving process.

"my_awesome_data"

Returns

None

This method is simply a placeholder for the pandas.DataFrame.to_excel() method. It simply saves the generated pandas.DataFrame instance to a .xlsx file and excludes the index. You can customize your own function parameters for this by simply calling the get_df() method, and manipulating the resulting pandas.DataFrame as you want.

This function uses "xlsxwriter" as the excel writer engine by default. Customization is available by calling to_excel() on a pandas.DataFrame instead.

Last updated