mirror of
https://github.com/aykhans/AzSuicideDataVisualization.git
synced 2025-09-06 02:44:18 +00:00
Version 0.1
Added sidebar, Dashboard, Line Graph
This commit is contained in:
1
.venv/Lib/site-packages/openpyxl/pivot/__init__.py
Normal file
1
.venv/Lib/site-packages/openpyxl/pivot/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# Copyright (c) 2010-2022 openpyxl
|
1119
.venv/Lib/site-packages/openpyxl/pivot/cache.py
Normal file
1119
.venv/Lib/site-packages/openpyxl/pivot/cache.py
Normal file
File diff suppressed because it is too large
Load Diff
322
.venv/Lib/site-packages/openpyxl/pivot/fields.py
Normal file
322
.venv/Lib/site-packages/openpyxl/pivot/fields.py
Normal file
@@ -0,0 +1,322 @@
|
||||
# Copyright (c) 2010-2022 openpyxl
|
||||
|
||||
from openpyxl.descriptors.serialisable import Serialisable
|
||||
from openpyxl.descriptors import (
|
||||
Typed,
|
||||
DateTime,
|
||||
Bool,
|
||||
Float,
|
||||
String,
|
||||
Integer,
|
||||
Sequence,
|
||||
)
|
||||
from openpyxl.descriptors.excel import HexBinary
|
||||
|
||||
class Index(Serialisable):
|
||||
|
||||
tagname = "x"
|
||||
|
||||
v = Integer(allow_none=True)
|
||||
|
||||
def __init__(self,
|
||||
v=0,
|
||||
):
|
||||
self.v = v
|
||||
|
||||
|
||||
class Tuple(Serialisable):
|
||||
|
||||
fld = Integer()
|
||||
hier = Integer()
|
||||
item = Integer()
|
||||
|
||||
def __init__(self,
|
||||
fld=None,
|
||||
hier=None,
|
||||
item=None,
|
||||
):
|
||||
self.fld = fld
|
||||
self.hier = hier
|
||||
self.item = item
|
||||
|
||||
|
||||
class TupleList(Serialisable):
|
||||
|
||||
c = Integer(allow_none=True)
|
||||
tpl = Typed(expected_type=Tuple, )
|
||||
|
||||
__elements__ = ('tpl',)
|
||||
|
||||
def __init__(self,
|
||||
c=None,
|
||||
tpl=None,
|
||||
):
|
||||
self.c = c
|
||||
self.tpl = tpl
|
||||
|
||||
|
||||
class Missing(Serialisable):
|
||||
|
||||
tagname = "m"
|
||||
|
||||
tpls = Sequence(expected_type=TupleList)
|
||||
x = Sequence(expected_type=Index)
|
||||
u = Bool(allow_none=True)
|
||||
f = Bool(allow_none=True)
|
||||
c = String(allow_none=True)
|
||||
cp = Integer(allow_none=True)
|
||||
_in = Integer(allow_none=True)
|
||||
bc = HexBinary(allow_none=True)
|
||||
fc = HexBinary(allow_none=True)
|
||||
i = Bool(allow_none=True)
|
||||
un = Bool(allow_none=True)
|
||||
st = Bool(allow_none=True)
|
||||
b = Bool(allow_none=True)
|
||||
|
||||
__elements__ = ('tpls', 'x')
|
||||
|
||||
def __init__(self,
|
||||
tpls=(),
|
||||
x=(),
|
||||
u=None,
|
||||
f=None,
|
||||
c=None,
|
||||
cp=None,
|
||||
_in=None,
|
||||
bc=None,
|
||||
fc=None,
|
||||
i=None,
|
||||
un=None,
|
||||
st=None,
|
||||
b=None,
|
||||
):
|
||||
self.tpls = tpls
|
||||
self.x = x
|
||||
self.u = u
|
||||
self.f = f
|
||||
self.c = c
|
||||
self.cp = cp
|
||||
self._in = _in
|
||||
self.bc = bc
|
||||
self.fc = fc
|
||||
self.i = i
|
||||
self.un = un
|
||||
self.st = st
|
||||
self.b = b
|
||||
|
||||
|
||||
class Number(Serialisable):
|
||||
|
||||
tagname = "n"
|
||||
|
||||
tpls = Sequence(expected_type=TupleList)
|
||||
x = Sequence(expected_type=Index)
|
||||
v = Float()
|
||||
u = Bool(allow_none=True)
|
||||
f = Bool(allow_none=True)
|
||||
c = String(allow_none=True)
|
||||
cp = Integer(allow_none=True)
|
||||
_in = Integer(allow_none=True)
|
||||
bc = HexBinary(allow_none=True)
|
||||
fc = HexBinary(allow_none=True)
|
||||
i = Bool(allow_none=True)
|
||||
un = Bool(allow_none=True)
|
||||
st = Bool(allow_none=True)
|
||||
b = Bool(allow_none=True)
|
||||
|
||||
__elements__ = ('tpls', 'x')
|
||||
|
||||
def __init__(self,
|
||||
tpls=(),
|
||||
x=(),
|
||||
v=None,
|
||||
u=None,
|
||||
f=None,
|
||||
c=None,
|
||||
cp=None,
|
||||
_in=None,
|
||||
bc=None,
|
||||
fc=None,
|
||||
i=None,
|
||||
un=None,
|
||||
st=None,
|
||||
b=None,
|
||||
):
|
||||
self.tpls = tpls
|
||||
self.x = x
|
||||
self.v = v
|
||||
self.u = u
|
||||
self.f = f
|
||||
self.c = c
|
||||
self.cp = cp
|
||||
self._in = _in
|
||||
self.bc = bc
|
||||
self.fc = fc
|
||||
self.i = i
|
||||
self.un = un
|
||||
self.st = st
|
||||
self.b = b
|
||||
|
||||
|
||||
class Error(Serialisable):
|
||||
|
||||
tagname = "e"
|
||||
|
||||
tpls = Typed(expected_type=TupleList, allow_none=True)
|
||||
x = Sequence(expected_type=Index)
|
||||
v = String()
|
||||
u = Bool(allow_none=True)
|
||||
f = Bool(allow_none=True)
|
||||
c = String(allow_none=True)
|
||||
cp = Integer(allow_none=True)
|
||||
_in = Integer(allow_none=True)
|
||||
bc = HexBinary(allow_none=True)
|
||||
fc = HexBinary(allow_none=True)
|
||||
i = Bool(allow_none=True)
|
||||
un = Bool(allow_none=True)
|
||||
st = Bool(allow_none=True)
|
||||
b = Bool(allow_none=True)
|
||||
|
||||
__elements__ = ('tpls', 'x')
|
||||
|
||||
def __init__(self,
|
||||
tpls=None,
|
||||
x=(),
|
||||
v=None,
|
||||
u=None,
|
||||
f=None,
|
||||
c=None,
|
||||
cp=None,
|
||||
_in=None,
|
||||
bc=None,
|
||||
fc=None,
|
||||
i=None,
|
||||
un=None,
|
||||
st=None,
|
||||
b=None,
|
||||
):
|
||||
self.tpls = tpls
|
||||
self.x = x
|
||||
self.v = v
|
||||
self.u = u
|
||||
self.f = f
|
||||
self.c = c
|
||||
self.cp = cp
|
||||
self._in = _in
|
||||
self.bc = bc
|
||||
self.fc = fc
|
||||
self.i = i
|
||||
self.un = un
|
||||
self.st = st
|
||||
self.b = b
|
||||
|
||||
|
||||
class Boolean(Serialisable):
|
||||
|
||||
tagname = "b"
|
||||
|
||||
x = Sequence(expected_type=Index)
|
||||
v = Bool()
|
||||
u = Bool(allow_none=True)
|
||||
f = Bool(allow_none=True)
|
||||
c = String(allow_none=True)
|
||||
cp = Integer(allow_none=True)
|
||||
|
||||
__elements__ = ('x',)
|
||||
|
||||
def __init__(self,
|
||||
x=(),
|
||||
v=None,
|
||||
u=None,
|
||||
f=None,
|
||||
c=None,
|
||||
cp=None,
|
||||
):
|
||||
self.x = x
|
||||
self.v = v
|
||||
self.u = u
|
||||
self.f = f
|
||||
self.c = c
|
||||
self.cp = cp
|
||||
|
||||
|
||||
class Text(Serialisable):
|
||||
|
||||
tagname = "s"
|
||||
|
||||
tpls = Sequence(expected_type=TupleList)
|
||||
x = Sequence(expected_type=Index)
|
||||
v = String()
|
||||
u = Bool(allow_none=True)
|
||||
f = Bool(allow_none=True)
|
||||
c = String(allow_none=True)
|
||||
cp = Integer(allow_none=True)
|
||||
_in = Integer(allow_none=True)
|
||||
bc = HexBinary(allow_none=True)
|
||||
fc = HexBinary(allow_none=True)
|
||||
i = Bool(allow_none=True)
|
||||
un = Bool(allow_none=True)
|
||||
st = Bool(allow_none=True)
|
||||
b = Bool(allow_none=True)
|
||||
|
||||
__elements__ = ('tpls', 'x')
|
||||
|
||||
def __init__(self,
|
||||
tpls=(),
|
||||
x=(),
|
||||
v=None,
|
||||
u=None,
|
||||
f=None,
|
||||
c=None,
|
||||
cp=None,
|
||||
_in=None,
|
||||
bc=None,
|
||||
fc=None,
|
||||
i=None,
|
||||
un=None,
|
||||
st=None,
|
||||
b=None,
|
||||
):
|
||||
self.tpls = tpls
|
||||
self.x = x
|
||||
self.v = v
|
||||
self.u = u
|
||||
self.f = f
|
||||
self.c = c
|
||||
self.cp = cp
|
||||
self._in = _in
|
||||
self.bc = bc
|
||||
self.fc = fc
|
||||
self.i = i
|
||||
self.un = un
|
||||
self.st = st
|
||||
self.b = b
|
||||
|
||||
|
||||
class DateTimeField(Serialisable):
|
||||
|
||||
tagname = "d"
|
||||
|
||||
x = Sequence(expected_type=Index)
|
||||
v = DateTime()
|
||||
u = Bool(allow_none=True)
|
||||
f = Bool(allow_none=True)
|
||||
c = String(allow_none=True)
|
||||
cp = Integer(allow_none=True)
|
||||
|
||||
__elements__ = ('x',)
|
||||
|
||||
def __init__(self,
|
||||
x=(),
|
||||
v=None,
|
||||
u=None,
|
||||
f=None,
|
||||
c=None,
|
||||
cp=None,
|
||||
):
|
||||
self.x = x
|
||||
self.v = v
|
||||
self.u = u
|
||||
self.f = f
|
||||
self.c = c
|
||||
self.cp = cp
|
111
.venv/Lib/site-packages/openpyxl/pivot/record.py
Normal file
111
.venv/Lib/site-packages/openpyxl/pivot/record.py
Normal file
@@ -0,0 +1,111 @@
|
||||
# Copyright (c) 2010-2022 openpyxl
|
||||
|
||||
from openpyxl.descriptors.serialisable import Serialisable
|
||||
from openpyxl.descriptors import (
|
||||
Typed,
|
||||
Integer,
|
||||
Sequence,
|
||||
)
|
||||
from openpyxl.descriptors.sequence import (
|
||||
MultiSequence,
|
||||
MultiSequencePart,
|
||||
)
|
||||
from openpyxl.descriptors.excel import ExtensionList
|
||||
from openpyxl.descriptors.nested import (
|
||||
NestedInteger,
|
||||
NestedBool,
|
||||
)
|
||||
|
||||
from openpyxl.xml.constants import SHEET_MAIN_NS
|
||||
from openpyxl.xml.functions import tostring
|
||||
|
||||
from .fields import (
|
||||
Boolean,
|
||||
Error,
|
||||
Missing,
|
||||
Number,
|
||||
Text,
|
||||
TupleList,
|
||||
DateTimeField,
|
||||
Index,
|
||||
)
|
||||
|
||||
|
||||
class Record(Serialisable):
|
||||
|
||||
tagname = "r"
|
||||
|
||||
_fields = MultiSequence()
|
||||
m = MultiSequencePart(expected_type=Missing, store="_fields")
|
||||
n = MultiSequencePart(expected_type=Number, store="_fields")
|
||||
b = MultiSequencePart(expected_type=Boolean, store="_fields")
|
||||
e = MultiSequencePart(expected_type=Error, store="_fields")
|
||||
s = MultiSequencePart(expected_type=Text, store="_fields")
|
||||
d = MultiSequencePart(expected_type=DateTimeField, store="_fields")
|
||||
x = MultiSequencePart(expected_type=Index, store="_fields")
|
||||
|
||||
|
||||
def __init__(self,
|
||||
_fields=(),
|
||||
m=None,
|
||||
n=None,
|
||||
b=None,
|
||||
e=None,
|
||||
s=None,
|
||||
d=None,
|
||||
x=None,
|
||||
):
|
||||
self._fields = _fields
|
||||
|
||||
|
||||
class RecordList(Serialisable):
|
||||
|
||||
mime_type = "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml"
|
||||
rel_type = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords"
|
||||
_id = 1
|
||||
_path = "/xl/pivotCache/pivotCacheRecords{0}.xml"
|
||||
|
||||
tagname ="pivotCacheRecords"
|
||||
|
||||
r = Sequence(expected_type=Record, allow_none=True)
|
||||
extLst = Typed(expected_type=ExtensionList, allow_none=True)
|
||||
|
||||
__elements__ = ('r', )
|
||||
__attrs__ = ('count', )
|
||||
|
||||
def __init__(self,
|
||||
count=None,
|
||||
r=(),
|
||||
extLst=None,
|
||||
):
|
||||
self.r = r
|
||||
self.extLst = extLst
|
||||
|
||||
|
||||
@property
|
||||
def count(self):
|
||||
return len(self.r)
|
||||
|
||||
|
||||
def to_tree(self):
|
||||
tree = super(RecordList, self).to_tree()
|
||||
tree.set("xmlns", SHEET_MAIN_NS)
|
||||
return tree
|
||||
|
||||
|
||||
@property
|
||||
def path(self):
|
||||
return self._path.format(self._id)
|
||||
|
||||
|
||||
def _write(self, archive, manifest):
|
||||
"""
|
||||
Write to zipfile and update manifest
|
||||
"""
|
||||
xml = tostring(self.to_tree())
|
||||
archive.writestr(self.path[1:], xml)
|
||||
manifest.append(self)
|
||||
|
||||
|
||||
def _write_rels(self, archive, manifest):
|
||||
pass
|
1178
.venv/Lib/site-packages/openpyxl/pivot/table.py
Normal file
1178
.venv/Lib/site-packages/openpyxl/pivot/table.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user