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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
import React from 'react'; | |
interface PopulationData { | |
city: string; | |
population: number; | |
} | |
const data: PopulationData[] = [ | |
{ | |
city: 'New York', |
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
[ | |
{ | |
"city": "New York", | |
"country": "United States", | |
"population": 8399000, | |
"area": 468.9, | |
"currency": "US dollar", | |
"language": "English" | |
}, | |
{ |
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
const fs = require('fs') | |
const Papa = require('papaparse'); | |
async function main() { | |
const API = "https://www.fda.gov/about-fda/data-export/downloadable-files?_format=json&field_foia_record_type%5b%5d=3949&field_foia_record_type%5b%5d%20=3950" | |
const response = await fetch(API) | |
let data = await response.json(); | |
csv = Papa.unparse(data) |