Skip to content

Conversation

@Grufoony
Copy link
Collaborator

@Grufoony Grufoony commented Nov 15, 2024

# draw graph
_, ax = plt.subplots(figsize=(10, 10))
nx.draw(_graph, _pos, edge_color=colors, with_labels=True, ax=ax)
_, ax = plt.subplots()

Check warning

Code scanning / Pylintpython3 (reported by Codacy)

Variable name "ax" doesn't conform to snake_case naming style Warning

Variable name "ax" doesn't conform to snake_case naming style
"""

import networkx as nx
import pandas as pd

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'pandas' (import-error) Warning

Unable to import 'pandas' (import-error)
from tqdm import tqdm
from PIL import Image, ImageFont
import pandas as pd
import geopandas as gpd

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'geopandas' (import-error) Warning

Unable to import 'geopandas' (import-error)
from PIL import Image, ImageFont
import pandas as pd
import geopandas as gpd
import contextily as ctx

Check warning

Code scanning / Prospector (reported by Codacy)

Unable to import 'contextily' (import-error) Warning

Unable to import 'contextily' (import-error)
# draw graph
_, ax = plt.subplots(figsize=(10, 10))
nx.draw(_graph, _pos, edge_color=colors, with_labels=True, ax=ax)
_, ax = plt.subplots()

Check warning

Code scanning / Pylint (reported by Codacy)

Variable name "ax" doesn't conform to snake_case naming style Warning

Variable name "ax" doesn't conform to snake_case naming style
title="Select the adjacency matrix file",
filetypes=[("DAT files", "*.dat")],
)
adj = np.loadtxt(RESPONSE, skiprows=1)

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "adj" doesn't conform to UPPER_CASE naming style Warning

Constant name "adj" doesn't conform to UPPER_CASE naming style
RESPONSE = askopenfilename(
title="Select the coordinates file", filetypes=[("CSV files", "*.csv")]
)
coord = pd.read_csv(RESPONSE, sep=";")

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "coord" doesn't conform to UPPER_CASE naming style Warning

Constant name "coord" doesn't conform to UPPER_CASE naming style
title="Select the coordinates file", filetypes=[("CSV files", "*.csv")]
)
coord = pd.read_csv(RESPONSE, sep=";")
coord = coord.set_index("nodeId")

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "coord" doesn't conform to UPPER_CASE naming style Warning

Constant name "coord" doesn't conform to UPPER_CASE naming style
# df = df.set_index('time')
# # remove last column
# df = df.iloc[:,:-1]
df = pd.read_csv(RESPONSE, sep=";")

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "df" doesn't conform to UPPER_CASE naming style Warning

Constant name "df" doesn't conform to UPPER_CASE naming style
############################################

adj = np.loadtxt("../examples/data/matrix.dat", skiprows=1)
n = len(adj)

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "n" doesn't conform to UPPER_CASE naming style Warning

Constant name "n" doesn't conform to UPPER_CASE naming style
adj = np.loadtxt("../examples/data/matrix.dat", skiprows=1)
n = len(adj)
# read the coordinates
coord = pd.read_csv("../examples/data/coordinates.csv", sep=";")

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "coord" doesn't conform to UPPER_CASE naming style Warning

Constant name "coord" doesn't conform to UPPER_CASE naming style
n = len(adj)
# read the coordinates
coord = pd.read_csv("../examples/data/coordinates.csv", sep=";")
coord = coord.set_index("nodeId")

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "coord" doesn't conform to UPPER_CASE naming style Warning

Constant name "coord" doesn't conform to UPPER_CASE naming style
coord = pd.read_csv("../examples/data/coordinates.csv", sep=";")
coord = coord.set_index("nodeId")
# create a directed graph
G, edges, pos = create_graph_from_adj(adj, coord)

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "pos" doesn't conform to UPPER_CASE naming style Warning

Constant name "pos" doesn't conform to UPPER_CASE naming style
coord = pd.read_csv("../examples/data/coordinates.csv", sep=";")
coord = coord.set_index("nodeId")
# create a directed graph
G, edges, pos = create_graph_from_adj(adj, coord)

Check warning

Code scanning / Pylint (reported by Codacy)

Constant name "edges" doesn't conform to UPPER_CASE naming style Warning

Constant name "edges" doesn't conform to UPPER_CASE naming style
@Grufoony Grufoony merged commit 838c51e into main Nov 15, 2024
16 checks passed
@Grufoony Grufoony deleted the improve_utils branch November 15, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generalize gifter.py script for generic networks

2 participants