https://github.com/simonusher/pkp_network_science
A railway connections (Polskie Koleje Państwowe) network scraper with simple Folium visualizations. Created as part of network science course on WrUST.
https://github.com/simonusher/pkp_network_science
graph network-science python scraping
Last synced: 2 months ago
JSON representation
A railway connections (Polskie Koleje Państwowe) network scraper with simple Folium visualizations. Created as part of network science course on WrUST.
- Host: GitHub
- URL: https://github.com/simonusher/pkp_network_science
- Owner: simonusher
- License: mit
- Created: 2020-03-31T19:55:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-03T19:55:52.000Z (about 2 years ago)
- Last Synced: 2025-01-08T09:37:09.927Z (over 1 year ago)
- Topics: graph, network-science, python, scraping
- Language: Jupyter Notebook
- Homepage:
- Size: 5.16 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
PKP network scraping and analysis
A railway connections (Polskie Koleje Państwowe) network scraper with simple Folium visualizations. Created as part of network science course on WrUST.
Report Bug
·
Request Feature
Table of Contents
## About The Project
The project was created as part of network science course on WrUST. It contains a scraper script that allows to download PKP railway connections and represent them as a graph. The notebooks available in this repo then use GeoPy and Folium to generate visualizations of downloaded network.
### Built With
* python 3.8.2,
* [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/),
* [Folium](https://python-visualization.github.io/folium/),
* [GeoPy](https://geopy.readthedocs.io/en/stable/),
* [Jupyter](https://jupyter.org/),
* [Pandas](https://pandas.pydata.org/),
* [Numpy](https://numpy.org/).
## Getting Started
To get a local copy up and running follow these simple steps.
### Prerequisites
* python, tested on 3.8.2.
If you have pyenv, you can install this version using:
```sh
pyenv install 3.8.2
```
### Installation
1. Clone the repo
```sh
git clone https://github.com/simonusher/pkp_network_science.git
```
2. Create a virtual environment and activate it (optional):
```sh
python -m venv env
env/bin/activate
```
3. Install the requirements:
```sh
pip install -r requirements
```
## Usage
You can run the scraper script using
```sh
python scraper.py [OPTIONS] [carriers].
```
You can get a help message by running:
```sh
python scraper.py --help
```
You can then use the coord_geopy.ipynb and map_vis_folium.ipynb notebooks to geocode the localizations and generate map visualizations.
## License
Distributed under the MIT License. See `LICENSE` for more information.
## Contact
Szymon Woźniak - swozniak6@gmail.com
Project Link: [https://github.com/simonusher/pkp_network_science](https://github.com/simonusher/pkp_network_science)
[contributors-shield]: https://img.shields.io/github/contributors/simonusher/pkp_network_science.svg?style=for-the-badge
[contributors-url]: https://github.com/simonusher/pkp_network_science/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/simonusher/pkp_network_science.svg?style=for-the-badge
[forks-url]: https://github.com/simonusher/pkp_network_science/network/members
[stars-shield]: https://img.shields.io/github/stars/simonusher/pkp_network_science.svg?style=for-the-badge
[stars-url]: https://github.com/simonusher/pkp_network_science/stargazers
[issues-shield]: https://img.shields.io/github/issues/simonusher/pkp_network_science.svg?style=for-the-badge
[issues-url]: https://github.com/simonusher/pkp_network_science/issues
[license-shield]: https://img.shields.io/github/license/simonusher/pkp_network_science.svg?style=for-the-badge
[license-url]: https://github.com/simonusher/pkp_network_science/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://www.linkedin.com/in/szymon-wo%C5%BAniak-00505318a/