Skip to content

Commit

Permalink
Add slope, access etc. to pairs output
Browse files Browse the repository at this point in the history
  • Loading branch information
patricoferris committed Sep 8, 2023
1 parent f81f1d2 commit 038af33
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions methods/matching/find_pairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,15 @@ def find_match_iteration(

results.append(
[k_row.lat, k_row.lng] + [k_row[x] for x in luc_columns] + \
[match.lat, match.lng] + [match[x] for x in luc_columns]
[k_row[x] for x in distance_columns] + \
[match.lat, match.lng] + [match[x] for x in luc_columns] + \
[match[x] for x in distance_columns]
)

columns = ['k_lat', 'k_lng'] + [f'k_{x}' for x in luc_columns] + \
['s_lat', 's_lng'] + [f's_{x}' for x in luc_columns]
[f'k_{x}' for x in distance_columns] + \
['s_lat', 's_lng'] + [f's_{x}' for x in luc_columns] + \
[f's_{x}' for x in distance_columns]
results_df = pd.DataFrame(results, columns=columns)
results_df.to_parquet(os.path.join(output_folder, f'{idx_and_seed[1]}.parquet'))

Expand Down

0 comments on commit 038af33

Please sign in to comment.