Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rvibek
rvibek / arcgis_hcr3_iso3.csv
Created February 11, 2022 13:47
arcgis_hcr3_iso3
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 12 columns, instead of 11. in line 5.
features.attributes.objectid,features.attributes.orig_fid,features.attributes.terr_id,features.attributes.hcr3,features.attributes.iso3,features.attributes.gis_name,features.attributes.gis_name_fr,features.attributes.gis_name_sp,features.attributes.secondary_territory,features.attributes.status,features.attributes.terr_name,features.attributes.globalid
32,32,7,,AIA,Anguilla (GBR),,,1,UK Non-Self-Governing Territory,Anguilla,{B83A754A-94A1-401D-95E9-13C254F82A52}
33,33,4,,ASM,American Samoa (USA),,,1,US Non-Self-Governing Territory,American Samoa,{A0EAB869-A7C9-4AD0-9DC5-47BA6EB9390A}
201,201,8,,ATA,Antarctica,Antarctique,Antártida,1,"",Antarctica,{7FB34872-35A2-45FB-A20B-CA8F4C3E136C}
202,202,85,,ATF,French Southern and Antarctic Territories (FRA),Terres Australes et Antarctiques Françaises (FRA),Francés Tierras Australes y Antárticas (FRA),1,FR Territory,French Southern and Antarctic Territories,{A7B27F33-1E65-4EED-A267-41247CBA016A}
8,8,13,,AUS,Ashmore and Cartier Islands (AUS),,,1,AU Territory,Ashmore and
https://en.wikipedia.org/wiki/Alexandria_Governorate
https://en.wikipedia.org/wiki/Aswan_Governorate
https://en.wikipedia.org/wiki/Asyut_Governorate
https://en.wikipedia.org/wiki/Beheira_Governorate
https://en.wikipedia.org/wiki/Beni_Suef_Governorate
https://en.wikipedia.org/wiki/Cairo_Governorate
https://en.wikipedia.org/wiki/Dakahlia_Governorate
https://en.wikipedia.org/wiki/Damietta_Governorate
https://en.wikipedia.org/wiki/Faiyum_Governorate
https://en.wikipedia.org/wiki/Gharbia_Governorate
@rvibek
rvibek / gd.txt
Created August 12, 2021 19:16
generate data
<<gd.loop|30|,>>
<<gd.name.findName>>,<<gd.date.past>>,<<gd.commerce.price>>,<<gd.company.companyName>>,<<gd.address.state>>
<</gd.loop>>
@rvibek
rvibek / generate_fake_df.py
Created August 1, 2021 21:56
generate_fake_df.py
import pandas as pd
import numpy as np
from itertools import cycle
def generate_fake_dataframe(size, cols, col_names = None, intervals = None, seed = None):
categories_dict = {'animals': ['cow', 'rabbit', 'duck', 'shrimp', 'pig', 'goat', 'crab', 'deer', 'bee', 'sheep', 'fish', 'turkey', 'dove', 'chicken', 'horse'],
'names' : ['James', 'Mary', 'Robert', 'Patricia', 'John', 'Jennifer', 'Michael', 'Linda', 'William', 'Elizabeth', 'Ahmed', 'Barbara', 'Richard', 'Susan', 'Salomon', 'Juan Luis'],
'cities' : ['Stockholm', 'Denver', 'Moscow', 'Marseille', 'Palermo', 'Tokyo', 'Lisbon', 'Oslo', 'Nairobi', 'Río de Janeiro', 'Berlin', 'Bogotá', 'Manila', 'Madrid', 'Milwaukee'],
'colors' : ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'purple', 'pink', 'silver', 'gold', 'beige', 'brown', 'grey', 'black', 'white']
}
@rvibek
rvibek / egy_adm1_2_hdx.html
Created July 29, 2021 11:31
egypt_admin_map.html
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<head>
<title>UNHCR Egypt Admin Level Map</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script>
L_NO_TOUCH = false;
L_DISABLE_3D = false;
</script>
<!DOCTYPE html>
<head>
<title>UNHCR Egypt Admin Level Map</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script>
L_NO_TOUCH = false;
L_DISABLE_3D = false;
</script>
@rvibek
rvibek / hkp_articles_vibek.txt
Created July 29, 2021 09:49
himalkhabar patrika articles
http://nepalihimal.com/article/9697
http://nepalihimal.com/article/9848
http://nepalihimal.com/article/13558
http://nepalihimal.com/article/13203
http://nepalihimal.com/article/12478
http://nepalihimal.com/article/12779
# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'
# %% [markdown]
# # Generate Population Choropleth Map
# %%
import pandas as pd
import folium
import geopandas as gpd