Added currently_showing to form

This commit is contained in:
Nile Walker 2020-12-28 09:15:42 -05:00
parent 46130dc993
commit 507402c52e
8 changed files with 660 additions and 485 deletions

View File

@ -43,6 +43,7 @@ pyscss = "*"
pyzt = "*"
phonenumbers = "*"
numpy = "*"
flask-bower = "*"
[requires]
python_version = "3.8"

336
Pipfile.lock generated
View File

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "8c3959650ad1414809faff06b0d2e9b842b633b97e8954ecfa403f68380510b7"
"sha256": "1f1cd8913759fcedb11a714ee3d7533aa4adf48973967b528cca854d7c10e441"
},
"pipfile-spec": 6,
"requires": {
@ -148,10 +148,11 @@
},
"chardet": {
"hashes": [
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
"sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa",
"sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5"
],
"version": "==3.0.4"
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"version": "==4.0.0"
},
"click": {
"hashes": [
@ -181,43 +182,58 @@
},
"coverage": {
"hashes": [
"sha256:0203acd33d2298e19b57451ebb0bed0ab0c602e5cf5a818591b4918b1f97d516",
"sha256:0f313707cdecd5cd3e217fc68c78a960b616604b559e9ea60cc16795c4304259",
"sha256:1c6703094c81fa55b816f5ae542c6ffc625fec769f22b053adb42ad712d086c9",
"sha256:1d44bb3a652fed01f1f2c10d5477956116e9b391320c94d36c6bf13b088a1097",
"sha256:280baa8ec489c4f542f8940f9c4c2181f0306a8ee1a54eceba071a449fb870a0",
"sha256:29a6272fec10623fcbe158fdf9abc7a5fa032048ac1d8631f14b50fbfc10d17f",
"sha256:2b31f46bf7b31e6aa690d4c7a3d51bb262438c6dcb0d528adde446531d0d3bb7",
"sha256:2d43af2be93ffbad25dd959899b5b809618a496926146ce98ee0b23683f8c51c",
"sha256:381ead10b9b9af5f64646cd27107fb27b614ee7040bb1226f9c07ba96625cbb5",
"sha256:47a11bdbd8ada9b7ee628596f9d97fbd3851bd9999d398e9436bd67376dbece7",
"sha256:4d6a42744139a7fa5b46a264874a781e8694bb32f1d76d8137b68138686f1729",
"sha256:50691e744714856f03a86df3e2bff847c2acede4c191f9a1da38f088df342978",
"sha256:530cc8aaf11cc2ac7430f3614b04645662ef20c348dce4167c22d99bec3480e9",
"sha256:582ddfbe712025448206a5bc45855d16c2e491c2dd102ee9a2841418ac1c629f",
"sha256:63808c30b41f3bbf65e29f7280bf793c79f54fb807057de7e5238ffc7cc4d7b9",
"sha256:71b69bd716698fa62cd97137d6f2fdf49f534decb23a2c6fc80813e8b7be6822",
"sha256:7858847f2d84bf6e64c7f66498e851c54de8ea06a6f96a32a1d192d846734418",
"sha256:78e93cc3571fd928a39c0b26767c986188a4118edc67bc0695bc7a284da22e82",
"sha256:7f43286f13d91a34fadf61ae252a51a130223c52bfefb50310d5b2deb062cf0f",
"sha256:86e9f8cd4b0cdd57b4ae71a9c186717daa4c5a99f3238a8723f416256e0b064d",
"sha256:8f264ba2701b8c9f815b272ad568d555ef98dfe1576802ab3149c3629a9f2221",
"sha256:9342dd70a1e151684727c9c91ea003b2fb33523bf19385d4554f7897ca0141d4",
"sha256:9361de40701666b034c59ad9e317bae95c973b9ff92513dd0eced11c6adf2e21",
"sha256:9669179786254a2e7e57f0ecf224e978471491d660aaca833f845b72a2df3709",
"sha256:aac1ba0a253e17889550ddb1b60a2063f7474155465577caa2a3b131224cfd54",
"sha256:aef72eae10b5e3116bac6957de1df4d75909fc76d1499a53fb6387434b6bcd8d",
"sha256:bd3166bb3b111e76a4f8e2980fa1addf2920a4ca9b2b8ca36a3bc3dedc618270",
"sha256:c1b78fb9700fc961f53386ad2fd86d87091e06ede5d118b8a50dea285a071c24",
"sha256:c3888a051226e676e383de03bf49eb633cd39fc829516e5334e69b8d81aae751",
"sha256:c5f17ad25d2c1286436761b462e22b5020d83316f8e8fcb5deb2b3151f8f1d3a",
"sha256:c851b35fc078389bc16b915a0a7c1d5923e12e2c5aeec58c52f4aa8085ac8237",
"sha256:cb7df71de0af56000115eafd000b867d1261f786b5eebd88a0ca6360cccfaca7",
"sha256:cedb2f9e1f990918ea061f28a0f0077a07702e3819602d3507e2ff98c8d20636",
"sha256:e8caf961e1b1a945db76f1b5fa9c91498d15f545ac0ababbe575cfab185d3bd8"
"sha256:08b3ba72bd981531fd557f67beee376d6700fba183b167857038997ba30dd297",
"sha256:2757fa64e11ec12220968f65d086b7a29b6583d16e9a544c889b22ba98555ef1",
"sha256:3102bb2c206700a7d28181dbe04d66b30780cde1d1c02c5f3c165cf3d2489497",
"sha256:3498b27d8236057def41de3585f317abae235dd3a11d33e01736ffedb2ef8606",
"sha256:378ac77af41350a8c6b8801a66021b52da8a05fd77e578b7380e876c0ce4f528",
"sha256:38f16b1317b8dd82df67ed5daa5f5e7c959e46579840d77a67a4ceb9cef0a50b",
"sha256:3911c2ef96e5ddc748a3c8b4702c61986628bb719b8378bf1e4a6184bbd48fe4",
"sha256:3a3c3f8863255f3c31db3889f8055989527173ef6192a283eb6f4db3c579d830",
"sha256:3b14b1da110ea50c8bcbadc3b82c3933974dbeea1832e814aab93ca1163cd4c1",
"sha256:535dc1e6e68fad5355f9984d5637c33badbdc987b0c0d303ee95a6c979c9516f",
"sha256:6f61319e33222591f885c598e3e24f6a4be3533c1d70c19e0dc59e83a71ce27d",
"sha256:723d22d324e7997a651478e9c5a3120a0ecbc9a7e94071f7e1954562a8806cf3",
"sha256:76b2775dda7e78680d688daabcb485dc87cf5e3184a0b3e012e1d40e38527cc8",
"sha256:782a5c7df9f91979a7a21792e09b34a658058896628217ae6362088b123c8500",
"sha256:7e4d159021c2029b958b2363abec4a11db0ce8cd43abb0d9ce44284cb97217e7",
"sha256:8dacc4073c359f40fcf73aede8428c35f84639baad7e1b46fce5ab7a8a7be4bb",
"sha256:8f33d1156241c43755137288dea619105477961cfa7e47f48dbf96bc2c30720b",
"sha256:8ffd4b204d7de77b5dd558cdff986a8274796a1e57813ed005b33fd97e29f059",
"sha256:93a280c9eb736a0dcca19296f3c30c720cb41a71b1f9e617f341f0a8e791a69b",
"sha256:9a4f66259bdd6964d8cf26142733c81fb562252db74ea367d9beb4f815478e72",
"sha256:9a9d4ff06804920388aab69c5ea8a77525cf165356db70131616acd269e19b36",
"sha256:a2070c5affdb3a5e751f24208c5c4f3d5f008fa04d28731416e023c93b275277",
"sha256:a4857f7e2bc6921dbd487c5c88b84f5633de3e7d416c4dc0bb70256775551a6c",
"sha256:a607ae05b6c96057ba86c811d9c43423f35e03874ffb03fbdcd45e0637e8b631",
"sha256:a66ca3bdf21c653e47f726ca57f46ba7fc1f260ad99ba783acc3e58e3ebdb9ff",
"sha256:ab110c48bc3d97b4d19af41865e14531f300b482da21783fdaacd159251890e8",
"sha256:b239711e774c8eb910e9b1ac719f02f5ae4bf35fa0420f438cdc3a7e4e7dd6ec",
"sha256:be0416074d7f253865bb67630cf7210cbc14eb05f4099cc0f82430135aaa7a3b",
"sha256:c46643970dff9f5c976c6512fd35768c4a3819f01f61169d8cdac3f9290903b7",
"sha256:c5ec71fd4a43b6d84ddb88c1df94572479d9a26ef3f150cef3dacefecf888105",
"sha256:c6e5174f8ca585755988bc278c8bb5d02d9dc2e971591ef4a1baabdf2d99589b",
"sha256:c89b558f8a9a5a6f2cfc923c304d49f0ce629c3bd85cb442ca258ec20366394c",
"sha256:cc44e3545d908ecf3e5773266c487ad1877be718d9dc65fc7eb6e7d14960985b",
"sha256:cc6f8246e74dd210d7e2b56c76ceaba1cc52b025cd75dbe96eb48791e0250e98",
"sha256:cd556c79ad665faeae28020a0ab3bda6cd47d94bec48e36970719b0b86e4dcf4",
"sha256:ce6f3a147b4b1a8b09aae48517ae91139b1b010c5f36423fa2b866a8b23df879",
"sha256:ceb499d2b3d1d7b7ba23abe8bf26df5f06ba8c71127f188333dddcf356b4b63f",
"sha256:cef06fb382557f66d81d804230c11ab292d94b840b3cb7bf4450778377b592f4",
"sha256:e448f56cfeae7b1b3b5bcd99bb377cde7c4eb1970a525c770720a352bc4c8044",
"sha256:e52d3d95df81c8f6b2a1685aabffadf2d2d9ad97203a40f8d61e51b70f191e4e",
"sha256:ee2f1d1c223c3d2c24e3afbb2dd38be3f03b1a8d6a83ee3d9eb8c36a52bee899",
"sha256:f2c6888eada180814b8583c3e793f3f343a692fc802546eed45f40a001b1169f",
"sha256:f51dbba78d68a44e99d484ca8c8f604f17e957c1ca09c3ebc2c7e3bbd9ba0448",
"sha256:f54de00baf200b4539a5a092a759f000b5f45fd226d6d25a76b0dff71177a714",
"sha256:fa10fee7e32213f5c7b0d6428ea92e3a3fdd6d725590238a3f92c0de1c78b9d2",
"sha256:fabeeb121735d47d8eab8671b6b031ce08514c86b7ad8f7d5490a7b6dcd6267d",
"sha256:fac3c432851038b3e6afe086f777732bcf7f6ebbfd90951fa04ee53db6d0bcdd",
"sha256:fda29412a66099af6d6de0baa6bd7c52674de177ec2ad2630ca264142d69c6c7",
"sha256:ff1330e8bc996570221b450e2d539134baa9465f5cb98aff0e0f73f34172e0ae"
],
"index": "pypi",
"version": "==5.3"
"version": "==5.3.1"
},
"cryptography": {
"hashes": [
@ -324,6 +340,15 @@
"index": "pypi",
"version": "==0.7.1"
},
"flask-bower": {
"hashes": [
"sha256:00842ee71667a34c82ef9688df3e50241f367022ccd64675967e5f3c2282c2a0",
"sha256:16b5919e4b95f736403f3b843d0cbe06ff30493a26524ef85522be1922b1bc5b",
"sha256:3b884a80d872f7cfaf5b351aa90af4afaadc02588a764e1071de56963d6cbcb8"
],
"index": "pypi",
"version": "==1.3.0"
},
"flask-cors": {
"hashes": [
"sha256:6bcfc100288c5d1bcb1dbb854babd59beee622ffd321e444b05f24d6d58466b8",
@ -404,22 +429,22 @@
},
"globus-sdk": {
"hashes": [
"sha256:883a862ddd17b0f4868ec55d6697a64c13d91c41b9fa5103198d2140053abac2",
"sha256:8b78dd9a930be227a8282a1189707a2560e30d8af8ffcb09e9b551f96deb755c"
"sha256:b33021b58edacc16bf2ba8453efbb26a8b04242ee3f4d62dcdaa3c6e199f136f",
"sha256:cbee589f7ed6d34baee565ab66e0d38497de4de86c332c0bb727994d26d8667e"
],
"index": "pypi",
"version": "==1.9.1"
"version": "==1.10.0"
},
"google-api-core": {
"extras": [
"grpc"
],
"hashes": [
"sha256:2f74562c6c2df8d2df1fd3f8d08d64cadd71ee6830b4ab6a83ed862e75b8a0b0",
"sha256:6f7ff9c88af7b76a33e7cd04999f763a21b40efc64ac5ec488ea2918a94b354b"
"sha256:0f1dee446db2685863c3c493a90fefa5fc7f4defaf8e1a320b50ccaddfb5d469",
"sha256:a7f5794446a22ff7d36764959ba5f319f37628faf4da04fdc0dedf1598b556c1"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'",
"version": "==1.24.0"
"version": "==1.24.1"
},
"google-auth": {
"hashes": [
@ -643,11 +668,11 @@
},
"marshmallow": {
"hashes": [
"sha256:73facc37462dfc0b27f571bdaffbef7709e19f7a616beb3802ea425b07843f4e",
"sha256:e26763201474b588d144dae9a32bdd945cd26a06c943bc746a6882e850475378"
"sha256:4ab2fdb7f36eb61c3665da67a7ce281c8900db08d72ba6bf0e695828253581f7",
"sha256:eca81d53aa4aafbc0e20566973d0d2e50ce8bf0ee15165bb799bec0df1e50177"
],
"index": "pypi",
"version": "==3.9.1"
"version": "==3.10.0"
},
"marshmallow-enum": {
"hashes": [
@ -665,6 +690,46 @@
"index": "pypi",
"version": "==0.24.1"
},
"numpy": {
"hashes": [
"sha256:08308c38e44cc926bdfce99498b21eec1f848d24c302519e64203a8da99a97db",
"sha256:09c12096d843b90eafd01ea1b3307e78ddd47a55855ad402b157b6c4862197ce",
"sha256:13d166f77d6dc02c0a73c1101dd87fdf01339febec1030bd810dcd53fff3b0f1",
"sha256:141ec3a3300ab89c7f2b0775289954d193cc8edb621ea05f99db9cb181530512",
"sha256:16c1b388cc31a9baa06d91a19366fb99ddbe1c7b205293ed072211ee5bac1ed2",
"sha256:18bed2bcb39e3f758296584337966e68d2d5ba6aab7e038688ad53c8f889f757",
"sha256:1aeef46a13e51931c0b1cf8ae1168b4a55ecd282e6688fdb0a948cc5a1d5afb9",
"sha256:27d3f3b9e3406579a8af3a9f262f5339005dd25e0ecf3cf1559ff8a49ed5cbf2",
"sha256:2a2740aa9733d2e5b2dfb33639d98a64c3b0f24765fed86b0fd2aec07f6a0a08",
"sha256:4377e10b874e653fe96985c05feed2225c912e328c8a26541f7fc600fb9c637b",
"sha256:448ebb1b3bf64c0267d6b09a7cba26b5ae61b6d2dbabff7c91b660c7eccf2bdb",
"sha256:50e86c076611212ca62e5a59f518edafe0c0730f7d9195fec718da1a5c2bb1fc",
"sha256:5734bdc0342aba9dfc6f04920988140fb41234db42381cf7ccba64169f9fe7ac",
"sha256:64324f64f90a9e4ef732be0928be853eee378fd6a01be21a0a8469c4f2682c83",
"sha256:6ae6c680f3ebf1cf7ad1d7748868b39d9f900836df774c453c11c5440bc15b36",
"sha256:6d7593a705d662be5bfe24111af14763016765f43cb6923ed86223f965f52387",
"sha256:8cac8790a6b1ddf88640a9267ee67b1aee7a57dfa2d2dd33999d080bc8ee3a0f",
"sha256:8ece138c3a16db8c1ad38f52eb32be6086cc72f403150a79336eb2045723a1ad",
"sha256:9eeb7d1d04b117ac0d38719915ae169aa6b61fca227b0b7d198d43728f0c879c",
"sha256:a09f98011236a419ee3f49cedc9ef27d7a1651df07810ae430a6b06576e0b414",
"sha256:a5d897c14513590a85774180be713f692df6fa8ecf6483e561a6d47309566f37",
"sha256:ad6f2ff5b1989a4899bf89800a671d71b1612e5ff40866d1f4d8bcf48d4e5764",
"sha256:c42c4b73121caf0ed6cd795512c9c09c52a7287b04d105d112068c1736d7c753",
"sha256:cb1017eec5257e9ac6209ac172058c430e834d5d2bc21961dceeb79d111e5909",
"sha256:d6c7bb82883680e168b55b49c70af29b84b84abb161cbac2800e8fcb6f2109b6",
"sha256:e452dc66e08a4ce642a961f134814258a082832c78c90351b75c41ad16f79f63",
"sha256:e5b6ed0f0b42317050c88022349d994fe72bfe35f5908617512cd8c8ef9da2a9",
"sha256:e9b30d4bd69498fc0c3fe9db5f62fffbb06b8eb9321f92cc970f2969be5e3949",
"sha256:ec149b90019852266fec2341ce1db513b843e496d5a8e8cdb5ced1923a92faab",
"sha256:edb01671b3caae1ca00881686003d16c2209e07b7ef8b7639f1867852b948f7c",
"sha256:f0d3929fe88ee1c155129ecd82f981b8856c5d97bcb0d5f23e9b4242e79d1de3",
"sha256:f29454410db6ef8126c83bd3c968d143304633d45dc57b51252afbd79d700893",
"sha256:fe45becb4c2f72a0907c1d0246ea6449fe7a9e2293bb0e11c4e9a32bb0930a15",
"sha256:fedbd128668ead37f33917820b704784aff695e0019309ad446a6d0b065b57e4"
],
"index": "pypi",
"version": "==1.19.4"
},
"openapi-spec-validator": {
"hashes": [
"sha256:6dd75e50c94f1bb454d0e374a56418e7e06a07affb2c7f1df88564c5d728dac3",
@ -894,11 +959,11 @@
},
"requests": {
"hashes": [
"sha256:7f1a0b932f4a60a1a65caa4263921bb7d9ee911957e0ae4a23a6dd08185ad5f8",
"sha256:e786fa28d8c9154e6a4de5d46a1d921b8749f8b74e28bde23768e5e16eece998"
"sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804",
"sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'",
"version": "==2.25.0"
"version": "==2.25.1"
},
"rsa": {
"hashes": [
@ -932,52 +997,52 @@
"sha256:4bb21a6ee4707bf43b61230e80740e71bfe56e55d1f1f50924b087bb2975c851",
"sha256:6dc52924dc0bc710a5d16794e6b3480b2c7c08b07729505feab2b2c16661ff6e"
],
"markers": "python_version >= '3.0'",
"markers": "python_version >= '3'",
"version": "==2.1"
},
"sqlalchemy": {
"hashes": [
"sha256:009e8388d4d551a2107632921320886650b46332f61dc935e70c8bcf37d8e0d6",
"sha256:0157c269701d88f5faf1fa0e4560e4d814f210c01a5b55df3cab95e9346a8bcc",
"sha256:0a92745bb1ebbcb3985ed7bda379b94627f0edbc6c82e9e4bac4fb5647ae609a",
"sha256:0cca1844ba870e81c03633a99aa3dc62256fb96323431a5dec7d4e503c26372d",
"sha256:166917a729b9226decff29416f212c516227c2eb8a9c9f920d69ced24e30109f",
"sha256:1f5f369202912be72fdf9a8f25067a5ece31a2b38507bb869306f173336348da",
"sha256:2909dffe5c9a615b7e6c92d1ac2d31e3026dc436440a4f750f4749d114d88ceb",
"sha256:2b5dafed97f778e9901b79cc01b88d39c605e0545b4541f2551a2fd785adc15b",
"sha256:2e9bd5b23bba8ae8ce4219c9333974ff5e103c857d9ff0e4b73dc4cb244c7d86",
"sha256:3aa6d45e149a16aa1f0c46816397e12313d5e37f22205c26e06975e150ffcf2a",
"sha256:4bdbdb8ca577c6c366d15791747c1de6ab14529115a2eb52774240c412a7b403",
"sha256:53fd857c6c8ffc0aa6a5a3a2619f6a74247e42ec9e46b836a8ffa4abe7aab327",
"sha256:5cdfe54c1e37279dc70d92815464b77cd8ee30725adc9350f06074f91dbfeed2",
"sha256:5d92c18458a4aa27497a986038d5d797b5279268a2de303cd00910658e8d149c",
"sha256:632b32183c0cb0053194a4085c304bc2320e5299f77e3024556fa2aa395c2a8b",
"sha256:7c735c7a6db8ee9554a3935e741cf288f7dcbe8706320251eb38c412e6a4281d",
"sha256:7cd40cb4bc50d9e87b3540b23df6e6b24821ba7e1f305c1492b0806c33dbdbec",
"sha256:84f0ac4a09971536b38cc5d515d6add7926a7e13baa25135a1dbb6afa351a376",
"sha256:8dcbf377529a9af167cbfc5b8acec0fadd7c2357fc282a1494c222d3abfc9629",
"sha256:950f0e17ffba7a7ceb0dd056567bc5ade22a11a75920b0e8298865dc28c0eff6",
"sha256:9e379674728f43a0cd95c423ac0e95262500f9bfd81d33b999daa8ea1756d162",
"sha256:b15002b9788ffe84e42baffc334739d3b68008a973d65fad0a410ca5d0531980",
"sha256:b6f036ecc017ec2e2cc2a40615b41850dc7aaaea6a932628c0afc73ab98ba3fb",
"sha256:bad73f9888d30f9e1d57ac8829f8a12091bdee4949b91db279569774a866a18e",
"sha256:bbc58fca72ce45a64bb02b87f73df58e29848b693869e58bd890b2ddbb42d83b",
"sha256:bca4d367a725694dae3dfdc86cf1d1622b9f414e70bd19651f5ac4fb3aa96d61",
"sha256:be41d5de7a8e241864189b7530ca4aaf56a5204332caa70555c2d96379e18079",
"sha256:bf53d8dddfc3e53a5bda65f7f4aa40fae306843641e3e8e701c18a5609471edf",
"sha256:c092fe282de83d48e64d306b4bce03114859cdbfe19bf8a978a78a0d44ddadb1",
"sha256:c3ab23ee9674336654bf9cac30eb75ac6acb9150dc4b1391bec533a7a4126471",
"sha256:ce64a44c867d128ab8e675f587aae7f61bd2db836a3c4ba522d884cd7c298a77",
"sha256:d05cef4a164b44ffda58200efcb22355350979e000828479971ebca49b82ddb1",
"sha256:d2f25c7f410338d31666d7ddedfa67570900e248b940d186b48461bd4e5569a1",
"sha256:d3b709d64b5cf064972b3763b47139e4a0dc4ae28a36437757f7663f67b99710",
"sha256:e32e3455db14602b6117f0f422f46bc297a3853ae2c322ecd1e2c4c04daf6ed5",
"sha256:ed53209b5f0f383acb49a927179fa51a6e2259878e164273ebc6815f3a752465",
"sha256:f605f348f4e6a2ba00acb3399c71d213b92f27f2383fc4abebf7a37368c12142",
"sha256:fcdb3755a7c355bc29df1b5e6fb8226d5c8b90551d202d69d0076a8a5649d68b"
"sha256:04f995fcbf54e46cddeb4f75ce9dfc17075d6ae04ac23b2bacb44b3bc6f6bf11",
"sha256:0c6406a78a714a540d980a680b86654feadb81c8d0eecb59f3d6c554a4c69f19",
"sha256:0c72b90988be749e04eff0342dcc98c18a14461eb4b2ad59d611b57b31120f90",
"sha256:108580808803c7732f34798eb4a329d45b04c562ed83ee90f09f6a184a42b766",
"sha256:1418f5e71d6081aa1095a1d6b567a562d2761996710bdce9b6e6ba20a03d0864",
"sha256:17610d573e698bf395afbbff946544fbce7c5f4ee77b5bcb1f821b36345fae7a",
"sha256:216ba5b4299c95ed179b58f298bda885a476b16288ab7243e89f29f6aeced7e0",
"sha256:2ff132a379838b1abf83c065be54cef32b47c987aedd06b82fc76476c85225eb",
"sha256:314f5042c0b047438e19401d5f29757a511cfc2f0c40d28047ca0e4c95eabb5b",
"sha256:318b5b727e00662e5fc4b4cd2bf58a5116d7c1b4dd56ffaa7d68f43458a8d1ed",
"sha256:3ab5b44a07b8c562c6dcb7433c6a6c6e03266d19d64f87b3333eda34e3b9936b",
"sha256:426ece890153ccc52cc5151a1a0ed540a5a7825414139bb4c95a868d8da54a52",
"sha256:491fe48adc07d13e020a8b07ef82eefc227003a046809c121bea81d3dbf1832d",
"sha256:4a84c7c7658dd22a33dab2e2aa2d17c18cb004a42388246f2e87cb4085ef2811",
"sha256:54da615e5b92c339e339fe8536cce99fe823b6ed505d4ea344852aefa1c205fb",
"sha256:5a7f224cdb7233182cec2a45d4c633951268d6a9bcedac37abbf79dd07012aea",
"sha256:61628715931f4962e0cdb2a7c87ff39eea320d2aa96bd471a3c293d146f90394",
"sha256:62285607a5264d1f91590abd874d6a498e229d5840669bd7d9f654cfaa599bd0",
"sha256:62fb881ba51dbacba9af9b779211cf9acff3442d4f2993142015b22b3cd1f92a",
"sha256:68428818cf80c60dc04aa0f38da20ad39b28aba4d4d199f949e7d6e04444ea86",
"sha256:6aaa13ee40c4552d5f3a59f543f0db6e31712cc4009ec7385407be4627259d41",
"sha256:70121f0ae48b25ef3e56e477b88cd0b0af0e1f3a53b5554071aa6a93ef378a03",
"sha256:715b34578cc740b743361f7c3e5f584b04b0f1344f45afc4e87fbac4802eb0a0",
"sha256:758fc8c4d6c0336e617f9f6919f9daea3ab6bb9b07005eda9a1a682e24a6cacc",
"sha256:7d4b8de6bb0bc736161cb0bbd95366b11b3eb24dd6b814a143d8375e75af9990",
"sha256:81d8d099a49f83111cce55ec03cc87eef45eec0d90f9842b4fc674f860b857b0",
"sha256:888d5b4b5aeed0d3449de93ea80173653e939e916cc95fe8527079e50235c1d2",
"sha256:95bde07d19c146d608bccb9b16e144ec8f139bcfe7fd72331858698a71c9b4f5",
"sha256:9bf572e4f5aa23f88dd902f10bb103cb5979022a38eec684bfa6d61851173fec",
"sha256:bab5a1e15b9466a25c96cda19139f3beb3e669794373b9ce28c4cf158c6e841d",
"sha256:bd4b1af45fd322dcd1fb2a9195b4f93f570d1a5902a842e3e6051385fac88f9c",
"sha256:bde677047305fe76c7ee3e4492b545e0018918e44141cc154fe39e124e433991",
"sha256:c389d7cc2b821853fb018c85457da3e7941db64f4387720a329bc7ff06a27963",
"sha256:d055ff750fcab69ca4e57b656d9c6ad33682e9b8d564f2fbe667ab95c63591b0",
"sha256:d53f59744b01f1440a1b0973ed2c3a7de204135c593299ee997828aad5191693",
"sha256:f115150cc4361dd46153302a640c7fa1804ac207f9cc356228248e351a8b4676",
"sha256:f1e88b30da8163215eab643962ae9d9252e47b4ea53404f2c4f10f24e70ddc62",
"sha256:f8191fef303025879e6c3548ecd8a95aafc0728c764ab72ec51a0bdf0c91a341"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
"version": "==1.3.20"
"version": "==1.3.22"
},
"swagger-ui-bundle": {
"hashes": [
@ -995,10 +1060,10 @@
},
"twilio": {
"hashes": [
"sha256:a168e76f04358bf503736fcca28e46d9bc4d795d4af10c8fd6003a2ae22e2f0f"
"sha256:dd8371c9b4ea422d6de7526b63b587da82e8488f2b3f6b1258d2cad6e4006a65"
],
"index": "pypi",
"version": "==6.50.0"
"version": "==6.50.1"
},
"tzlocal": {
"hashes": [
@ -1073,43 +1138,58 @@
},
"coverage": {
"hashes": [
"sha256:0203acd33d2298e19b57451ebb0bed0ab0c602e5cf5a818591b4918b1f97d516",
"sha256:0f313707cdecd5cd3e217fc68c78a960b616604b559e9ea60cc16795c4304259",
"sha256:1c6703094c81fa55b816f5ae542c6ffc625fec769f22b053adb42ad712d086c9",
"sha256:1d44bb3a652fed01f1f2c10d5477956116e9b391320c94d36c6bf13b088a1097",
"sha256:280baa8ec489c4f542f8940f9c4c2181f0306a8ee1a54eceba071a449fb870a0",
"sha256:29a6272fec10623fcbe158fdf9abc7a5fa032048ac1d8631f14b50fbfc10d17f",
"sha256:2b31f46bf7b31e6aa690d4c7a3d51bb262438c6dcb0d528adde446531d0d3bb7",
"sha256:2d43af2be93ffbad25dd959899b5b809618a496926146ce98ee0b23683f8c51c",
"sha256:381ead10b9b9af5f64646cd27107fb27b614ee7040bb1226f9c07ba96625cbb5",
"sha256:47a11bdbd8ada9b7ee628596f9d97fbd3851bd9999d398e9436bd67376dbece7",
"sha256:4d6a42744139a7fa5b46a264874a781e8694bb32f1d76d8137b68138686f1729",
"sha256:50691e744714856f03a86df3e2bff847c2acede4c191f9a1da38f088df342978",
"sha256:530cc8aaf11cc2ac7430f3614b04645662ef20c348dce4167c22d99bec3480e9",
"sha256:582ddfbe712025448206a5bc45855d16c2e491c2dd102ee9a2841418ac1c629f",
"sha256:63808c30b41f3bbf65e29f7280bf793c79f54fb807057de7e5238ffc7cc4d7b9",
"sha256:71b69bd716698fa62cd97137d6f2fdf49f534decb23a2c6fc80813e8b7be6822",
"sha256:7858847f2d84bf6e64c7f66498e851c54de8ea06a6f96a32a1d192d846734418",
"sha256:78e93cc3571fd928a39c0b26767c986188a4118edc67bc0695bc7a284da22e82",
"sha256:7f43286f13d91a34fadf61ae252a51a130223c52bfefb50310d5b2deb062cf0f",
"sha256:86e9f8cd4b0cdd57b4ae71a9c186717daa4c5a99f3238a8723f416256e0b064d",
"sha256:8f264ba2701b8c9f815b272ad568d555ef98dfe1576802ab3149c3629a9f2221",
"sha256:9342dd70a1e151684727c9c91ea003b2fb33523bf19385d4554f7897ca0141d4",
"sha256:9361de40701666b034c59ad9e317bae95c973b9ff92513dd0eced11c6adf2e21",
"sha256:9669179786254a2e7e57f0ecf224e978471491d660aaca833f845b72a2df3709",
"sha256:aac1ba0a253e17889550ddb1b60a2063f7474155465577caa2a3b131224cfd54",
"sha256:aef72eae10b5e3116bac6957de1df4d75909fc76d1499a53fb6387434b6bcd8d",
"sha256:bd3166bb3b111e76a4f8e2980fa1addf2920a4ca9b2b8ca36a3bc3dedc618270",
"sha256:c1b78fb9700fc961f53386ad2fd86d87091e06ede5d118b8a50dea285a071c24",
"sha256:c3888a051226e676e383de03bf49eb633cd39fc829516e5334e69b8d81aae751",
"sha256:c5f17ad25d2c1286436761b462e22b5020d83316f8e8fcb5deb2b3151f8f1d3a",
"sha256:c851b35fc078389bc16b915a0a7c1d5923e12e2c5aeec58c52f4aa8085ac8237",
"sha256:cb7df71de0af56000115eafd000b867d1261f786b5eebd88a0ca6360cccfaca7",
"sha256:cedb2f9e1f990918ea061f28a0f0077a07702e3819602d3507e2ff98c8d20636",
"sha256:e8caf961e1b1a945db76f1b5fa9c91498d15f545ac0ababbe575cfab185d3bd8"
"sha256:08b3ba72bd981531fd557f67beee376d6700fba183b167857038997ba30dd297",
"sha256:2757fa64e11ec12220968f65d086b7a29b6583d16e9a544c889b22ba98555ef1",
"sha256:3102bb2c206700a7d28181dbe04d66b30780cde1d1c02c5f3c165cf3d2489497",
"sha256:3498b27d8236057def41de3585f317abae235dd3a11d33e01736ffedb2ef8606",
"sha256:378ac77af41350a8c6b8801a66021b52da8a05fd77e578b7380e876c0ce4f528",
"sha256:38f16b1317b8dd82df67ed5daa5f5e7c959e46579840d77a67a4ceb9cef0a50b",
"sha256:3911c2ef96e5ddc748a3c8b4702c61986628bb719b8378bf1e4a6184bbd48fe4",
"sha256:3a3c3f8863255f3c31db3889f8055989527173ef6192a283eb6f4db3c579d830",
"sha256:3b14b1da110ea50c8bcbadc3b82c3933974dbeea1832e814aab93ca1163cd4c1",
"sha256:535dc1e6e68fad5355f9984d5637c33badbdc987b0c0d303ee95a6c979c9516f",
"sha256:6f61319e33222591f885c598e3e24f6a4be3533c1d70c19e0dc59e83a71ce27d",
"sha256:723d22d324e7997a651478e9c5a3120a0ecbc9a7e94071f7e1954562a8806cf3",
"sha256:76b2775dda7e78680d688daabcb485dc87cf5e3184a0b3e012e1d40e38527cc8",
"sha256:782a5c7df9f91979a7a21792e09b34a658058896628217ae6362088b123c8500",
"sha256:7e4d159021c2029b958b2363abec4a11db0ce8cd43abb0d9ce44284cb97217e7",
"sha256:8dacc4073c359f40fcf73aede8428c35f84639baad7e1b46fce5ab7a8a7be4bb",
"sha256:8f33d1156241c43755137288dea619105477961cfa7e47f48dbf96bc2c30720b",
"sha256:8ffd4b204d7de77b5dd558cdff986a8274796a1e57813ed005b33fd97e29f059",
"sha256:93a280c9eb736a0dcca19296f3c30c720cb41a71b1f9e617f341f0a8e791a69b",
"sha256:9a4f66259bdd6964d8cf26142733c81fb562252db74ea367d9beb4f815478e72",
"sha256:9a9d4ff06804920388aab69c5ea8a77525cf165356db70131616acd269e19b36",
"sha256:a2070c5affdb3a5e751f24208c5c4f3d5f008fa04d28731416e023c93b275277",
"sha256:a4857f7e2bc6921dbd487c5c88b84f5633de3e7d416c4dc0bb70256775551a6c",
"sha256:a607ae05b6c96057ba86c811d9c43423f35e03874ffb03fbdcd45e0637e8b631",
"sha256:a66ca3bdf21c653e47f726ca57f46ba7fc1f260ad99ba783acc3e58e3ebdb9ff",
"sha256:ab110c48bc3d97b4d19af41865e14531f300b482da21783fdaacd159251890e8",
"sha256:b239711e774c8eb910e9b1ac719f02f5ae4bf35fa0420f438cdc3a7e4e7dd6ec",
"sha256:be0416074d7f253865bb67630cf7210cbc14eb05f4099cc0f82430135aaa7a3b",
"sha256:c46643970dff9f5c976c6512fd35768c4a3819f01f61169d8cdac3f9290903b7",
"sha256:c5ec71fd4a43b6d84ddb88c1df94572479d9a26ef3f150cef3dacefecf888105",
"sha256:c6e5174f8ca585755988bc278c8bb5d02d9dc2e971591ef4a1baabdf2d99589b",
"sha256:c89b558f8a9a5a6f2cfc923c304d49f0ce629c3bd85cb442ca258ec20366394c",
"sha256:cc44e3545d908ecf3e5773266c487ad1877be718d9dc65fc7eb6e7d14960985b",
"sha256:cc6f8246e74dd210d7e2b56c76ceaba1cc52b025cd75dbe96eb48791e0250e98",
"sha256:cd556c79ad665faeae28020a0ab3bda6cd47d94bec48e36970719b0b86e4dcf4",
"sha256:ce6f3a147b4b1a8b09aae48517ae91139b1b010c5f36423fa2b866a8b23df879",
"sha256:ceb499d2b3d1d7b7ba23abe8bf26df5f06ba8c71127f188333dddcf356b4b63f",
"sha256:cef06fb382557f66d81d804230c11ab292d94b840b3cb7bf4450778377b592f4",
"sha256:e448f56cfeae7b1b3b5bcd99bb377cde7c4eb1970a525c770720a352bc4c8044",
"sha256:e52d3d95df81c8f6b2a1685aabffadf2d2d9ad97203a40f8d61e51b70f191e4e",
"sha256:ee2f1d1c223c3d2c24e3afbb2dd38be3f03b1a8d6a83ee3d9eb8c36a52bee899",
"sha256:f2c6888eada180814b8583c3e793f3f343a692fc802546eed45f40a001b1169f",
"sha256:f51dbba78d68a44e99d484ca8c8f604f17e957c1ca09c3ebc2c7e3bbd9ba0448",
"sha256:f54de00baf200b4539a5a092a759f000b5f45fd226d6d25a76b0dff71177a714",
"sha256:fa10fee7e32213f5c7b0d6428ea92e3a3fdd6d725590238a3f92c0de1c78b9d2",
"sha256:fabeeb121735d47d8eab8671b6b031ce08514c86b7ad8f7d5490a7b6dcd6267d",
"sha256:fac3c432851038b3e6afe086f777732bcf7f6ebbfd90951fa04ee53db6d0bcdd",
"sha256:fda29412a66099af6d6de0baa6bd7c52674de177ec2ad2630ca264142d69c6c7",
"sha256:ff1330e8bc996570221b450e2d539134baa9465f5cb98aff0e0f73f34172e0ae"
],
"index": "pypi",
"version": "==5.3"
"version": "==5.3.1"
},
"iniconfig": {
"hashes": [

View File

@ -2,51 +2,27 @@
"cells": [
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(array([16, 11, 6, 10, 3, 7, 17, 13, 9, 8]), array([1.58281495e+18, 1.58288336e+18, 1.58295176e+18, 1.58302017e+18,\n",
" 1.58308857e+18, 1.58315698e+18, 1.58322538e+18, 1.58329379e+18,\n",
" 1.58336219e+18, 1.58343060e+18, 1.58349900e+18])) 10\n"
]
},
{
"ename": "NameError",
"evalue": "name 'ax' is not defined",
"ename": "ModuleNotFoundError",
"evalue": "No module named 'connexion'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-36-f7ba04e4ddbf>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 14\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 16\u001b[0;31m \u001b[0mlabels\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0max\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_xticks\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtolist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 17\u001b[0m \u001b[0mlabels\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpd\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mto_datetime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 18\u001b[0m \u001b[0max\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_xticklabels\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabels\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrotation\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m90\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mNameError\u001b[0m: name 'ax' is not defined"
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-5-7e591104151e>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;31m#import connexion\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mopen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'train.pickle'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'rb'\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpickle\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mf\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;32m~/Jobs/uva-covid19-testing-communicator/communicator/__init__.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mfunctools\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mwraps\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 12\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 13\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mconnexion\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 14\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0msentry_sdk\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 15\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mconnexion\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mProblemException\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'connexion'"
]
}
],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"\n",
"import matplotlib.pyplot as plt\n",
"\n",
"\n",
"\n",
"serie = pd.Series([0.0,950.0,-70.0,812.0,0.0,-90.0,0.0,0.0,-90.0,0.0,-64.0,208.0,0.0,-90.0,0.0,-80.0,0.0,0.0,-80.0,-48.0,840.0,-100.0,190.0,130.0,-100.0,-100.0,0.0,-50.0,0.0,-100.0,-100.0,0.0,-90.0,0.0,-90.0,-90.0,63.0,-90.0,0.0,0.0,-90.0,-80.0,0.0,])\n",
"\n",
"df = [i for i in np.random.randint(1582800000000000000, 1583500000000000000, 100, dtype=np.int64)]\n",
"\n",
"print(np.histogram(np.array(df).astype(np.int64)),10)\n",
"\n",
"\n",
"\n",
"labels = ax.get_xticks().tolist()\n",
"labels = pd.to_datetime(labels)\n",
"ax.set_xticklabels(labels, rotation=90)\n",
"plt.show()\n",
"print(x)\n"
"import pickle\n",
"#import connexion\n",
"with open('train.pickle', 'rb') as f:\n",
" data = pickle.load(f)\n"
]
},
{
@ -72,13 +48,21 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[39m\u001b[22mShell for\u001b[39m\u001b[22m \u001b[32m\u001b[1m/Users/nilewalker/.local/share/virtualenvs/uva-covid19-testing-communicator-1KYG4XxT\u001b[39m\u001b[22m \u001b[39m\u001b[1malready activated.\u001b[39m\u001b[22m\n",
"No action taken to avoid nested environments.\n",
"\u001b[0m"
]
}
],
"source": [
"import datetime \n",
"\n",
"dt = datetime.datetime.now()\n"
"!pipenv shell\n"
]
},
{
@ -103,11 +87,48 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"outputs": [
{
"ename": "ModuleNotFoundError",
"evalue": "No module named 'connexion'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-4-4cfd4c2644a8>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 10\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mfunctools\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mwraps\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 12\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mconnexion\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 13\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0msentry_sdk\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 14\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mconnexion\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mProblemException\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'connexion'"
]
}
],
"source": [
"dt.timestamp()"
"import random\n",
"import csv\n",
"import io\n",
"import json\n",
"\n",
"import logging\n",
"import os\n",
"from datetime import datetime\n",
"from datetime import date\n",
"from functools import wraps\n",
"\n",
"import connexion\n",
"import sentry_sdk\n",
"from connexion import ProblemException\n",
"from flask import render_template, request, redirect, url_for, flash, abort, Response, send_file, session\n",
"from flask_assets import Environment\n",
"from flask_cors import CORS\n",
"from flask_mail import Mail\n",
"from flask_marshmallow import Marshmallow\n",
"from flask_migrate import Migrate\n",
"from flask_paginate import Pagination, get_page_parameter\n",
"from flask_sqlalchemy import SQLAlchemy\n",
"from sqlalchemy import func\n",
"from sentry_sdk.integrations.flask import FlaskIntegration\n",
"from webassets import Bundle\n",
"from flask_executor import Executor"
]
},
{

View File

@ -1,4 +1,5 @@
import random
import csv
import io
import json
@ -82,14 +83,14 @@ scss = Bundle(
output='argon.css'
)
assets.register('app_scss', scss)
import random
connexion_app.add_api('api.yml', base_path='/v1.0')
from communicator import forms
from communicator import api
from communicator import models
from datetime import date, timedelta
connexion_app.add_api('api.yml', base_path='/v1.0')
# Convert list of allowed origins to list of regexes
origins_re = [r"^https?:\/\/%s(.*)" % o.replace('.', '\.')
for o in app.config['CORS_ALLOW_ORIGINS']]
@ -106,6 +107,7 @@ if app.config['ENABLE_SENTRY']:
# HTML Pages
BASE_HREF = app.config['APPLICATION_ROOT'].strip('/')
def superuser(f):
@wraps(f)
def decorated_function(*args, **kwargs):
@ -118,27 +120,27 @@ def superuser(f):
return f(*args, **kwargs)
return decorated_function
@app.errorhandler(404)
@superuser
def page_not_found(e):
# note that we set the 404 status explicitly
return render_template('pages/404.html')
@app.route('/', methods=['GET', 'POST'])
@superuser
def index():
from communicator.models import Sample
from communicator.tables import SampleTable
download = False
form = forms.SearchForm(request.form)
action = BASE_HREF + "/"
samples = db.session.query(Sample).order_by(Sample.date.desc())
if request.method == "POST" or request.args.get('cancel') == 'true':
session["index_filter"] = {} # Clear out the session if it is invalid.
if form.validate():
session["index_filter"] = {}
if form.startDate.data:
@ -149,37 +151,50 @@ def index():
session["index_filter"]["student_id"] = form.studentId.data
if form.location.data:
session["index_filter"]["location"] = form.location.data
if form.email.data:
session["index_filter"]["email"] = form.email.data
if form.compute_id.data:
session["index_filter"]["compute_id"] = form.compute_id.data
# # Store previous form submission settings in the session, so they are preseved through pagination.
# Store previous form submission settings in the session, so they are preseved through pagination.
filtered_samples = samples
if "index_filter" in session:
filters = session["index_filter"]
try:
if "start_date" in filters:
filtered_samples = filtered_samples.filter(Sample.date >= filters["start_date"])
filtered_samples = filtered_samples.filter(
Sample.date >= filters["start_date"])
else:
filtered_samples = filtered_samples.filter(Sample.date >= date.today())
filtered_samples = filtered_samples.filter(
Sample.date >= date.today())
filters["start_date"] = date.today()
if "end_date" in filters:
filtered_samples = filtered_samples.filter(Sample.date <= filters["end_date"])
filtered_samples = filtered_samples.filter(
Sample.date <= filters["end_date"])
else:
filters["end_date"] = date.today() + timedelta(1)
if "student_id" in filters:
filtered_samples = filtered_samples.filter(
Sample.student_id.in_(filters["student_id"].split()))
if "location" in filters:
filtered_samples = filtered_samples.filter(
Sample.location.in_(filters["location"].split()))
if "email" in filters:
if "station" in filters:
filtered_samples = filtered_samples.filter(
Sample.email.ilike(filters["email"] + "%"))
Sample.station.in_(filters["station"].split()))
if "compute_id" in filters:
filtered_samples = filtered_samples.filter(
Sample.compute_id.in_(filters["compute_id"].split()))
except Exception as e:
logging.error("Encountered an error building filters, so clearing. " + str(e))
logging.error(
"Encountered an error building filters, so clearing. " + str(e))
session["index_filter"] = {}
else:
# Default to Todays Results
filtered_samples = filtered_samples.filter(Sample.date >= date.today())
filters = dict()
filters["start_date"] = date.today()
filters["end_date"] = date.today() + timedelta(1)
filtered_samples = filtered_samples.filter(
Sample.date >= filters["start_date"])
if request.args.get('download') == 'true':
csv = __make_csv(filtered_samples)
return send_file(csv, attachment_filename='data_export.csv', as_attachment=True)
@ -188,130 +203,166 @@ def index():
# Analysis
station_charts = []
location_chart = {"datasets": []}
stats = dict()
weekday_totals = [0 for _ in range(7)] # Mon, Tues, ...
hour_totals = [0 for _ in range(24)] # 12AM, 1AM, ...
############# Helper Variables ##################
start_date = filters["start_date"] if "start_date" in filters else date.today()
end_date = filters["end_date"] if "end_date" in filters else date.today() + timedelta(7)
# days = abs(start_date - end_date).days
# weeks_apart = days // 7 if days > 7 else 1
loc_sat_data = dict()
station_stats = dict() # {dict(), ...}
today = date.today()
one_week_ago = filters["end_date"] - timedelta(7)
two_weeks_ago = one_week_ago - timedelta(7)
weekday_totals = [0 for _ in range(7)] # Mon, Tues, ...
hour_totals = [0 for _ in range(24)] # 12AM, 1AM, ...
############# Helper Variables ##################
if filtered_samples.count() > 0:
date_range = (
filtered_samples[-1].date.timestamp(), filtered_samples[0].date.timestamp())
# Get Active Locations Info
active_stations = ["10", "20", "30", "40", "50", "60"]
# Seperate Data by location and station
location_data = dict()
sample_times = dict()
active_stations = set()
location_stats = dict()
# Seperate Data by location and station
loc_sat_data = dict()
sample_times = dict()
# Sort Data
for entry in filtered_samples:
loc_code = str(entry.location)[:2]
stat_code= str(entry.location)[2:]
active_stations.add(stat_code)
stat_code = str(entry.location)[2:]
if loc_code not in location_data:
location_data[loc_code] = [entry]
sample_times[loc_code] = [entry.date.timestamp()]
else:
location_data[loc_code].append(entry)
sample_times[loc_code].append(entry.date.timestamp())
############# #######################
stats["all"] = filtered_samples.count()
############# Daily Total #######################
stats["today"] = samples.filter(Sample.date >= date.today()).count()
############# Last 2 Week Average ###############
stats["weeks"] = round(samples.filter(Sample.date >= (date.today() - timedelta(14))).count() / 14,2)
################# Busiest Days/Hours ############
if filtered_samples.count() > 0:
for entry in filtered_samples:
weekday_totals[entry.date.weekday()] += 1
hour_totals[entry.date.hour] += 1
weekday_totals[entry.date.weekday()] += 1
hour_totals[entry.date.hour] += 1
# When iterating through the initial quarry if this
# location has yet to be seen add it to the data set and if it has continue to update it
if loc_code not in loc_sat_data:
loc_sat_data[loc_code] = dict()
sample_times[loc_code] = []
Range = (filtered_samples[-1].date.timestamp(),filtered_samples[0].date.timestamp())
for loc_code in location_data.keys():
############# Build histogram ###################
color = [hash(loc_code), 128, (hash(loc_code) % 256 + 128) % 256]
single_hist = dict({
"label": loc_code,
"borderColor": f'rgba({color[0]},{color[1]},{color[2]},.7)',
"pointBorderColor": f'rgba({color[0]},{color[1]},{color[2]},1)',
"borderWidth": 8,
"data": [],
if stat_code not in loc_sat_data[loc_code]:
loc_sat_data[loc_code][stat_code] = dict()
loc_sat_data[loc_code][stat_code]["two_week_ago"] = 0
loc_sat_data[loc_code][stat_code]["one_week_ago"] = 0
loc_sat_data[loc_code][stat_code]["today"] = 0
loc_sat_data[loc_code][stat_code]["total"] = 0
loc_sat_data[loc_code][stat_code]["entries"] = []
# The previous if statement has guaranteed that this will not return a key error
# as if the location code or station code or not present in the loc_sat_data dictionary
# they will have been added by this point
loc_sat_data[loc_code][stat_code]["total"] += 1
loc_sat_data[loc_code][stat_code]["entries"].append(entry)
sample_times[loc_code].append(entry.date.timestamp())
if entry.date.date() >= two_weeks_ago:
loc_sat_data[loc_code][stat_code]["two_week_ago"] += 1
if entry.date.date() >= one_week_ago:
loc_sat_data[loc_code][stat_code]["one_week_ago"] += 1
if entry.date.date() >= today:
loc_sat_data[loc_code][stat_code]["today"] += 1
station_stats = []
general_today = 0
general_one_week_ago = 0
general_two_week_ago = 0
general_total = 0
for loc_code in loc_sat_data:
############# Build histogram ###################
color = [hash(loc_code), 128, (hash(loc_code) % 256 + 128) % 256]
single_hist = dict({
"label": loc_code,
"borderColor": f'rgba({color[0]},{color[1]},{color[2]},.7)',
"pointBorderColor": f'rgba({color[0]},{color[1]},{color[2]},1)',
"borderWidth": 8,
"data": [],
})
# https://stackoverflow.com/questions/19442224/getting-information-for-bins-in-matplotlib-histogram-function
hist, bin_edges = np.histogram(
np.array(sample_times[loc_code]), range=date_range)
bins = [bin_edges[i]+(bin_edges[i+1]-bin_edges[i]) /
2 for i in range(len(bin_edges)-1)]
for cnt, time in zip(hist, bins):
single_hist["data"].append({
"x": datetime.utcfromtimestamp(time), "y": int(cnt)
})
# https://stackoverflow.com/questions/19442224/getting-information-for-bins-in-matplotlib-histogram-function
hist, bin_edges = np.histogram(np.array(sample_times[loc_code]),range=Range)
bins = [bin_edges[i]+(bin_edges[i+1]-bin_edges[i]) /
2 for i in range(len(bin_edges)-1)]
for cnt, time in zip(hist, bins):
single_hist["data"].append({
"x": datetime.utcfromtimestamp(time), "y": int(cnt)
})
location_chart["datasets"].append(single_hist)
############## Build Station Graph ##############
station_lines = []
# Read Data by station
i = 0
for stat_code in active_stations:
filtered_entries = [_entry for _entry in location_data[loc_code] if str(_entry.location)[2:] == stat_code] # ! Inefficient but works for rn
if len(filtered_entries) == 0: continue
station_line = {"label": stat_code,
"borderColor": f'rgba(50,255,255,.7)',
"pointBorderColor": f'rgba(50,255,255,1)',
"borderWidth": 10,
"data": [
{"x": filtered_entries[0].date, "y": i}, {"x": filtered_entries[-1].date, "y": i},
],
}
i += 1
station_lines.append(station_line)
station_charts.append({"datasets": station_lines, "labels" : []})
#################################################
# # Check for Unresponsive
# for loc_code in active_stations:
# if loc_code not in location_data:
# location_dict["datasets"].append({
# "label": loc_code,
# "borderColor": f'rgba(128,128,128,.7)',
# "pointBorderColor": f'rgba(128,128,128,1)',
# "borderWidth": 10,
# "data": [{
# "x": session["index_filter"]["start_date"], "y": i
# }, ],
# })
# i += 1
location_chart["datasets"].append(single_hist)
station_lines = []
i = 0
today = 0
one_week_ago = 0
two_week_ago = 0
total = 0
for stat_code in loc_sat_data[loc_code]:
############## Station Stats ##############
today += loc_sat_data[loc_code][stat_code]["today"]
one_week_ago += loc_sat_data[loc_code][stat_code]["one_week_ago"]
two_week_ago += loc_sat_data[loc_code][stat_code]["two_week_ago"]
total += loc_sat_data[loc_code][stat_code]["total"]
############## Build Station Uptime Graph ##############
i += 1
station_lines.append({
"label": stat_code,
"borderColor": f'rgba(50,255,255,.7)',
"pointBorderColor": f'rgba(50,255,255,1)',
"borderWidth": 10,
"data": [
{"x": loc_sat_data[loc_code][stat_code]["entries"][0].date, "y": i}, {
"x": loc_sat_data[loc_code][stat_code]["entries"][-1].date, "y": i},
]})
station_charts.append({"datasets": station_lines, "labels": []})
station_stats.append({
"today":today,
"one_week_ago":round(one_week_ago/7,2),
"two_week_ago":round(two_week_ago/14,2),
"average":round(total/len(loc_sat_data[loc_code]),2),
})
general_today = today
general_one_week_ago = one_week_ago
general_two_week_ago += two_week_ago
general_total += total
location_stats = {
"today":general_today,
"one_week_ago":round(general_one_week_ago/7,2),
"two_week_ago":round(general_two_week_ago/14,2),
"average":general_total #round(total/len(loc_sat_data[loc_code]),2),
}
################# Raw Samples Table ##############
page = request.args.get(get_page_parameter(), type=int, default=1)
pagination = Pagination(page=page, total=filtered_samples.count(
), search=False, record_name='samples', css_framework='bootstrap4')
table = SampleTable(filtered_samples.paginate(page, 10, error_out=False).items)
table = SampleTable(filtered_samples.paginate(
page, 10, error_out=False).items)
return render_template('layouts/default.html',
base_href=BASE_HREF,
content=render_template(
'pages/index.html',
form=form,
table=table,
action=action,
pagination=pagination,
location_data=location_chart,
station_data=station_charts,
weekday_totals=weekday_totals,
hour_totals=hour_totals,
stats = stats
))
base_href=BASE_HREF,
content=render_template(
'pages/index.html',
form=form,
show = request.args.get('currently_showing',-1),
table=table,
action=action,
pagination=pagination,
location_data=location_chart,
station_data=station_charts,
station_stats=station_stats, # List<dict>
location_stats=location_stats,
weekday_totals=weekday_totals,
hour_totals=hour_totals,
))
@app.route('/activate', methods=['GET', 'POST'])
@superuser
def activate_station():
return render_template('layouts/default.html',
base_href=BASE_HREF,
content=render_template(
'pages/stations.html'))
base_href=BASE_HREF,
content=render_template(
'pages/stations.html'))
def __make_csv(sample_query):
csvfile = io.StringIO()

View File

@ -27,5 +27,5 @@ class SearchForm(FlaskForm):
endDate = DateField("End Date (YYYY-MM-DD)", id="endDate", validators=[validators.Optional()],render_kw={"class":"datepicker"})
studentId = TextAreaField('Student Id')
location = TextAreaField('Location')
email = TextAreaField('Email')
# download = BooleanField('Download Results')
station = TextAreaField('Station')
compute_id = TextAreaField('Compute ID')

View File

@ -27,7 +27,7 @@
<a class="nav-link" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<div class="media align-items-center">
<span class="avatar avatar-sm rounded-circle">
<img alt="Image placeholder" src="/static/assets/img/theme/team-1-800x800.jpg">
<img alt="Image placeholder">
</span>
</div>
</a>

View File

@ -1,104 +1,102 @@
<div class="header bg-primary pb-8 pt-5 pt-md-8">
<div class="container-fluid">
<div class="header-body">
<!-- Card stats -->
<div class="row">
<div class="col-xl-3 col-lg-6">
<div class="card card-stats mb-4 mb-xl-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="card-title text-uppercase text-muted mb-0">Samples Today</h5>
<div class="header bg-primary pb-8 pt-5 pt-md-8">
<div class="container-fluid">
<div class="header-body">
<!-- Card stats -->
<div class="row">
<div class="col-xl-3 col-lg-6">
<div class="card card-stats mb-4 mb-xl-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="card-title text-uppercase text-muted mb-0">Samples Today</h5>
<span id="stats_today" class="h2 font-weight-bold mb-0">.</span>
<span id="stats_traffic" class="h2 font-weight-bold mb-0">{{stats.today|safe}}</span>
</div>
<div class="col-auto">
<div class="icon icon-shape bg-danger text-white rounded-circle shadow">
<em class="fas fa-chart-bar"></em>
</div>
</div>
</div>
<div class="col-auto">
<div class="icon icon-shape bg-danger text-white rounded-circle shadow">
<em class="fas fa-chart-bar"></em>
</div>
<!-- <p class="mt-3 mb-0 text-muted text-sm">
</div>
</div>
<!-- <p class="mt-3 mb-0 text-muted text-sm">
<span class="text-success mr-2"><em class="fa fa-arrow-up"></em> 3.48%</span>
<span class="text-nowrap">Since Yesterday</span>
</p> -->
</div>
</div>
</div>
<div class="col-xl-3 col-lg-6">
<div class="card card-stats mb-4 mb-xl-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="card-title text-uppercase text-muted mb-0">1 Week Average</h5>
<span id="stats_one_week" class="h2 font-weight-bold mb-0">.</span>
</div>
<div class="col-auto">
<div class="icon icon-shape bg-warning text-white rounded-circle shadow">
<em class="fas fa-chart-pie"></em>
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-lg-6">
<div class="card card-stats mb-4 mb-xl-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="card-title text-uppercase text-muted mb-0">2 Week Average</h5>
<span id="stats_users" class="h2 font-weight-bold mb-0">{{stats.weeks|safe}}</span>
</div>
<div class="col-auto">
<div class="icon icon-shape bg-warning text-white rounded-circle shadow">
<em class="fas fa-chart-pie"></em>
</div>
</div>
</div>
<!-- <p class="mt-3 mb-0 text-muted text-sm">
<!-- <p class="mt-3 mb-0 text-muted text-sm">
<span class="text-danger mr-2"><em class="fas fa-arrow-down"></em> 3.48%</span>
<span class="text-nowrap">Since last week</span>
</p> -->
</div>
</div>
</div>
<div class="col-xl-3 col-lg-6">
<div class="card card-stats mb-4 mb-xl-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="card-title text-uppercase text-muted mb-0">2 Week Average
</h5>
<span id="stats_two_weeks" class="h2 font-weight-bold mb-0">.</span>
</div>
<div class="col-auto">
<div class="icon icon-shape bg-yellow text-white rounded-circle shadow">
<em class="fas fa-users"></em>
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-lg-6">
<div class="card card-stats mb-4 mb-xl-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="card-title text-uppercase text-muted mb-0">Samples in Search
</h5>
<span id="stats_sales" class="h2 font-weight-bold mb-0">{{stats.all|safe}}</span>
</div>
<div class="col-auto">
<div class="icon icon-shape bg-yellow text-white rounded-circle shadow">
<em class="fas fa-users"></em>
</div>
</div>
</div>
<!-- <p class="mt-3 mb-0 text-muted text-sm">
<!-- <p class="mt-3 mb-0 text-muted text-sm">
<span class="text-warning mr-2"><em class="fas fa-arrow-down"></em> N/A%</span>
<span class="text-nowrap">Since yesterday</span>
</p> -->
</div>
</div>
</div>
<div class="col-xl-3 col-lg-6">
<div class="card card-stats mb-4 mb-xl-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="card-title text-uppercase text-muted mb-0">Performance</h5>
<span id="stats_avg" class="h2 font-weight-bold mb-0">.</span>
</div>
<div class="col-auto">
<div class="icon icon-shape bg-info text-white rounded-circle shadow">
<em class="fas fa-percent"></em>
</div>
</div>
</div>
</div>
<div class="col-xl-3 col-lg-6">
<div class="card card-stats mb-4 mb-xl-0">
<div class="card-body">
<div class="row">
<div class="col">
<h5 class="card-title text-uppercase text-muted mb-0">Performance</h5>
<span id="stats_perf" class="h2 font-weight-bold mb-0">N/A</span>
</div>
<div class="col-auto">
<div class="icon icon-shape bg-info text-white rounded-circle shadow">
<em class="fas fa-percent"></em>
</div>
</div>
</div>
<!-- <p class="mt-3 mb-0 text-muted text-sm">
<!-- <p class="mt-3 mb-0 text-muted text-sm">
<span class="text-success mr-2"><em class="fas fa-arrow-up"></em> 12%</span>
<span class="text-nowrap">Since last month</span>
</p> -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -54,10 +54,11 @@
</div>
<div class="table-responsive">
<!-- Projects table -->
<table class="table align-items-center table-flush">
<tbody>
<input type="hidden" id="currently_showing" name="currently_showing">
{% for field in form if field.name != "csrf_token" %}
<tr>
@ -79,7 +80,7 @@
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
@ -112,53 +113,56 @@
</div>
</div>
<div class="row mt-2">
<div class="col mb-5 mb-xl-0">
<div class="card shadow">
<div class="card-header border-0">
<div class="row align-items-center">
<div class="col">
<h3 class="mb-0">Records to be processed</h3>
</div>
<div class="col text-right">
<a href="{{ url_for('index') }}?download=true" class="btn btn-sm btn-primary">Download all</a>
</div>
<div class="row mt-2">
<div class="col mb-5 mb-xl-0">
<div class="card shadow">
<div class="card-header border-0">
<div class="row align-items-center">
<div class="col">
<h3 class="mb-0">Records to be processed</h3>
</div>
<div class="col text-right">
<a href="{{ url_for('index') }}?download=true" class="btn btn-sm btn-primary">Download all</a>
</div>
</div>
<div class="table-responsive">
<!-- Projects table -->
{{ table }}
</div>
<div class="row justify-content-center">
{{ pagination.links }}
</div>
</div>
<div class="table-responsive">
<!-- Projects table -->
{{ table }}
</div>
<div class="row justify-content-center">
{{ pagination.links }}
</div>
</div>
</div>
</div>
</div>
</form>
<!-- <script src="{{url_for('static', filename='assets/js/graph.js')}}"></script> -->
</div>
</form>
<!-- <script src="{{url_for('static', filename='assets/js/graph.js')}}"></script> -->
<script>
var location_data = JSON.parse('{{ location_data | tojson | safe}}');
var station_data = JSON.parse('{{ station_data | tojson | safe}}');
<script>
var location_data = JSON.parse('{{ location_data | tojson | safe}}');
var station_data = JSON.parse('{{ station_data | tojson | safe}}');
var weekday_totals = JSON.parse('{{ weekday_totals | tojson | safe}}');
var hour_totals = JSON.parse('{{ hour_totals | tojson | safe}}');
var weekday_totals = JSON.parse('{{ weekday_totals | tojson | safe}}');
var hour_totals = JSON.parse('{{ hour_totals | tojson | safe}}');
var timeFormat = 'YYYY-MM-DD h:mm:ss.SSS';
var location_stats = JSON.parse('{{ location_stats | tojson | safe}}');
var station_stats = JSON.parse('{{ station_stats | tojson | safe}}');
var per_week = new Chart(document.getElementById('week-chart').getContext('2d'), {
var timeFormat = 'YYYY-MM-DD h:mm:ss.SSS';
var per_week = new Chart(document.getElementById('week-chart').getContext('2d'), {
type: 'horizontalBar',
data: {
labels: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
datasets: [
{
label: "Total Samples",
backgroundColor: ["#3e95cd", "#8e5ea2","#3cba9f","#e8c3b9","#c45850","#7e3eb2","#1c41bf"],
backgroundColor: ["#3e95cd", "#8e5ea2", "#3cba9f", "#e8c3b9", "#c45850", "#7e3eb2", "#1c41bf"],
data: weekday_totals
}
]
@ -166,22 +170,24 @@
options: {
responsive: true,
maintainAspectRatio: false,
legend: { display: false
legend: {
display: false
},
title: {
display: true,
text: 'Predicted world population (millions) in 2050'
text: 'Sample count by day'
}
}});
}
});
var per_hour = new Chart(document.getElementById('time-chart').getContext('2d'), {
var per_hour = new Chart(document.getElementById('time-chart').getContext('2d'), {
type: 'horizontalBar',
data: {
labels: ["1 AM", "2 AM", "3 AM", "4 AM", "5 AM", "6 AM", "7 AM", "8 AM", "9 AM", "10 AM","11 AM", "12 AM", "1 PM", "2 PM", "3 PM", "4 PM", "5 PM", "6 PM", "7 PM", "8 PM", "9 PM", "10 PM","11 PM", "12 PM", ],
labels: ["1 AM", "2 AM", "3 AM", "4 AM", "5 AM", "6 AM", "7 AM", "8 AM", "9 AM", "10 AM", "11 AM", "12 AM", "1 PM", "2 PM", "3 PM", "4 PM", "5 PM", "6 PM", "7 PM", "8 PM", "9 PM", "10 PM", "11 PM", "12 PM",],
datasets: [
{
label: "Sample Count",
backgroundColor: ["#3e95cd", "#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd","#3e95cd",],
backgroundColor: ["#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd", "#3e95cd",],
data: hour_totals
}
]
@ -189,91 +195,109 @@
options: {
responsive: true,
maintainAspectRatio: false,
legend: { display: false
legend: {
display: false
},
title: {
display: true,
text: 'Predicted world population (millions) in 2050'
text: 'Sample count by hour'
}
}
});
var per_location = new Chart(document.getElementById('data-chart').getContext('2d'), {
// The type of chart we want to create
type: 'line',
data: location_data,
});
// Configuration options go here
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: false,
},
legend: {
display: true,
position: "right",
onClick: location_legend,
labels: {
usePointStyle: true,
fontColor: '#FFFFFF',
fontSize: 15,
padding: 20,
fontStyle: 'bold'
}
},
scales: {
xAxes: [{
type: "time",
time: {
format: timeFormat,
tooltipFormat: 'll'
},
scaleLabel: {
display: true,
labelString: 'Date'
}
}],
yAxes: [{
scaleLabel: {
display: false,
}
}]
var per_location = new Chart(document.getElementById('data-chart').getContext('2d'), {
// The type of chart we want to create
type: 'line',
data: location_data,
// Configuration options go here
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: false,
},
legend: {
display: true,
position: "right",
onClick: location_legend,
labels: {
usePointStyle: true,
fontColor: '#FFFFFF',
fontSize: 15,
padding: 20,
fontStyle: 'bold'
}
},
scales: {
xAxes: [{
type: "time",
time: {
format: timeFormat,
tooltipFormat: 'll'
},
scaleLabel: {
display: true,
labelString: 'Date'
}
}],
yAxes: [{
scaleLabel: {
display: false,
}
}]
}
}
);
});
function station_legend(e, legendItem) {
per_location.config.data = location_data;
per_location.config.options.legend.onClick = location_legend;
$('#chart-title').text("Location Activity");
per_location.update();
};
function station_legend(e, legendItem) { // Clicking out of station view
per_location.config.data = location_data;
per_location.config.options.legend.onClick = location_legend;
$('#stats_today').text(location_stats.today);
$('#stats_one_week').text(location_stats.one_week_ago);
$('#stats_two_weeks').text(location_stats.two_week_ago);
$('#stats_avg').text(location_stats.average);
$('input[name="currently_showing"]').val(-1);
per_location.update();
};
function location_legend(e, legendItem) {
$('#chart-title').text("Station Activity @ " + per_location.data.datasets[legendItem.datasetIndex].label);
per_location.config.data = station_data[legendItem.datasetIndex];
function location_legend(e, legendItem) {
showLocation(legendItem.datasetIndex);
};
function showLocation(num){
if (num != -1 & num != ""){
$('#chart-title').text("Station Activity @ " + per_location.data.datasets[num].label);
per_location.config.data = station_data[num];
per_location.config.options.legend.onClick = station_legend;
$('#stats_today').text(station_stats[num].today);
$('#stats_one_week').text(station_stats[num].one_week_ago);
$('#stats_two_weeks').text(station_stats[num].two_week_ago);
$('#stats_avg').text(station_stats[num].average);
$('input[name="currently_showing"]').val(num);
per_location.update();
};
</script>
<script>
var auto_refresh = setInterval(
function () {
submitform();
}, 30000);
function submitform() {
$("#pageForm").submit();
} else {
$('#stats_today').text(location_stats.today);
$('#stats_one_week').text(location_stats.one_week_ago);
$('#stats_two_weeks').text(location_stats.two_week_ago);
$('#stats_avg').text(location_stats.average);
$('input[name="currently_showing"]').val(-1);
}
</script>
<script>
$('.datepicker').datepicker({
showButtonPanel: true,
localToday: new Date(), // This option determines the highlighted today date
format: 'yyyy-mm-dd',
todayHighlight: true,
});
</script>
}
showLocation('{{show | safe}}');
</script>
<script>
var auto_refresh = setInterval(
function () {
submitform();
}, 30000);
function submitform() {
$("#pageForm").submit();
}
$('.datepicker').datepicker({
showButtonPanel: true,
localToday: new Date(), // This option determines the highlighted today date
format: 'yyyy-mm-dd',
todayHighlight: true,
});
</script>