Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Return ListComp SubscriptLoad NameLoad Index Str comprehension NameStore Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Return ListComp TupleLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad comprehension NameStore Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore ListLoad Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If SubscriptLoad NameLoad Index Str body Assign NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr BoolOpAnd CompareEq SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str CompareEq SubscriptLoad NameLoad Index Str NameLoad orelse Assign NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr BoolOpAnd CompareEq SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str CompareEq SubscriptLoad NameLoad Index Str NameLoad For NameStore NameLoad body If SubscriptLoad NameLoad Index Str body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Num orelse Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Str NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad Str Str SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareEq SubscriptLoad NameLoad Index Str Str body Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore BinOpAdd BinOpAdd SubscriptLoad NameLoad Index Str Str SubscriptLoad NameLoad Index Str If SubscriptLoad NameLoad Index Str body Assign NameStore BinOpAdd Str NameLoad orelse Assign NameStore BinOpAdd NameLoad Str Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd Call AttributeLoad Str attr NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If SubscriptLoad NameLoad Index Str body Return SubscriptLoad NameLoad Index Str orelse Return SubscriptLoad NameLoad Index Str decorator_list decorator_list
N/A N/A 
Standardize names of data files from the Pennsylvania Secretary of State.

The state offers CSV files containing precinct-level results for regularly scheduled primary and general elections; these were split from a single
zip file into election-specific files and thus have no `raw_url` attribute. Special elections are pre-processed CSV files from HTML files. All files
are available in the https://github.com/openelections/openelections-data-pa repository.
 os.path join N/A json N/A unicodecsv N/A urlparse N/A requests openelex PROJECT_ROOT openelex.base.datasource BaseDatasource openelex.lib build_github_url Datasource N/A BaseDatasource N/A mappings N/A N/A self year N/A None N/A N/A Return array of dicts containing source url and
        standardized filename for raw results file, along
        with other pieces of metadata
         N/A mappings N/A N/A N/A yr elecs N/A N/A N/A N/A self elections year items N/A N/A N/A N/A mappings extend N/A N/A self _build_metadata yr elecs N/A mappings N/A target_urls N/A N/A self year N/A None N/A N/A Get list of source data urls, optionally filtered by year N/A N/A N/A item N/A raw_url N/A item N/A N/A self mappings year N/A filename_url_pairs N/A N/A self year N/A None N/A N/A N/A N/A N/A item N/A generated_filename N/A N/A self _url_for_fetch item N/A item N/A N/A self mappings year N/A _build_metadata N/A N/A self year elections N/A N/A N/A meta N/A N/A year_int N/A int year N/A election elections N/A N/A N/A election N/A special N/A N/A results N/A x N/A x N/A N/A self _url_paths N/A N/A N/A x N/A date N/A election N/A start_date N/A N/A x N/A special True N/A N/A results N/A x N/A x N/A N/A self _url_paths N/A N/A N/A x N/A date N/A election N/A start_date N/A N/A x N/A special False N/A result results N/A N/A N/A election N/A direct_links N/A N/A raw_url N/A N/A election N/A direct_links N/A 0 N/A N/A raw_url None N/A generated_filename N/A N/A self _generate_filename N/A election N/A start_date N/A election N/A race_type result N/A N/A N/A meta append N/A generated_filename raw_url pre_processed_url ocd_id name election generated_filename raw_url N/A build_github_url N/A self state generated_filename ocd-division/country:us/state:pa Pennsylvania N/A election N/A slug N/A meta N/A _generate_filename N/A N/A self start_date election_type result N/A N/A N/A N/A N/A result N/A district N/A N/A office N/A result N/A office N/A N/A office N/A N/A N/A result N/A office __ N/A result N/A district N/A N/A result N/A special N/A N/A election_type N/A special__ election_type N/A N/A election_type N/A election_type __precinct N/A bits N/A N/A N/A start_date replace - N/A N/A N/A self state lower election_type office N/A N/A office N/A N/A N/A N/A bits remove office N/A name N/A N/A N/A __ join bits .csv N/A name N/A _jurisdictions N/A N/A self N/A N/A N/A Pennsylvania counties N/A N/A N/A self jurisdiction_mappings N/A _url_for_fetch N/A N/A self mapping N/A N/A N/A N/A mapping N/A pre_processed_url N/A N/A N/A mapping N/A pre_processed_url N/A N/A N/A mapping N/A raw_url N/A N/A