Comments (1)
Here is a numpy/pandas example to determine link tonode number of legs and min volume leg. Determining freeway and centroid connector links is the same type of groupby and repeat operation once the links have a facility type as well.
import pandas as pd
import numpy as np
links = pd.DataFrame()
links["fn"] = [1,2,3,4,5]
links["tn"] = [6,6,6,7,8]
links["vol"] = [75,50,100,200,300]
#node legs
links["tn_legs"] = np.repeat(links.groupby("tn").count()["fn"].tolist(),links.groupby("tn").count()["fn"].tolist())
#min volume leg
links["tn_minvol"] = np.repeat(links.groupby("tn").min()["vol"].tolist(),links.groupby("tn").count()["fn"].tolist())
links["tn_minvolleg"] = links["vol"] == links["tn_minvol"]
from bca4abm.
Related Issues (20)
- need a more generic version of aggregate_data_manifest.csv
- Chunking causes incorrect expression assignment for certain calculations
- chunking calculation bug HOT 1
- pandas, pytables, and others no longer support Python 2
- improve setup for running tool HOT 4
- toolz AttributeError HOT 1
- aggregate_results does not output anything
- specify build folder in order to better support multiple build folders HOT 5
- travis build hardwires toolz 0.8.0 HOT 1
- orca 1.4 breaks bca4abm
- improve runtime HOT 2
- output od benefit trace data for districts pairs
- migrate documentation from wiki to rst HOT 1
- move model step overall settings to model step yaml file HOT 1
- read zone csvs in addition to omx matrices for the aggregate od processor HOT 2
- rename cval to hhs
- Update default crash cost to a more reasonable value to avoid confusion
- Python 3 support HOT 2
- non-sequential zones don't quite work HOT 1
- expose aggregate_zone.csv filename as yml parameter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bca4abm.