Skip to content

Instantly share code, notes, and snippets.

View jj0hns0n's full-sized avatar

Jeffrey Johnson jj0hns0n

View GitHub Profile
{
"city": "Seattle-Tacoma",
"country": "United States",
"year": 2025,
"safest_neighborhoods": [
{
"name": "Loyal Heights (Seattle)",
"description": "Family-friendly with strong schools and a crime rate 60% lower than the city average.",
"source": "https://www.pods.com/blog/safest-neighborhoods-seattle"
},
{
"city": "Kinshasa",
"country": "Democratic Republic of the Congo",
"year": 2025,
"articles": [
{
"title": "Braquage mortel à Kinshasa : Deux décès et plusieurs blessés signalés à Bumbu",
"date": "2025-03-11",
"source": {
"name": "Le Potentiel",
{
"city": "Barranquilla",
"country": "Colombia",
"year": 2025,
"news_sources": [
{
"name": "El Heraldo",
"url": "https://www.elheraldo.co",
"language": "Spanish"
},
{
"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",
{
"city": "Manila",
"country": "Philippines",
"year": 2025,
"news_sources": [
{
"name": "Manila Bulletin",
"url": "https://mb.com.ph/",
"language": "English"
},
{
"city": "São Paulo",
"country": "Brazil",
"year": 2025,
"key_news_sources": [
{
"name": "Folha de S.Paulo",
"url": "https://www.folha.uol.com.br"
},
{
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)
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
{
"jobTypes" : [
{
"featureDefinitions" : [
{
"featureClass" : "Pole",
"geometryType" : "Point",
"featureIdAttribute" : "Number",
"arColor" : "#ffff00",
"fixedDistanceInformation" : {
@jj0hns0n
jj0hns0n / gist:47fb3e803693fba2761ba10fb60bb807
Last active August 23, 2016 09:37
GeoNode Developers Workshop
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