Add windows_to_csv.py: export windows JSON to CSV with sound paths#1
Draft
Add windows_to_csv.py: export windows JSON to CSV with sound paths#1
Conversation
Co-authored-by: danielaruizl1 <60222812+danielaruizl1@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add sound paths corresponding to sound IDs in CSV
Add windows_to_csv.py: export windows JSON to CSV with sound paths
Mar 3, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users need a way to convert
windows_mapping_1.5overlap.jsonto a CSV and enrich it with thesound_pathfor eachsound_id, sourced fromannotations_filtered_dclde2026.json.Changes
windows_to_csv.py: Reads a windows mapping JSON, joinssound_pathfrom an annotations JSON onsound_id, and writes a CSV with all original window fields plus the appendedsound_pathcolumn.sound_ids (emits emptysound_path)idorfile_name_path)Usage
python windows_to_csv.py \ --windows /home/v-druizlopez/bioacoustics/orcas_dclde2026/data/windows_mapping_1.5overlap.json \ --annotations /home/v-druizlopez/bioacoustics/orcas_dclde2026/data/annotations_filtered_dclde2026.json \ --output windows_mapping_1.5overlap.csvOutput CSV columns: all fields from the windows JSON (e.g.
window_id,sound_id,start,end,label) plussound_path.Original prompt
I want to add to that csv the sound path corresponding to sound_id according to /home/v-druizlopez/bioacoustics/orcas_dclde2026/data/annotations_filtered_dclde2026.json
[Chronological Review: The conversation began with the user expressing a desire to create a CSV file using data from a JSON file named "windows_mapping_1.5overlap.json." The user provided the file path for this JSON file. Subsequently, the user requested to add sound paths corresponding to sound IDs from another JSON file, "annotations_filtered_dclde2026.json," to the CSV.][Intent Mapping:
[Technical Inventory:
[Code Archaeology: No specific code files or functions have been discussed or modified yet, as the conversation is focused on data extraction and CSV creation.]
[Progress Assessment: The user has outlined the necessary steps to create the CSV and add additional data, but no actual implementation has been executed yet.]
[Context Validation: All necessary context for continuing the work is captured, including file paths and user intentions regarding the CSV creation and data integration.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: 1. "I want to create a csv using the information in windows_mapping_1.5overlap.json" 2. "I want to add to that csv the sound path corresponding to sound_id according to /home/v-druizlopez/bioacoustics/orcas_dclde2026/data/annotations_filtered_dclde2026.json" - Session Context: The user is working on a bioacoustics project and needs to create a CSV file from specific JSON data. - User Intent Evolution: The user initially focused on creating a CSV and later expanded the request to include additional data from another JSON file.- Technical Foundation:
- JSON File 1: "windows_mapping_1.5overlap.json" - Contains data for CSV creation.
- JSON File 2: "annotations_filtered_dclde2026.json" - Contains sound paths to be added to the CSV.
- Codebase Status:
- No specific code files or functions have been discussed or modified yet.
- Problem Resolution:
- Issues Encountered: None reported yet; the conversation is still in the planning phase.
- Solutions Implemented: No solutions have been implemented yet.
- Debugging Context: Not applicable at this stage.
- Lessons Learned: Not applicable at this stage.
- Progress Tracking:
- Completed Tasks: None yet; the user has outlined the tasks but has not executed them.
- Partially Complete Work: The user has provided paths and intentions for the CSV creation and data integration.
- Validated Outcomes: None yet.
- Active Work State:
- Current Focus: The user is focused on creating a CSV file and integrating sound paths from another JSON file.
- Recent Context: The user provided paths to the JSON files and specified actions for CSV creation.
- Working Code: No code snippets have been discussed yet.
- Immediate Context: The user is preparing to create a CSV file based on the provided JSON data.
- Recent Operations:
- Last Agent Commands: User provided paths to JSON files and specified actions for CSV creation.
- Tool Results Summary: No tools have been executed yet; the conversation is still in the planning phase.
- Pre-Summary State: The agent was discussing the creation of a CSV file and data integration when the token budget was exceeded.
- Operation Context: The user is focused on creating a CSV file that combines data from two JSON files for their bioacoustics project.
- Continuation Plan:
- [Pending Task 1]: Create a CSV using data from "windows_mapping_1.5overlap.json."
- [Pending Task 2]: Add sound paths corresponding to sound IDs from "an...
Created from VS Code.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.