-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 395-add-kwargs-low-level-fun
- Loading branch information
Showing
15 changed files
with
134 additions
and
304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pandas as pd | ||
|
||
from src.utils.hdfs_mods import hdfs_load_json as read_json | ||
|
||
# TODO: read from config | ||
folder_path = "/dapsen/workspace_zone/mbs-results/" | ||
file_name = "snapshot-202212-002-2156d36b-e61f-42f1-a0f1-61d1f8568b8e.json" | ||
file_path = folder_path + file_name | ||
|
||
snapshot = read_json(file_path) | ||
|
||
contributors = pd.DataFrame(snapshot["contributors"]) | ||
responses = pd.DataFrame(snapshot["responses"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ black | |
isort | ||
nbstripout | ||
nbqa | ||
#research_and_development==1.0.0 | ||
pre_commit_hooks | ||
flake8 | ||
pandas==1.1.5 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
period,strata,auxiliary,target,flag_construction_matches,count_construction_matches | ||
202401,12340,120,,False,1 | ||
202401,12340,120,10,True,1 | ||
202402,12340,120,11,True,2 | ||
202402,12340,240,12,True,2 | ||
202403,12340,,13,False,1 | ||
202403,12340,240,14,True,1 | ||
202404,12340,120,15,True,1 | ||
202404,56789,240,16,True,1 | ||
period,strata,auxiliary,target,flag_construction_matches | ||
202401,12340,120,,False | ||
202401,12340,120,10,True | ||
202402,12340,120,11,True | ||
202402,12340,240,12,True | ||
202403,12340,,13,False | ||
202403,12340,240,14,True | ||
202404,12340,120,15,True | ||
202404,56789,240,16,True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
tests/test_data_matched_pair/count_matches_expected_output.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
group,period,flag_1,flag_2 | ||
1,202401,1,0 | ||
1,202402,0,2 | ||
2,202401,2,1 | ||
2,202402,1,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
period,group,flag_1,flag_2 | ||
202401,1,1,FALSE | ||
202401,1,0,FALSE | ||
202402,1,0,TRUE | ||
202402,1,0,TRUE | ||
202401,2,1,TRUE | ||
202401,2,1,FALSE | ||
202402,2,0,FALSE | ||
202402,2,1,TRUE |
9 changes: 9 additions & 0 deletions
9
tests/test_data_matched_pair/flag_pairs_2_groups_expected_output.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
reference,strata,period,target_variable,f_match,b_match | ||
1,101,202401,237,False,True | ||
1,101,202402,281,True,False | ||
1,101,202403,,False,False | ||
2,101,202401,270,False,True | ||
2,101,202402,250,True,True | ||
2,101,202403,255,True,False | ||
2,102,202404,260,False,True | ||
2,102,202405,272,True,False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
reference,strata,period,target_variable,f_match,b_match | ||
1,101,202401,237,False,True | ||
1,101,202402,281,True,False | ||
1,101,202403,,False,False | ||
2,101,202401,270,False,True | ||
2,101,202402,250,True,True | ||
2,101,202403,255,True,False | ||
2,102,202404,260,False,True | ||
2,102,202405,272,True,False |
5 changes: 5 additions & 0 deletions
5
tests/test_data_matched_pair/flag_pairs_missing_rows_expected_output.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
reference,strata,period,target_variable,f_match,b_match | ||
1,101,202401,237,FALSE,TRUE | ||
1,101,202402,100,TRUE,FALSE | ||
1,101,202404,34,FALSE,TRUE | ||
1,101,202405,19,TRUE,FALSE |
Oops, something went wrong.