geojson

Automatically set outline and fill color based on GeoJSON properties with geopandas

Automatically set outline and fill color based on GeoJSON properties with geopandas Question: I am making a program that retrieves GeoJSON data from past convective outlooks from the Storm Prediction Center (SPC) and plot it using geopandas. With my current code, it is able to plot outlooks correctly onto a map. However, the coloring isn’t …

Total answers: 1

Python request to get altitude from a GeoJSON file

Python request to get altitude from a GeoJSON file Question: I want to get the elevation of a segment (linestring) from a GeoJSON file. I’m using this API: Documentation: https://api3.geo.admin.ch/services/sdiservices.html#profile request URL: https://api3.geo.admin.ch/rest/services/profile.csv My problem is that I cannot get rid of an error saying the passed parameter ‘geom’ is not of GeoJSON type. My …

Total answers: 2

Can mark_geoshape () be used for Canadian Provinces/cities?

Can mark_geoshape () be used for Canadian Provinces/cities? Question: I’m looking to somehow figure out a way to insert a geographic graph of British Columbia which is a part of Canada in my data analysis. I have made this image here explaining what tree is being planted the most in Vancouver Now I want to …

Total answers: 3

Apache Beam Pipeline runs with DirectRunner, but fails with DataflowRunner (SDK harness sdk-0-0 disconnected) during initial read step

Apache Beam Pipeline runs with DirectRunner, but fails with DataflowRunner (SDK harness sdk-0-0 disconnected) during initial read step Question: TL;DR We have a default VPC. Tried to run dataflow job. Initial step (Read file) manages to process 1/2 steps. Get JOB_MESSAGE_ERROR: SDK harness sdk-0-0 disconnected error message, but nothing else in the logs. Have tried …

Total answers: 2

Remove features of json if lat-lon keys not within other json boundaries

Remove features of json if lat-lon keys not within other json boundaries Question: I’m trying to create a weather contour for the United States from an existing data frame and add it to a Dash Mapbox map, but the json file I am creating "fills in" areas where data does not exist in an attempt …

Total answers: 2

how to convert geojson to shapely polygon?

how to convert geojson to shapely polygon? Question: i have a geoJSON geo = {‘type’: ‘Polygon’, ‘coordinates’: [[[23.08437310100004, 53.15448536100007], [23.08459767900007, 53.15448536100007], [23.08594514600003, 53.153587050000056], (…) [23.08437310100004, 53.15448536100007]]]} and i want to use these coordinates as an input to shapely.geometry.Polygon. The problem is that Polygon only accepts tuple values, meaning i have to convert this geojson to …

Total answers: 3

Create Redshift table with new Geometry type through psycopg2

Create Redshift table with new Geometry type through psycopg2 Question: After Redshift announced support for Geometry types and spatial functions, I’d like to create a table with polygons for all countries. I’m failing to do the INSERT and would appreciate help. Here is what I’ve tried: I’ve downloaded the geojson and unzipped (https://datahub.io/core/geo-countries) Then the …

Total answers: 4

Python : Folium map not appearing

Python : Folium map not appearing Question: I am trying to map some data for Canada using Folium. However, in the end, I am getting whitespace as an output with no error message. My code is below. import folium import json # or import geojson with open(“geo.json”) as json_file: json_data = json.load(json_file) # geojson file …

Total answers: 2

Set color for missing values in folium choropleth

Set color for missing values in folium choropleth Question: I have a dataframe with some countries and variables and I would like to produce a choropleth map with folium, using a geojson file for the entire world. I have a problem with folium assigning maximum value on a color scale to countries that are not …

Total answers: 2