daca40850c
-Changes made to reflect the new layouts of the test env --e.g. Changes to the app grid, changes to UI screens -Updated commands --New commands added & some updated -New tests --Revert App --AutoScreensUI --Change app icon and colour --Data source testing In particular to data source testing -I have a file for mySQL, PostgreSQL, Oracle, and REST. --enabled better regression testing for each Other changes made for: -QueryLevelTransformers tests -Table tests -Renaming applications -Automations -Multi-option datastype New env file added too
30 lines
666 B
JavaScript
30 lines
666 B
JavaScript
const breweries = data
|
|
const totals = {}
|
|
for (let brewery of breweries) {
|
|
const state = brewery.state
|
|
if (totals[state] == null) {
|
|
totals[state] = 1
|
|
} else {
|
|
totals[state]++
|
|
}
|
|
}
|
|
const stateCodes = {
|
|
texas: "tx",
|
|
colorado: "co",
|
|
florida: "fl",
|
|
iwoa: "ia",
|
|
louisiana: "la",
|
|
california: "ca",
|
|
pennsylvania: "pa",
|
|
georgia: "ga",
|
|
"new hampshire": "nh",
|
|
virginia: "va",
|
|
michigan: "mi",
|
|
maryland: "md",
|
|
ohio: "oh",
|
|
}
|
|
const entries = Object.entries(totals)
|
|
return entries.map(([state, count]) => {
|
|
const stateCode = stateCodes[state.toLowerCase()]
|
|
return { state, count, flag: "http://flags.ox3.in/svg/us/${stateCode}.svg" }
|
|
})
|