trip | person | trip_time | SHAPE |
---|---|---|---|
3485 | 2168 | 2023-08-24T08:00:00 | ... |
... | ... | ... | ... |
75 | 46 | 2023-08-24T08:00:00 | ... |
... | ... | ... | ... |
75 | 46 | 2023-08-24T08:00:12 | ... |
... | ... | ... | ... |
1562 | 966 | 2023-08-24T08:00:29 | ... |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
from arcgis.gis import GIS | |
from arcgis.features import FeatureLayer, FeatureSet | |
from arcgis.mapping import WebMap | |
from geopedestrian.categories import CategoryRegistry | |
from geopedestrian.services import drive_from, solve_walking, walk_to | |
from georapid.client import GeoRapidClient | |
from georapid.factory import EnvironmentClientFactory | |
import os | |
import pandas as pd |
start_time | end_time | agent_count | SHAPE |
---|---|---|---|
2023-08-24T08:00:00 | 2023-08-24T08:59:59 | 439 | ... |
... | ... | ... | |
... | ... | ... | |
... | ... | ... | |
2023-08-24T09:00:00 | 2023-08-24T09:59:59 | 408 | ... |
This file contains 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 math | |
# Function to calculate the hypotenuse | |
def calculate_hypotenuse(a, b): | |
return math.sqrt(a**2 + b**2) | |
# Function to calculate one leg (a) | |
def calculate_leg_a(c, b): | |
return math.sqrt(c**2 - b**2) |
This file contains 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
# Mapping the aggregated armed conflict events | |
focus_map = create_osm_webmap() | |
aggregated_events_renderer = create_aggregated_renderer(aggregated_events_featureset.sdf) | |
focus_map.add_layer(aggregated_events_featureset, {'renderer': aggregated_events_renderer, 'opacity': 0.7}) | |
focus_map | |
# Mapping the armed conflict events | |
focus_map = create_osm_webmap() | |
events_renderer = create_events_renderer() | |
focus_map.add_layer(events_featureset, {'renderer': events_renderer, 'opacity': 0.7}) |
This file contains 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
host = 'geoconflicts.p.rapidapi.com' | |
conflicts_client = EnvironmentClientFactory.create_client_with_host(host) | |
features_dict = query(conflicts_client, date=datetime(2022, 2, 24), format=OutFormat.ESRI) | |
events_featureset = FeatureSet.from_dict(features_dict) | |
aggregated_features_dict = aggregate(conflicts_client, date=datetime(2022, 2, 24), format=OutFormat.ESRI) | |
aggregated_events_featureset = FeatureSet.from_dict(aggregated_features_dict) |
This file contains 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
def create_osm_webmap(): | |
"""Creates a simple web map using the OSM basemap.""" | |
webmap = WebMap() | |
webmap.basemap = 'osm' | |
return webmap | |
def create_events_renderer(): | |
"""Creates a simple renderer representing events as areas of interests.""" | |
renderer = generate_simple(geometry_type='Polygon', colors=[171, 31, 42, 191]) | |
renderer_outline = { |
This file contains 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
from arcgis.gis import GIS | |
from arcgis.features import FeatureLayer, FeatureSet | |
from arcgis.mapping import WebMap | |
from arcgis.mapping.renderer import generate_simple, generate_classbreaks | |
from datetime import datetime | |
from georapid.client import GeoRapidClient | |
from georapid.factory import EnvironmentClientFactory | |
from georapid.conflicts import aggregate, query | |
from georapid.formats import OutFormat |
name | count | date |
---|---|---|
Moscow, Moskva, Russia | 797 | 2022-02-25 |
Budapest, Budapest, Hungary | 258 | 2022-02-25 |
Kiev, Ukraine (General), Ukraine | 256 | 2022-02-25 |
Saint Petersburg, Sankt-Peterburg, Russia | 197 | 2022-02-25 |
New Delhi, Delhi, India | 178 | 2022-02-25 |
Berlin, Berlin, Germany | 118 | 2022-02-25 |
Dublin, Dublin, Ireland | 83 | 2022-02-25 |
London, London, City Of, United Kingdom | 73 | 2022-02-25 |
NewerOlder