Skip to content

Commit aecc544

Browse files
author
Alfiya Tarasenko
committed
Remove splitters
1 parent 79c74ea commit aecc544

3 files changed

Lines changed: 23 additions & 18 deletions

File tree

python/create-a-map/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This project demonstrates how to use the [Geoapify Maps Tiles](https://www.geoapify.com/map-tiles/) to display an interactive raster map using [folium](https://pypi.org/project/folium/). The map includes customizable styles, zoom levels, and center coordinates.
44

5-
---
5+
66

77
## **Features**
88
- Uses Geoapify Maps API for high-quality map tiles.
@@ -46,7 +46,7 @@ Install the required Python libraries using pip:
4646
pip install folium requests
4747
```
4848

49-
---
49+
5050

5151
## **Running the Example**
5252

@@ -64,7 +64,7 @@ python interactive_map.py --style osm-bright --zoom 12 --lat 48.8566 --lon 2.352
6464
- `--lat` (optional, default: `48.8584`): Latitude for the map center.
6565
- `--lon` (optional, default: `2.2945`): Longitude for the map center.
6666

67-
---
67+
6868

6969
## Code Explanation
7070

@@ -135,7 +135,7 @@ def create_map(map_style, zoom, lat, lon, api_key):
135135

136136
This function allows users to create a customizable interactive map with Geoapify tiles, supporting different styles and zoom levels.
137137

138-
---
138+
139139

140140
## **Output**
141141
- The script generates a `map.html` file.

python/geocode_addresses/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This project demonstrates how to use the [Geoapify Geocoding API](https://www.geoapify.com/geocoding-api/) to geocode addresses from an input file and save the results in NDJSON format.
44

5-
---
5+
66
## **Features**
77
- Uses Geoapify's Geocoding API to retrieve latitude/longitude for addresses.
88
- Supports batch processing of addresses from an input file.
@@ -57,7 +57,7 @@ Whitney Museum of American Art, 99 Gansevoort St, New York, NY 10014, USA
5757
Solomon R. Guggenheim Museum, 1071 5th Ave, New York, NY 10128, USA
5858
Brooklyn Museum, 200 Eastern Pkwy, Brooklyn, NY 11238, USA
5959
```
60-
---
60+
6161

6262
## **Running the Example**
6363

@@ -74,7 +74,7 @@ python geocode_addresses.py --api_key 27a3c5f9a6754da28283d1995edb9467 --input i
7474
- `--output` (required): Output filename (e.g., `output.ndjson`).
7575
- `--country_code` (optional): Restrict geocoding results to a specific country (e.g., `us`, `de`, `fr`).
7676

77-
---
77+
7878

7979
## **Code Explanation**
8080

@@ -140,14 +140,14 @@ if __name__ == "__main__":
140140
main()
141141
```
142142

143-
---
143+
144144

145145
## **Output**
146146
- The script generates an NDJSON (`.ndjson`) file with geocoding results.
147147
- Each line in the file is a JSON object containing location data.
148148
- If an address is not found, an error message is logged.
149149

150-
---
150+
151151

152152
## **Example Geocoding API Call**
153153

@@ -248,7 +248,7 @@ https://api.geoapify.com/v1/geocode/search?text=The%20Metropolitan%20Museum%20of
248248
}
249249
```
250250

251-
---
251+
252252

253253
## **Error Handling**
254254
- Handles HTTP errors, including invalid API keys and server failures.

python/reverse-geocoding/README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This project demonstrates how to use the Geoapify [Reverse Geocoding API](https://www.geoapify.com/reverse-geocoding-api/) to retrieve address details from latitude and longitude coordinates.
44

5-
---
5+
66

77
## **Features**
88

@@ -45,7 +45,7 @@ Install the required Python libraries using pip:
4545
pip install requests
4646
```
4747

48-
---
48+
4949

5050
## **Running the Reverse Geocoding Example**
5151

@@ -66,7 +66,7 @@ python reverse_geocode.py --api_key 27a3c5f9a6754da28283d1995edb9467 --input inp
6666
- `--type` (optional, default: `address`): Type of result to retrieve (`address`, `street`, `city`, `postcode`, `county`, `state`).
6767
- `--output_format` (optional, default: `json`): Format of response (`json` or `geojson`).
6868

69-
---
69+
7070

7171
## **Example Input File (Coordinates)**
7272

@@ -80,7 +80,7 @@ Below is a sample list of latitude and longitude coordinates that can be used as
8080
34.052235, -118.243683
8181
```
8282

83-
---
83+
8484

8585
## **Reverse Geocoding API Call**
8686

@@ -165,9 +165,14 @@ https://api.geoapify.com/v1/geocode/reverse?lat=40.779437&lon=-73.963244&format=
165165
}
166166
```
167167

168-
### **Notes**
169-
- Replace `{LAT}` and `{LON}` with the desired coordinates.
170-
- Replace `{API_KEY}` with your valid Geoapify API key.
171-
- Use `format=json` to get the response in JSON format.
168+
## **Error Handling**
169+
- Handles HTTP errors, including invalid API keys and server failures.
170+
- Logs warnings when an address cannot be geocoded.
171+
- Ensures the program does not crash due to individual request failures.
172172

173+
## **Notes**
174+
- Ensure that you have a valid [Geoapify API key](https://www.geoapify.com/) before running the script.
175+
- The API supports different country filters to improve geocoding accuracy.
173176

177+
## **License**
178+
This project is licensed under the MIT License.

0 commit comments

Comments
 (0)