haxaco / apagon Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The modules apagones-client.js and lugares-client.js should probably be joined into one database client.
Eg.
https://github.com/haxaco/c4v-team1/blob/master/lib/apagones-client.js#L7
This should probably be;
async insert(collection, data)
This will let us to just have one database client and will let us manage client changes easier.
As we're getting data from CSVs, Twitter, Instagram and other sources, we need to have an External ID field to better handle dups and other cases. Right now this is handled in the attributes
property but should be required for sources other than web.
We are doing very naive data validation for our post endpoints. There are a couple of things we should do:
We aren't inserting the geo spacial data into MongoDB. Currently we are inserting the location data as:
lugar collection
{
"_id": "5cb28d136d3fb0001740d563",
"name": "Hospital Universitario de Maracaibo. Zulia",
"location": {
"lat": 10.673393,
"lng": -66.87
},
"attributes": {
"hospital_type": "Tipo IV"
},
"accuracy": 1200.4,
"type": "hospital",
"source": "browser"
}
apagon collection
{
"_id": "5cb269525cdf9200175938d1",
"location": {
"lat": 3,
"lng": 4
},
"accuracy": 1200.4,
"type": "power",
"source": "browser"
}
The location
object should be inserted as:
{
"_id": "5cb269525cdf9200175938d1",
"location": {
"type": "Point",
"coordinates": [4, 3]
},
"accuracy": 1200.4,
"type": "power",
"source": "browser"
}
This change follows GeoJSON format and can help us make better use of this location data.
In the README we specify a schema for our API responses. We should change the schema of our responses to follow this.
Eg.
https://github.com/haxaco/c4v-team1/blob/master/routes/index.js#L15
Should probably be:
res.json({ data: results });
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.