Skip to content

Instantly share code, notes, and snippets.

View itsdevcoffee's full-sized avatar

Dev Coffee itsdevcoffee

View GitHub Profile
@itsdevcoffee
itsdevcoffee / .js
Created June 18, 2019 19:08
mattisagoober
const getTimeObj = (date, seconds) => {
return new Date(date .getTime() + 1000*seconds);
}
const userList = {
'TexMex': {
timestamp,
message,
},
'userg42': {
function convert_state(name, to) {
var name = name.toUpperCase();
var states = new Array( {'name':'Alabama', 'abbrev':'AL'}, {'name':'Alaska', 'abbrev':'AK'},
{'name':'Arizona', 'abbrev':'AZ'}, {'name':'Arkansas', 'abbrev':'AR'}, {'name':'California', 'abbrev':'CA'},
{'name':'Colorado', 'abbrev':'CO'}, {'name':'Connecticut', 'abbrev':'CT'}, {'name':'Delaware', 'abbrev':'DE'},
{'name':'Florida', 'abbrev':'FL'}, {'name':'Georgia', 'abbrev':'GA'}, {'name':'Hawaii', 'abbrev':'HI'},
{'name':'Idaho', 'abbrev':'ID'}, {'name':'Illinois', 'abbrev':'IL'}, {'name':'Indiana', 'abbrev':'IN'},
{'name':'Iowa', 'abbrev':'IA'}, {'name':'Kansas', 'abbrev':'KS'}, {'name':'Kentucky', 'abbrev':'KY'},
{'name':'Louisiana', 'abbrev':'LA'}, {'name':'Maine', 'abbrev':'ME'}, {'name':'Maryland', 'abbrev':'MD'},
{'name':'Massachusetts',
import * as am4core from '@amcharts/amcharts4/core'
import * as am4maps from '@amcharts/amcharts4/maps'
import am4geodata_usaLow from '@amcharts/amcharts4-geodata/usaLow'
import am4themes_dark from '@amcharts/amcharts4/themes/dark'
import am4themes_animated from '@amcharts/amcharts4/themes/animated'
// Define global variables
let chart
document.addEventListener('DOMContentLoaded', () => {