Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CCC-Assignment2-Team69
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xinjie Lan
CCC-Assignment2-Team69
Commits
e2cf0086
Commit
e2cf0086
authored
6 years ago
by
xinjiel2
Browse files
Options
Downloads
Patches
Plain Diff
criminal percentage
parent
d4c1fbf1
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
web_app_django/tweet/views.py
+4
-0
4 additions, 0 deletions
web_app_django/tweet/views.py
with
4 additions
and
0 deletions
web_app_django/tweet/views.py
+
4
−
0
View file @
e2cf0086
...
...
@@ -69,7 +69,9 @@ def index(request):
#print(doc.value[element])
countDomesitc
+=
doc
.
value
[
element
]
countDomesitc
+=
len
(
countId
)
countDomestic
=
(
countDomestic
/
7410000
)
*
100
print
(
countDomesitc
)
context
[
'
NswCount
'
]
=
countDomesitc
#print(docs[doc]['features'])
...
...
@@ -92,6 +94,7 @@ def index(request):
else
:
count
+=
properties
[
element
]
print
(
count
)
cout
=
(
cout
/
5740000
)
*
100
context
[
'
VicCount
'
]
=
count
docsSa
=
SERVER
[
'
aurin_sa
'
]
countForSa
=
0
...
...
@@ -104,6 +107,7 @@ def index(request):
if
not
properties
[
element
]
==
None
:
#print(countForSa)
countForSa
+=
properties
[
element
]
countForSa
=
(
countForSa
/
1677000
)
*
100
print
(
countForSa
)
context
[
'
SaCount
'
]
=
countForSa
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment