so I am really new to programming and javascript and I am trying to filter this data that I am getting and add it to a CSV file but I am not sure how to start.
The code that I have so far is
import fetch from "node-fetch";
const api_url = 'https://media.githubusercontent.com/media/microsoft/Bing-COVID-19-Data/master/data/Bing-COVID19-Data.csv';
async function get_data_from_api(url) {
//Data
const response = await fetch(url);
var data = await response.text();
console.log(data)
}
//Calling the function,
get_data_from_api(api_url);
The way I am trying to filter the data is for the column country I only want rows for the "United States" and the state and county columns are empty. I want add those rows to a new CSV file.
This is what I am getting in the console.log for reference
S5325010,04/15/2020,34,0,0,0,16,15,42.96215,-106.7986,US,USA,United States,Wyoming,Natrona County 5428886,04/16/2020,37,3,0,0,,,42.96215,-106.7986,US,USA,United States,Wyoming,Natrona County 5432441,04/17/2020,37,0,0,0,16,,42.96215,-106.7986,US,USA,United States,Wyoming,Natrona County