lachlanjc / predictcovid Goto Github PK
View Code? Open in Web Editor NEWVisualize & track the 2020 COVID-19 pandemic by country.
Home Page: https://predictcovid.netlify.app/
License: MIT License
Visualize & track the 2020 COVID-19 pandemic by country.
Home Page: https://predictcovid.netlify.app/
License: MIT License
Hi,
I do not know yarn and nodejs. So I installed both of them and modules were instralled by after. The issue I'm facing is when I'm running : yarn redwood db seed
it tells me :
PrismaClientUnknownRequestError:
Invalid db.country.create() invocation in
C:\Users\albel\Documents\covid19\api\prisma\seeds.js:64:22
60 }
61
62 async function main() {
63 await asyncForEach(countries, async (country) => {
โ 64 await db.country.create(
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("no such table: C:.Country"))) })
at PrismaClientFetcher.request (C:\Users\albel\Documents\covid19\node_modules\@prisma\client\index.js:90:17)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Seeding your database... [completed]
Done in 1.86s.
the schema.prisma looks like this
datasource DS {
provider = "sqlite"
url = "file:dev.db"
}
generator photonjs {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
}
model Day {
id Int @id @default(autoincrement())
date DateTime @unique
createdAt DateTime @default(now())
counts DailyCount[]
}
model Country {
id Int @id @default(autoincrement())
iso String @unique
worldometersSlug String @unique
name String
createdAt DateTime @default(now())
dailyCounts DailyCount[]
}
model DailyCount {
id Int @id @default(autoincrement())
date Day
country Country
totalCases Int
newCases Int
currentlyInfected Int
totalDeaths Int
newDeaths Int
}
How can I add a new country ?
Any insight on what I doing wrong ?
thanks
I'm trying to get a local running version of this, but I can't get the database up.
sqlite
which was mentioned in another issue.yarn redwood db up
The error I'm getting is:
Error: Schema parsing
error: No such argument.
--> schema.prisma:29
|
28 | id Int @id @default(autoincrement())
29 | date Day @relation(fields: [dayId], references: [id])
|
error: No such argument.
--> schema.prisma:30
|
29 | date Day @relation(fields: [dayId], references: [id])
30 | country Country @relation(fields: [countryId], references: [id])
|
Validation Error Count: 2
Any advice would be great! I'd love to help with #4 too.
Hello,
it would be cool if we could normalize the figures by e.g. by infections per million inhabitants.
Italy has ~60 million inhabitants. Comparing against the U.S. (~300 million inhabitants) by total figures doesn't make much sense imho.
Hi!
Just noticed Canada isn't in the dataset on the website but is on https://www.worldometers.info/coronavirus/country/canada/
Any chance of adding it? I'm a dev and happy to do a PR if you're interested but could use a point in the right direction. ;)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.