Skip to content

Commit a7e2f47

Browse files
committed
document; remove top_counts method
1 parent 404698b commit a7e2f47

4 files changed

Lines changed: 160 additions & 191 deletions

File tree

docs/User_Guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ analyzer = dl.analyzer
471471
```
472472

473473
## Tabular Export
474-
The Analyzer class has a number of functions that allow you to aggregate the data for analysis purposes. For example, running the `.top_counts()` function exports files into your rollup_dataframe directory which with counts summed up at a particular reporting unit level. This function expects 4 arguments: the election, the jurisdiction, the reporting unit level at which the aggregation will occur, and a boolean variable indicating whether you would like the data aggregated by vote count type. For example, to export all 2020 General results in your database to a tab-separated file `tabular_results.tsv`:
474+
The Analyzer class has a number of functions that allow you to aggregate the data for analysis purposes. For example, to export all 2020 General results in your database to a tab-separated file `tabular_results.tsv`:
475475
```
476476
analyzer.export_election_to_tsv("tabular_results.tsv", "2020 General")
477477
```

src/electiondata/__init__.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2978,31 +2978,6 @@ def export_outlier_data(
29782978
)
29792979
return agg_results
29802980

2981-
def top_counts(
2982-
self, election: str, jurisdiction: str, sub_rutype: str, by_vote_type: bool
2983-
) -> Optional[str]:
2984-
"""
2985-
Inputs:
2986-
election: str,
2987-
jurisdiction: str,
2988-
sub_rutype: str, ReportingUnitType (e.g., 'county') to which the results should be rolled up
2989-
by_vote_type: bool, if true, results will be reported by vote type. If false, only totals will be reported
2990-
2991-
Puts file with results into a subdirectory (labeled by election and jurisdiction name)
2992-
of the reports_and_plots_dir specified in the Analyzer's param_file.
2993-
"""
2994-
jurisdiction_id = db.name_to_id(self.session, "ReportingUnit", jurisdiction)
2995-
election_id = db.name_to_id(self.session, "Election", election)
2996-
err = an.export_rollup(
2997-
self.session,
2998-
self.reports_and_plots_dir,
2999-
jurisdiction_id=jurisdiction_id,
3000-
sub_rutype=sub_rutype,
3001-
election_id=election_id,
3002-
by_vote_type=by_vote_type,
3003-
)
3004-
return err
3005-
30062981
def export_nist(
30072982
self,
30082983
election: str,

0 commit comments

Comments
 (0)