This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"city": "Barranquilla", | |
"country": "Colombia", | |
"year": 2025, | |
"news_sources": [ | |
{ | |
"name": "El Heraldo", | |
"url": "https://www.elheraldo.co", | |
"language": "Spanish" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"city": "Manila", | |
"country": "Philippines", | |
"year": 2025, | |
"articles": [ | |
{ | |
"title": "Metro Manila Index Crimes Down by 19.6% in January 2025", | |
"date": "2025-02-02", | |
"source": { | |
"name": "Manila Bulletin", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"city": "Manila", | |
"country": "Philippines", | |
"year": 2025, | |
"news_sources": [ | |
{ | |
"name": "Manila Bulletin", | |
"url": "https://mb.com.ph/", | |
"language": "English" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"city": "São Paulo", | |
"country": "Brazil", | |
"year": 2025, | |
"key_news_sources": [ | |
{ | |
"name": "Folha de S.Paulo", | |
"url": "https://www.folha.uol.com.br" | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH base_risk AS ( | |
SELECT | |
*, | |
( | |
-- Base risk calculation using already inverted scores | |
(prosperity_score_inverted * 0.35) + | |
(safety_and_security_inverted * 0.25) + | |
(violent_crime_inverted * 0.20) + | |
(property_crime_inverted * 0.10) + | |
(personal_freedom_inverted * 0.10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH base_risk AS ( | |
SELECT | |
*, | |
( | |
(100 - prosperity_score) * 0.10 + | |
(100 - safety_and_security) * 0.10 + | |
(100 - violent_crime) * 0.30 + | |
(100 - property_crime) * 0.25 | |
) AS base_risk_score | |
FROM your_table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"jobTypes" : [ | |
{ | |
"featureDefinitions" : [ | |
{ | |
"featureClass" : "Pole", | |
"geometryType" : "Point", | |
"featureIdAttribute" : "Number", | |
"arColor" : "#ffff00", | |
"fixedDistanceInformation" : { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://docs.geonode.org/en/master/tutorials/overview_and_ref/reference_doc/architecture.html | |
workon geonode_live | |
cd geonode_live | |
python manage.py updatelayers | |
python manage.py loaddata ../geonode/geonode/base/fixtures/initial_data.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xml.etree.ElementTree as ET | |
from xml.dom import minidom | |
namespaces = { | |
'sld': 'http://www.opengis.net/sld', | |
'ogc': 'http://www.opengis.net/ogc', | |
'gml':'http://www.opengis.net/gml' | |
} | |
for prefix, uri in namespaces.iteritems(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ec2 m1.small using i-93c43aed | |
Elastic IP 54.197.230.116 assigned to instance ID i-93c43aed | |
build.geonode.org configured to use 54.197.230.116 | |
old server is here 184.154.70.228 (all services other than ssh are disabled) | |
geonode-dev.pem key used | |
Ports 80 8000 8080 and 8088 opened in ec2 security group | |
# ssh into server | |
sudo updatedb | |
sudo apt-get update |